/* ==========================================================================
   UtsavHub / NineOnline Festive — Dedicated Card Generator Stylesheet
   High-Conversion, Responsive, Mobile-First, Dual-Theme UI System
   ========================================================================== */

/* Sub-Hero Header */
.card-gen-hero {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  background: var(--festive-hero-gradient);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.card-gen-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold-500);
  color: var(--gold-400);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.card-gen-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.card-gen-title .gold-accent {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-gen-desc {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.features-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.clickable-chip {
  cursor: pointer;
  border: 1px solid rgba(255, 215, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  font-family: inherit;
}

.clickable-chip:hover {
  border-color: var(--gold-400);
  background: rgba(245, 158, 11, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.clickable-chip:active {
  transform: scale(0.96);
}

/* Main Studio Layout Grid */
.studio-main-wrapper {
  max-width: var(--container-max);
  margin: 2rem auto;
  padding: 0 1rem;
}

.studio-split-grid {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .studio-split-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Form & Configuration Panels */
.studio-controls-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.studio-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.studio-panel:hover {
  border-color: var(--border-glow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.panel-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.panel-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-500);
  color: #000;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Theme Design Selector Cards */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.theme-card-option {
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  user-select: none;
}

.theme-card-option:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
}

.theme-card-option.active {
  border-color: var(--gold-500);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.theme-card-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.theme-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.theme-color-preview-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  margin-top: 0.2rem;
}

/* Form Controls Inside Studio */
.studio-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .studio-form-row {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.field-input, .field-textarea, .field-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.field-input:focus, .field-textarea:focus, .field-select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Language & Category Filter Tabs for Wishes */
.wishes-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lang-toggle-group {
  display: flex;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  width: fit-content;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--gold-500);
  color: #000;
}

.category-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-filter-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cat-filter-pill:hover {
  border-color: var(--gold-500);
}

.cat-filter-pill.active {
  background: var(--gold-500);
  color: #000;
  border-color: var(--gold-500);
  font-weight: 700;
}

/* Wish Preset Auto-fill List */
.wishes-scroll-box {
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 0.35rem;
}

.wishes-scroll-box::-webkit-scrollbar {
  width: 5px;
}
.wishes-scroll-box::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

.wish-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.wish-item-card:hover {
  border-color: var(--gold-400);
  background: rgba(245, 158, 11, 0.08);
}

.wish-text-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wish-use-btn {
  flex-shrink: 0;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--gold-500);
  color: var(--gold-400);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* Right Column: Sticky Live Canvas Preview */
.studio-preview-column {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.canvas-viewport-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvas-header-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--emerald-500);
  font-weight: 700;
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--emerald-500);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.canvas-frame-container {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-frame-container.story-ratio {
  aspect-ratio: 9 / 16;
  max-width: 320px;
}

#customGreetingCanvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Aspect Ratio & Resolution Switches */
.canvas-settings-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
}

.ratio-toggle-btn {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ratio-toggle-btn.active {
  background: var(--gold-500);
  color: #000;
  border-color: var(--gold-500);
  font-weight: 700;
}

/* Export & Action Buttons */
.export-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.export-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.download-format-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-export-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}

.btn-download-primary {
  background: var(--gold-gradient);
  color: #000;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-download-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-download-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-download-secondary:hover {
  border-color: var(--gold-400);
  background: rgba(245, 158, 11, 0.1);
}

.btn-whatsapp-share {
  width: 100%;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  margin-top: 0.5rem;
}

.btn-whatsapp-share:hover {
  background: #20bd5a;
  transform: translateY(-2px);
}

.btn-ios-save {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed var(--gold-400);
  color: var(--text-primary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding: 0.6rem;
}

.btn-ios-save:hover {
  background: rgba(245, 158, 11, 0.15);
}

/* iPhone / iOS Preview Modal */
.ios-save-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.ios-save-modal.active {
  display: flex;
}

.ios-modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.ios-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.ios-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.ios-preview-img {
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.ios-modal-close-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
}

/* SEO Content & FAQ Sections */
.seo-knowledge-section {
  max-width: var(--container-max);
  margin: 4rem auto 2rem;
  padding: 0 1rem;
}

.seo-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
}

.seo-card-box h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.seo-card-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--gold-400);
}

.seo-card-box p, .seo-card-box li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.seo-card-box ul {
  padding-left: 1.5rem;
}

/* FAQ Accordion */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  color: var(--gold-400);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 1.25rem;
}

/* ==========================================================================
   Competitor Directory & Arbitrage Comparison Grid
   ========================================================================== */
.competitor-comparison-section {
  max-width: var(--container-max);
  margin: 3.5rem auto 2rem;
  padding: 0 1rem;
}

.competitor-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.competitor-section-head .section-tag {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold-500);
  color: var(--gold-400);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.competitor-section-head .section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.competitor-section-head .section-subtitle {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Comparison Matrix Box */
.comparison-matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 1rem 0.85rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
}

.comparison-table th {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.2);
}

.comparison-table th.our-column, .comparison-table td.our-column {
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid var(--gold-500);
  border-right: 2px solid var(--gold-500);
}

.badge-winner {
  display: inline-block;
  background: var(--gold-500);
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: 0.4rem;
  text-transform: uppercase;
}

/* Competitor Cards Grid */
.competitors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.competitor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.competitor-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-400);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.competitor-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.competitor-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.competitor-info {
  flex: 1;
}

.competitor-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.competitor-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold-400);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.competitor-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.competitor-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.competitor-features-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.competitor-features-list li::before {
  content: '✓';
  color: var(--gold-400);
  font-weight: 800;
}

.competitor-redirect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.competitor-redirect-btn:hover {
  background: var(--gold-gradient);
  color: #000;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.legal-notice-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 215, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  margin-top: 1rem;
}

