/* ============================================= */
/* AdCreator AI — Premium Theme v2               */
/* ============================================= */

:root {
  --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #818cf8; --primary-bg: #eef2ff;
  --green: #059669; --green-dark: #047857; --green-light: #34d399; --green-bg: #ecfdf5;
  --surface: #ffffff; --bg: #f1f5f9; --bg-alt: #f8fafc;
  --border: #e2e8f0; --border-light: #f1f5f9;
  --text: #0f172a; --text-secondary: #475569; --text-muted: #94a3b8;
  --danger: #ef4444; --warning: #f59e0b; --cyan: #06b6d4;
  --radius: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.15);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
body.dark {
  --surface: #1e293b; --bg: #0f172a; --bg-alt: #1a2234;
  --border: #334155; --border-light: #1e293b;
  --text: #f1f5f9; --text-secondary: #cbd5e1; --text-muted: #64748b;
  --primary-bg: rgba(99,102,241,0.12); --green-bg: rgba(5,150,105,0.12);
  --shadow: 0 2px 8px rgba(0,0,0,0.3); --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-dark); }
button { cursor: pointer; font-family: inherit; transition: all var(--transition); }
input, select, textarea { font-family: inherit; transition: all var(--transition); }
.hidden { display: none !important; }

/* Animations */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes scoreIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes progressFill { from { width: 0; } }

/* ============================================= */
/* AUTH PAGE                                     */
/* ============================================= */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%); position: relative; overflow: hidden; }
.auth-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; opacity: 0.08; }
.shape-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; right: -150px; animation: pulse 8s ease-in-out infinite; }
.shape-2 { width: 400px; height: 400px; background: var(--green); bottom: -100px; left: -100px; animation: pulse 6s ease-in-out infinite 2s; }
.shape-3 { width: 300px; height: 300px; background: #ec4899; top: 50%; left: 50%; transform: translate(-50%,-50%); animation: pulse 10s ease-in-out infinite 4s; }
.auth-card { width: 100%; max-width: 420px; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border-radius: var(--radius-xl); padding: 40px 36px; box-shadow: var(--shadow-xl); position: relative; z-index: 1; animation: slideUp 0.5s ease-out; border: 1px solid rgba(255,255,255,0.2); }
.auth-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 28px; }
.auth-logo-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); display: flex; align-items: center; justify-content: center; color: #fff; }
.auth-logo-text { font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.auth-card h1 { font-size: 24px; font-weight: 700; text-align: center; color: #0f172a; letter-spacing: -0.5px; }
.auth-card .subtitle { text-align: center; color: #94a3b8; font-size: 14px; margin-bottom: 28px; margin-top: 4px; }
.auth-card .field { margin-bottom: 18px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.auth-card input { width: 100%; padding: 11px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 14px; outline: none; background: #f8fafc; color: #0f172a; }
.auth-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); background: #fff; }
.auth-card input::placeholder { color: #c1c9d4; }
.btn-primary { width: 100%; padding: 12px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,0.4); }
.btn-primary:disabled { opacity: 0.6; transform: none; }
.btn-arrow { transition: transform var(--transition); }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.toggle-link { margin-top: 20px; font-size: 14px; color: #94a3b8; text-align: center; }
.toggle-link a { font-weight: 600; }
.error-msg { background: #fef2f2; color: #b91c1c; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; border: 1px solid #fecaca; }

/* ============================================= */
/* VERTICAL SELECTOR                             */
/* ============================================= */
.vertical-overlay { position: fixed; inset: 0; background: linear-gradient(180deg, var(--bg-alt), var(--primary-bg)); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.vertical-container { max-width: 920px; width: 100%; text-align: center; animation: fadeIn 0.6s ease-out; }
.vertical-header-icon { margin-bottom: 16px; }
.vertical-container h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.8px; margin-bottom: 8px; }
.vertical-container .subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 40px; }
.vertical-cards { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.vertical-card { flex: 1 1 360px; max-width: 430px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-xl); padding: 32px 28px; cursor: pointer; text-align: left; transition: all 0.3s; position: relative; overflow: hidden; }
.vc-glow { position: absolute; width: 200px; height: 200px; border-radius: 50%; opacity: 0; transition: opacity 0.4s; filter: blur(60px); pointer-events: none; }
.vc-glow-ec { background: var(--primary); top: -80px; right: -60px; }
.vc-glow-re { background: var(--green); top: -80px; right: -60px; }
.vertical-card:hover .vc-glow { opacity: 0.12; }
.vertical-card:hover { border-color: #c7d2fe; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vertical-card .card-icon { color: var(--primary); margin-bottom: 16px; }
.vertical-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.vc-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.vc-features { list-style: none; padding: 0; margin-bottom: 16px; }
.vc-features li { font-size: 13px; color: var(--text-secondary); padding: 5px 0; border-top: 1px solid var(--border-light); display: flex; align-items: center; gap: 6px; }
.vc-features li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.vc-select-label { font-size: 14px; font-weight: 600; color: var(--primary); opacity: 0; transition: opacity var(--transition); }
.vertical-card:hover .vc-select-label { opacity: 1; }
.vertical-card.selected-ec { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-color: var(--primary-dark); color: #fff; transform: scale(1.02); box-shadow: 0 12px 40px rgba(99,102,241,0.35); }
.vertical-card.selected-ec h2, .vertical-card.selected-ec .vc-desc, .vertical-card.selected-ec .vc-features li, .vertical-card.selected-ec .vc-select-label, .vertical-card.selected-ec .card-icon { color: #fff; }
.vertical-card.selected-ec .vc-features li::before { background: rgba(255,255,255,0.6); }
.vertical-card.selected-re { background: linear-gradient(135deg, var(--green), var(--green-dark)); border-color: var(--green-dark); color: #fff; transform: scale(1.02); box-shadow: 0 12px 40px rgba(5,150,105,0.35); }
.vertical-card.selected-re h2, .vertical-card.selected-re .vc-desc, .vertical-card.selected-re .vc-features li, .vertical-card.selected-re .vc-select-label, .vertical-card.selected-re .card-icon { color: #fff; }
.vertical-card.selected-re .vc-features li::before { background: rgba(255,255,255,0.6); }

/* ============================================= */
/* LAYOUT                                        */
/* ============================================= */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--surface); border-right: 1px solid var(--border); height: 100vh; position: fixed; left: 0; top: 0; display: flex; flex-direction: column; padding: 20px 14px; z-index: 100; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px; margin-bottom: 6px; }
.sidebar .logo-icon { font-size: 24px; } .sidebar .logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.5px; }
.sidebar .vertical-badge { margin: 0 10px 18px; padding: 6px 12px; background: var(--bg); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-align: center; text-transform: uppercase; letter-spacing: 0.02em; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar .nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: none; border: none; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-secondary); cursor: pointer; text-align: left; width: 100%; position: relative; }
.sidebar .nav-item:hover { background: var(--bg); color: var(--text); }
.sidebar .nav-item.active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
.sidebar .nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: var(--primary); border-radius: 0 4px 4px 0; }
.sidebar .usage-box { padding: 14px; background: linear-gradient(135deg, var(--bg), var(--primary-bg)); border-radius: var(--radius); border: 1px solid var(--border); }
.sidebar .usage-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.sidebar .usage-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.sidebar .usage-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 3px; transition: width 0.5s; }
.sidebar .plan-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.sidebar .dark-toggle { margin-top: 8px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--text-muted); width: 100%; text-align: center; }
.sidebar .dark-toggle:hover { border-color: var(--primary); color: var(--primary); }
.main-content { margin-left: 260px; flex: 1; padding: 28px 32px; max-width: 960px; animation: fadeIn 0.3s ease-out; }

/* ============================================= */
/* UPGRADE BANNER                                */
/* ============================================= */
.upgrade-banner { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: var(--radius); margin-bottom: 24px; }
.upgrade-banner .text { font-size: 14px; font-weight: 600; color: #92400e; }
.upgrade-banner .btn { padding: 8px 18px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 6px rgba(245,158,11,0.3); }

/* ============================================= */
/* FORMS                                         */
/* ============================================= */
.form-card { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 24px; }
.form-card .form-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.form-card .form-header h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.4px; }
.form-card .form-header .icon { font-size: 28px; }
.form-section { margin-bottom: 18px; }
.form-section label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-section input, .form-section select, .form-section textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; background: var(--bg-alt); color: var(--text); }
.form-section input:focus, .form-section select:focus, .form-section textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); background: var(--surface); }
.form-section input::placeholder { color: var(--text-muted); }
.form-row { display: flex; gap: 14px; margin-bottom: 18px; } .form-row > div { flex: 1; }
.form-row-3 { display: flex; gap: 12px; margin-bottom: 18px; } .form-row-3 > div { flex: 1; }

/* Chips */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 18px; border: 1.5px solid var(--border); border-radius: 24px; background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-secondary); }
.chip:hover { border-color: #c7d2fe; background: var(--primary-bg); color: var(--primary); }
.chip.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(99,102,241,0.25); }
.chip.active-green { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; border-color: var(--green); box-shadow: 0 2px 8px rgba(5,150,105,0.25); }

/* Templates */
.template-section { margin-bottom: 24px; padding: 16px 18px; background: var(--primary-bg); border-radius: var(--radius); border: 1px solid #ddd6fe; }
.template-section.re { background: var(--green-bg); border-color: #a7f3d0; }
.template-section h3 { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.template-btn { padding: 8px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text-secondary); font-weight: 500; }
.template-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Generate button */
.btn-generate { width: 100%; padding: 15px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; box-shadow: 0 4px 14px rgba(99,102,241,0.3); }
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.4); }
.btn-generate:disabled { opacity: 0.6; transform: none; }
.btn-generate.green { background: linear-gradient(135deg, var(--green), var(--green-dark)); box-shadow: 0 4px 14px rgba(5,150,105,0.3); }

/* ============================================= */
/* GENERATION PROGRESS                           */
/* ============================================= */
.gen-progress { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px; text-align: center; animation: fadeIn 0.3s; }
.gen-progress h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.gen-steps { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; }
.gen-step { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.gen-step.active { color: var(--primary); }
.gen-step.done { color: var(--green); }
.gen-step-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.gen-step.active .gen-step-dot { border-color: var(--primary); background: var(--primary-bg); animation: pulse 1.5s infinite; }
.gen-step.done .gen-step-dot { border-color: var(--green); background: var(--green-bg); }
.gen-progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.gen-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 2px; transition: width 0.5s; }

/* ============================================= */
/* AD OUTPUT                                     */
/* ============================================= */
.output-header { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 18px; flex-wrap: wrap; gap: 10px; }
.output-header h2 { font-size: 21px; font-weight: 700; }
.output-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-regen, .btn-export, .btn-copyall { display: flex; align-items: center; gap: 6px; padding: 9px 18px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.btn-regen:hover, .btn-export:hover, .btn-copyall:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* Variant tabs */
.variant-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--bg); border-radius: 10px; padding: 4px; }
.variant-tab { flex: 1; padding: 8px; border: none; background: none; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; text-align: center; }
.variant-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Variant card */
.variant-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); animation: fadeIn 0.4s ease-out; transition: box-shadow var(--transition); }
.variant-card:hover { box-shadow: var(--shadow-md); }
.variant-card .badges { display: flex; gap: 8px; margin-bottom: 16px; }
.variant-card .badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.variant-card .badge-v { background: var(--primary-bg); color: var(--primary); }
.variant-card .badge-p { background: #f0f9ff; color: #0284c7; }
.variant-card .field-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.variant-card .field-value { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 14px; }
.variant-card .actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-light); flex-wrap: wrap; }
.btn-action { display: flex; align-items: center; gap: 5px; padding: 7px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.btn-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.btn-action.saved { background: var(--green-bg); border-color: #86efac; color: var(--green); }
.char-warning { font-size: 11px; color: var(--warning); margin-top: 2px; font-weight: 500; }
.char-count { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.char-count.over { color: var(--danger); font-weight: 600; }

/* ============================================= */
/* AD SCORE                                      */
/* ============================================= */
.ad-score { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--bg); border-radius: var(--radius); margin-bottom: 16px; }
.score-circle { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0; animation: scoreIn 0.5s ease-out; }
.score-circle.high { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.score-circle.mid { background: linear-gradient(135deg, var(--warning), #d97706); }
.score-circle.low { background: linear-gradient(135deg, var(--danger), #dc2626); }
.score-details { flex: 1; }
.score-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.score-bar-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.score-bar-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 2px; animation: progressFill 0.8s ease-out; }
.score-tip { font-size: 12px; color: var(--text-secondary); font-style: italic; margin-top: 6px; }

/* ============================================= */
/* PLATFORM MOCKUPS                              */
/* ============================================= */
.mockup-toggle { display: flex; gap: 4px; margin-bottom: 12px; }
.mockup-btn { padding: 6px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.mockup-btn.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }

.mockup-frame { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; background: var(--surface); }

/* Facebook mockup */
.fb-mockup { font-family: -apple-system, Helvetica, Arial, sans-serif; }
.fb-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.fb-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--cyan)); }
.fb-meta { font-size: 12px; }
.fb-name { font-weight: 600; color: var(--text); }
.fb-sponsored { font-size: 11px; color: var(--text-muted); }
.fb-body { padding: 0 12px 10px; font-size: 13px; line-height: 1.5; color: var(--text); }
.fb-image { width: 100%; height: 200px; background: linear-gradient(135deg, #e0e7ff, #c7d2fe); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 14px; font-weight: 600; }
.fb-cta-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); }
.fb-headline { font-size: 14px; font-weight: 600; color: var(--text); }
.fb-desc { font-size: 12px; color: var(--text-muted); }
.fb-cta-btn { padding: 6px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text); }

/* Google mockup */
.google-mockup { padding: 16px; font-family: Arial, sans-serif; }
.google-ad-label { font-size: 11px; font-weight: 700; color: var(--text); background: var(--bg); display: inline-block; padding: 1px 6px; border-radius: 4px; margin-bottom: 4px; border: 1px solid var(--border); }
.google-headline { font-size: 18px; color: #1a0dab; font-weight: 400; margin-bottom: 2px; cursor: pointer; }
body.dark .google-headline { color: #8ab4f8; }
.google-url { font-size: 13px; color: #006621; margin-bottom: 4px; }
body.dark .google-url { color: #bdc1c6; }
.google-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* Instagram mockup */
.ig-mockup { font-family: -apple-system, Helvetica, Arial, sans-serif; }
.ig-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.ig-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6); }
.ig-name { font-size: 13px; font-weight: 600; }
.ig-image { width: 100%; height: 220px; background: linear-gradient(135deg, #fce7f3, #ede9fe); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--primary); font-weight: 600; }
.ig-body { padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--text); }
.ig-cta { display: block; text-align: center; padding: 8px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; }

/* ============================================= */
/* STAT CARDS                                    */
/* ============================================= */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }

/* ============================================= */
/* PRICING                                       */
/* ============================================= */
.pricing-page { max-width: 1020px; margin: 0 auto; padding: 20px 0; }
.pricing-page h1 { font-size: 32px; font-weight: 800; text-align: center; letter-spacing: -0.8px; margin-bottom: 6px; }
.pricing-page .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 40px; font-size: 16px; }
.pricing-grid { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.plan-card { flex: 1 1 260px; max-width: 320px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-xl); padding: 30px 24px; position: relative; display: flex; flex-direction: column; transition: all 0.3s; box-shadow: var(--shadow); }
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.popular { border-color: #8b5cf6; box-shadow: 0 8px 30px rgba(139,92,246,0.18); }
.plan-card.current { border-color: var(--green); background: var(--green-bg); }
.plan-card .popular-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; padding: 5px 18px; border-radius: 20px; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(139,92,246,0.3); }
.plan-card .plan-top { text-align: center; margin-bottom: 20px; }
.plan-card .plan-name { font-size: 20px; font-weight: 700; margin: 8px 0 2px; }
.plan-card .plan-price { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.plan-card .plan-period { font-size: 16px; color: var(--text-muted); }
.plan-card .plan-gens { display: inline-block; margin-top: 8px; padding: 4px 14px; background: var(--bg); border-radius: 20px; font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.plan-card .feature-list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-card .feature-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--text-secondary); }
.plan-card .feature-list li::before { content: '✓'; color: var(--primary); font-weight: 700; }
.btn-subscribe { width: 100%; padding: 13px; color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.btn-subscribe:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.btn-subscribe:disabled { transform: none; opacity: 0.7; }

/* ============================================= */
/* ACCOUNT                                       */
/* ============================================= */
.account-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.account-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.info-row .label { color: var(--text-muted); font-weight: 500; } .info-row .value { font-weight: 600; }
.status-badge { padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-badge.active { background: #dcfce7; color: #15803d; } .status-badge.cancelled { background: #fef2f2; color: #b91c1c; }
.usage-bar-lg { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.usage-bar-lg .fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.btn-small { padding: 9px 22px; border-radius: 10px; font-size: 14px; font-weight: 600; border: none; }
.btn-small.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 2px 6px rgba(99,102,241,0.2); }
.btn-small.secondary { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-small.danger { background: var(--surface); color: var(--danger); border: 1px solid #fca5a5; }

/* PayPal pages */
.paypal-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(180deg, var(--bg-alt), var(--primary-bg)); }
.paypal-page .content { text-align: center; max-width: 420px; animation: fadeIn 0.5s; }
.pp-icon { margin-bottom: 8px; } .paypal-page h2 { font-size: 26px; font-weight: 700; margin-top: 12px; }
.paypal-page p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-top: 8px; }
.pp-loader { width: 200px; height: 4px; background: var(--border); border-radius: 2px; margin: 20px auto 0; overflow: hidden; }
.pp-loader-bar { width: 40%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 2px; animation: shimmer 1.5s linear infinite; background-size: 200% 100%; }

/* ============================================= */
/* TOAST NOTIFICATIONS                           */
/* ============================================= */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; padding: 14px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: 380px; animation: toastIn 0.3s ease; box-shadow: 0 8px 30px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--primary); color: #fff; }
.toast.warning { background: var(--warning); color: #1a1a2e; }
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ============================================= */
/* CONFIRM MODAL                                 */
/* ============================================= */
.confirm-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 99998; animation: fadeIn 0.2s; }
.confirm-box { background: var(--surface); border-radius: 16px; padding: 32px; max-width: 380px; width: 90%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.dark .confirm-box { background: #1e293b; }
.confirm-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.confirm-box p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.confirm-box .actions { display: flex; gap: 10px; justify-content: center; }
.confirm-box .actions button { padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; }
.confirm-box .btn-confirm-danger { background: var(--danger); color: #fff; }
.confirm-box .btn-confirm-cancel { background: var(--bg); color: var(--text-secondary); }
.dark .confirm-box .btn-confirm-cancel { background: rgba(255,255,255,0.1); color: #94a3b8; }

/* ============================================= */
/* MOBILE HEADER BAR                             */
/* ============================================= */
.mobile-header { display: none; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.dark .mobile-header { background: #0f172a; border-color: rgba(255,255,255,0.06); }
.mobile-header .logo { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.mobile-menu-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 18px; cursor: pointer; color: var(--text); }
.dark .mobile-menu-btn { border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
.sidebar.mobile-open { display: flex !important; position: fixed; top: 0; left: 0; bottom: 0; z-index: 999; width: 260px; box-shadow: 8px 0 30px rgba(0,0,0,0.3); }
.mobile-sidebar-backdrop { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 998; }
.mobile-sidebar-backdrop.show { display: block; }

/* ============================================= */
/* RESPONSIVE                                    */
/* ============================================= */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding: 16px; padding-top: 8px; }
  .vertical-cards { flex-direction: column; align-items: center; }
  .pricing-grid { flex-direction: column; align-items: center; }
  .form-row, .form-row-3 { flex-direction: column; }
  .gen-steps { gap: 16px; }
  .score-bars { grid-template-columns: 1fr; }
  .output-header { flex-direction: column; align-items: flex-start; }
  .variant-card { padding: 16px; }
  .form-card { padding: 16px; }
  h2 { font-size: 22px !important; }
  .btn-generate { font-size: 15px; padding: 14px; }
  .toast-container { left: 12px; right: 12px; top: auto; bottom: 20px; }
  .toast { max-width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
