/* =============================================================
   OF Script Generator — Design System
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Variables ------------------------------------------------ */
:root {
  --bg           : #0a0a0f;
  --sidebar-bg   : #111118;
  --card-bg      : #1a1a2e;
  --card-border  : #2a2a4a;
  --accent-violet: #7c3aed;
  --accent-rose  : #ec4899;
  --accent-violet-hover: #6d28d9;
  --accent-rose-hover  : #db2777;
  --text-primary : #f8f8f8;
  --text-secondary:#9999bb;
  --text-muted   : #5a5a7a;
  --success      : #10b981;
  --error        : #ef4444;
  --warning      : #f59e0b;
  --radius       : 12px;
  --radius-sm    : 8px;
  --radius-lg    : 16px;
  --transition   : 200ms ease;
  --sidebar-w    : 250px;
  --shadow-card  : 0 4px 24px rgba(0,0,0,.4);
  --shadow-glow  : 0 0 32px rgba(124,58,237,.15);
}

/* --- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-violet); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-rose); }

ul, ol { list-style: none; }

img, svg { display: block; }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* --- Scrollbar ------------------------------------------------ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--sidebar-bg); }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-violet); }

/* =============================================================
   Layout — App Dashboard
   ============================================================= */
#app {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar -------------------------------------------------- */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--card-border);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(270deg, var(--accent-violet), var(--accent-rose), #a855f7, var(--accent-violet));
  background-size: 250% 250%;
  animation: gradientShift 5s ease infinite;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin: 16px 0 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.05);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(124,58,237,.15);
}

.nav-item.active svg {
  color: var(--accent-violet);
}

.nav-item svg {
  flex-shrink: 0;
  transition: color var(--transition);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--card-border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(270deg, var(--accent-violet), var(--accent-rose), #a855f7, var(--accent-violet));
  background-size: 250% 250%;
  animation: gradientShift 5s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-info { overflow: hidden; }

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-logout:hover {
  color: var(--error);
  background: rgba(239,68,68,.1);
}

/* --- Main content -------------------------------------------- */
#main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  overflow-y: auto;
}

/* --- Views ---------------------------------------------------- */
.view {
  display: none;
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn .2s ease;
}

.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: 28px;
}

.view-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.view-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* =============================================================
   Cards
   ============================================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-sm { padding: 16px 20px; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--accent-violet); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.violet { background: rgba(124,58,237,.15); color: var(--accent-violet); }
.stat-icon.rose   { background: rgba(236,72,153,.15); color: var(--accent-rose); }
.stat-icon.green  { background: rgba(16,185,129,.15); color: var(--success); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Trial card */
.trial-card {
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(236,72,153,.08));
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.trial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.trial-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.trial-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .04em;
}

.trial-badge.trial  { background: rgba(124,58,237,.2); color: #a78bfa; }
.trial-badge.active { background: rgba(16,185,129,.2); color: #6ee7b7; }
.trial-badge.expired{ background: rgba(239,68,68,.2);  color: #fca5a5; }

.trial-progress-bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.trial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-rose));
  border-radius: 3px;
  transition: width .6s ease;
}

.trial-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Result cards */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.result-card {
  background: rgba(26,26,46,.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition);
}

.result-card:hover { border-color: rgba(124,58,237,.4); }

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.result-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
}

.badge-violet { background: rgba(124,58,237,.12); color: #a78bfa; border-color: rgba(124,58,237,.3); }
.badge-rose   { background: rgba(236,72,153,.12); color: #f9a8d4; border-color: rgba(236,72,153,.3); }
.badge-green  { background: rgba(16,185,129,.12); color: #6ee7b7; border-color: rgba(16,185,129,.3); }

.result-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.result-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* =============================================================
   Forms
   ============================================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-label span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.form-control {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control.error { border-color: var(--error); }

select.form-control {
  appearance: none;
  background-color: var(--card-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239999bb' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

select.form-control option {
  background: var(--card-bg);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .form-control { padding-right: 44px; }

.input-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.input-toggle-btn:hover { color: var(--text-primary); }

/* Radio cards */
.radio-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-card {
  position: relative;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  min-width: 80px;
  text-align: center;
}

.radio-card label .platform-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-card input:checked + label {
  border-color: var(--accent-violet);
  background: rgba(124,58,237,.12);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--accent-violet);
}

.radio-card label:hover {
  border-color: rgba(124,58,237,.4);
  color: var(--text-primary);
}

/* Toggle FR/EN */
.lang-toggle {
  display: flex;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}

.lang-toggle button {
  padding: 9px 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-toggle button.active {
  background: var(--accent-violet);
  color: #fff;
}

/* Variations selector */
.variations-selector {
  display: flex;
  gap: 8px;
}

.var-btn {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.var-btn.active, .var-btn:hover {
  border-color: var(--accent-violet);
  background: rgba(124,58,237,.12);
  color: var(--text-primary);
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(270deg, var(--accent-violet), var(--accent-rose), #a855f7, var(--accent-violet));
  background-size: 250% 250%;
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
  animation: gradientShift 5s ease infinite;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.06);
}

.btn-danger {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--error);
}

.btn-danger:hover {
  background: rgba(239,68,68,.2);
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: rgba(255,255,255,.12);
  color: var(--text-primary);
}

.btn-icon.copied {
  color: var(--success);
  border-color: rgba(16,185,129,.3);
}

.btn:disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

/* Generate button full width */
.btn-generate {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  margin-top: 24px;
}

/* Quick action buttons */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* =============================================================
   Spinner / Loader
   ============================================================= */
.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.spinner-lg {
  width: 32px;
  height: 32px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* =============================================================
   Table (Historique)
   ============================================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead { background: rgba(255,255,255,.03); }

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--card-border);
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(42,42,74,.5);
  color: var(--text-primary);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover { background: rgba(255,255,255,.02); }

.td-preview {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.td-type {
  white-space: nowrap;
}

.history-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn.active {
  background: rgba(124,58,237,.15);
  border-color: var(--accent-violet);
  color: var(--text-primary);
}

.filter-btn:hover { color: var(--text-primary); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg { margin: 0 auto 16px; opacity: .4; }

.empty-state p { font-size: 14px; }

/* =============================================================
   Alert / Toast / Banner
   ============================================================= */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: #fcd34d; }
.alert-info    { background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.3); color: #c4b5fd; }

.alert svg { flex-shrink: 0; }

.trial-expired-banner {
  background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(236,72,153,.08));
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.trial-expired-banner.hidden { display: none; }

.banner-text { font-size: 14px; font-weight: 500; }
.banner-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.banner-desc  { color: var(--text-secondary); font-size: 13px; }

/* Toast notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: slideIn .25s ease;
  max-width: 340px;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast-success { background: #0d2e24; border: 1px solid rgba(16,185,129,.4); color: #6ee7b7; }
.toast-error   { background: #2e0d0d; border: 1px solid rgba(239,68,68,.4);  color: #fca5a5; }
.toast-info    { background: #1a1240; border: 1px solid rgba(124,58,237,.4); color: #c4b5fd; }

/* =============================================================
   Settings page
   ============================================================= */
.settings-section {
  margin-bottom: 32px;
}

.settings-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
}

.danger-zone {
  background: rgba(239,68,68,.04);
  border: 1px solid rgba(239,68,68,.15);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.danger-zone .settings-section-title {
  color: var(--error);
  border-color: rgba(239,68,68,.2);
}

/* =============================================================
   Landing Page / Auth pages
   ============================================================= */
.page-landing, .page-auth {
  min-height: 100vh;
}

/* Landing hero */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.landing-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(270deg, var(--accent-violet), var(--accent-rose), #a855f7, var(--accent-violet));
  background-size: 250% 250%;
  animation: gradientShift 5s ease infinite;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-nav-links {
  display: flex;
  gap: 8px;
}

.hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #c4b5fd;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.gradient-text {
  background: linear-gradient(270deg, var(--accent-violet), var(--accent-rose), #a855f7, var(--accent-rose), var(--accent-violet));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Benefits */
.benefits {
  padding: 60px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.benefit-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}

.benefit-card:hover {
  border-color: rgba(124,58,237,.4);
  transform: translateY(-3px);
}

.benefit-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.benefit-icon.v { background: rgba(124,58,237,.15); color: var(--accent-violet); }
.benefit-icon.r { background: rgba(236,72,153,.15); color: var(--accent-rose); }
.benefit-icon.g { background: rgba(16,185,129,.15); color: var(--success); }

.benefit-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.benefit-card p  { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Pricing */
.pricing {
  padding: 60px 24px 80px;
  max-width: 520px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid rgba(124,58,237,.4);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.pricing-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-violet);
  margin-bottom: 16px;
}

.pricing-price {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}

.pricing-price sup { font-size: 24px; font-weight: 600; vertical-align: super; }
.pricing-period { font-size: 14px; color: var(--text-secondary); margin: 6px 0 24px; }

.pricing-features {
  text-align: left;
  margin-bottom: 28px;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(42,42,74,.5);
}

.pricing-feature:last-child { border-bottom: none; }

.pricing-feature svg { color: var(--success); flex-shrink: 0; }

.pricing-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(124,58,237,.1) 0%, transparent 60%);
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(270deg, var(--accent-violet), var(--accent-rose), #a855f7, var(--accent-violet));
  background-size: 250% 250%;
  animation: gradientShift 5s ease infinite;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.auth-form .form-group { margin-bottom: 16px; }

.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-links a { font-weight: 500; }

.auth-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #6ee7b7;
  margin-bottom: 20px;
}

.auth-badge svg { flex-shrink: 0; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  #sidebar {
    transform: translateX(-250px);
    width: 250px;
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 0 100vw rgba(0,0,0,.5);
  }

  #main-content { margin-left: 0; }

  .view { padding: 20px 16px; }

  .form-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; }

  .btn-generate { font-size: 14px; padding: 13px 20px; }

  .mobile-menu-btn {
    display: flex !important;
  }

  .landing-nav { padding: 16px 20px; }

  .auth-card { padding: 28px 20px; }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  padding: 8px;
  background: var(--sidebar-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

/* Overlay mobile */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
}

#sidebar-overlay.active { display: block; }

/* =============================================================
   Misc utilities
   ============================================================= */
.hidden { display: none !important; }

.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.divider {
  height: 1px;
  background: var(--card-border);
  margin: 20px 0;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
