/* ============================================================
   TikTokHub AI Video — Main Stylesheet (Dark Mode SaaS)
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --bg-base:        #0d0f14;
  --bg-card:        #151922;
  --bg-card-hover:  #1c2130;
  --bg-input:       #1a1f2e;
  --border:         #252d3d;
  --border-focus:   #5b6af0;

  --accent:         #5b6af0;
  --accent-hover:   #4a57d4;
  --accent-glow:    rgba(91, 106, 240, 0.25);

  --success:        #22c55e;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #38bdf8;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #4b5563;

  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      18px;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.6);
  --transition:     0.2s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(1.5rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.2rem, 3vw, 2rem);   font-weight: 700; }
h3 { font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 600; }
p  { color: var(--text-secondary); }

/* ── Layout ─────────────────────────────────────────────────── */
.container       { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.page-wrapper    { min-height: 100vh; display: flex; flex-direction: column; }
.page-content    { flex: 1; padding: 1.5rem 0; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: rgba(13,15,20,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 0 1rem;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: .75rem;
  height: 60px;
}
.navbar-brand {
  font-size: 1.1rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; white-space: nowrap; flex-shrink: 0;
}
.navbar-nav { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; flex-wrap: nowrap; }
.navbar-nav a {
  color: var(--text-secondary); padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm); font-size: 0.85rem;
  transition: all var(--transition); white-space: nowrap;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--text-primary); background: var(--bg-card);
}
.credit-badge {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff; padding: 0.25rem 0.65rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}

/* ── Mobile hamburger ───────────────────────────────────────── */
.navbar-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  color: var(--text-primary); border-radius: var(--radius-sm);
  padding: .4rem .6rem; cursor: pointer; font-size: 1.2rem;
  margin-left: auto; flex-shrink: 0; line-height: 1;
}
/* Mobile nav: hidden everywhere by default */
.navbar-mobile {
  display: none !important;
  flex-direction: column;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1rem;
  gap: .25rem;
}
/* Only shown on mobile AND when open */
.navbar-mobile a {
  color: var(--text-secondary); padding: .6rem .8rem;
  border-radius: var(--radius-sm); font-size: .9rem;
  transition: all var(--transition);
  display: flex; align-items: center; gap: .5rem;
}
.navbar-mobile a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.navbar-mobile .credit-badge { align-self: flex-start; margin: .25rem 0; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.stat-label { font-size: .78rem; color: var(--text-muted); margin-bottom: .25rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); }
.stat-sub   { font-size: .75rem; color: var(--text-secondary); margin-top: .25rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .55rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); border: 1px solid transparent;
  text-decoration: none; white-space: nowrap; vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-focus); }
.btn-gradient {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff; border: none;
}
.btn-gradient:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm       { padding: .35rem .75rem; font-size: .8rem; }
.btn-lg       { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-full, .w-full { width: 100%; }
.btn-full { justify-content: center; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group   { display: flex; flex-direction: column; gap: .35rem; }
.form-label   { font-size: .85rem; font-weight: 600; color: var(--text-secondary); }
.form-control {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  padding: .6rem .875rem; font-size: .9rem; font-family: inherit;
  transition: border-color var(--transition); width: 100%;
  -webkit-appearance: none;
}
.form-control:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* ── Grid ───────────────────────────────────────────────────── */
.grid   { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Flex helpers ───────────────────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1        { gap: .5rem; }
.gap-2        { gap: 1rem; }
.gap-3        { gap: 1.5rem; }

/* ── Text utilities ─────────────────────────────────────────── */
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .75rem; }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center  { text-align: center; }
.font-bold    { font-weight: 700; }
.hidden       { display: none !important; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .15rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.badge-success { background: rgba(34,197,94,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-error   { background: rgba(239,68,68,.15);  color: var(--danger); }
.badge-info    { background: rgba(56,189,248,.15);  color: var(--info); }
.badge-purple  { background: rgba(167,139,250,.15); color: #a78bfa; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: .875rem 1rem; border-radius: var(--radius-sm);
  font-size: .875rem; border-left: 3px solid;
}
.alert-info    { background: rgba(56,189,248,.1);  border-color: var(--info);    color: var(--info); }
.alert-success { background: rgba(34,197,94,.1);   border-color: var(--success); color: var(--success); }
.alert-error   { background: rgba(239,68,68,.1);   border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: rgba(245,158,11,.1);  border-color: var(--warning); color: var(--warning); }

/* ── Progress bar ───────────────────────────────────────────── */
.progress-bar { background: var(--bg-input); border-radius: 999px; height: 6px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--accent), #a78bfa); height: 100%; border-radius: 999px; transition: width .5s ease; }

/* ── Loader ─────────────────────────────────────────────────── */
.loader {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite;
}
.loader-sm {
  display: inline-block;
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton ───────────────────────────────────────────────── */
.skeleton { background: var(--bg-card); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Toast ──────────────────────────────────────────────────── */
.toast-container, #toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; max-width: calc(100vw - 2rem); }
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .875rem;
  box-shadow: var(--shadow-lg); animation: toastIn .25s ease;
  display: flex; align-items: center; gap: .6rem; pointer-events: auto;
  max-width: 320px;
}
.toast.success, .toast-success { border-left: 3px solid var(--success); }
.toast.error, .toast-error     { border-left: 3px solid var(--danger); }
.toast.info, .toast-info       { border-left: 3px solid var(--info); }
.toast.warning, .toast-warning { border-left: 3px solid var(--warning); }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px); z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-header h3 { margin: 0; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; padding: .2rem .4rem; border-radius: var(--radius-sm); }
.modal-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
thead th { text-align: left; font-size: .78rem; color: var(--text-muted); padding: .6rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-card-hover); }

/* ── Divider ────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ── Video cards ────────────────────────────────────────────── */
.video-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all var(--transition);
}
.video-card:hover { border-color: var(--border-focus); transform: translateY(-2px); box-shadow: var(--shadow); }
.video-thumb { aspect-ratio: 9/16; background: var(--bg-input); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; max-height: 260px; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-placeholder { font-size: 3rem; color: var(--text-muted); }
.video-info { padding: .875rem; }
.video-title { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta  { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem clamp(2rem, 5vw, 3rem); }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3.5rem); margin-bottom: 1rem; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: .5rem; }

/* ── Pricing cards ──────────────────────────────────────────── */
.pricing-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem);
  position: relative; transition: all var(--transition);
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-amount { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }

/* ── Generate page ──────────────────────────────────────────── */
.generate-wrap { max-width: 760px; margin: 0 auto; }
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.style-option { display: none; }
.style-label {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem .5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: .85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  user-select: none;
  min-height: 80px;
  justify-content: center;
  touch-action: manipulation;
}
.style-label .style-icon { font-size: 1.5rem; line-height: 1; }
.style-option:checked + .style-label {
  border-color: var(--accent);
  background: rgba(91,106,240,.12);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.style-label:hover { border-color: var(--border-focus); color: var(--text-primary); }

.duration-grid { display: flex; gap: .75rem; flex-wrap: wrap; }
.duration-option { display: none; }
.duration-label {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  user-select: none;
  touch-action: manipulation;
  flex: 1; min-width: 80px; text-align: center;
}
.duration-label .cost { font-size: .7rem; color: var(--text-muted); font-weight: 400; }
.duration-option:checked + .duration-label {
  border-color: var(--accent);
  background: rgba(91,106,240,.12);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Admin ──────────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg-card); border-right: 1px solid var(--border);
  min-height: calc(100vh - 60px); padding: 1.5rem 1rem;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text-secondary); padding: .55rem .8rem;
  border-radius: var(--radius-sm); font-size: .875rem;
  transition: all var(--transition); margin-bottom: .2rem;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(91,106,240,.12); color: var(--accent);
}
.admin-main { flex: 1; padding: 1.5rem; overflow: auto; min-width: 0; }
.panel { display: none; }
.panel.active { display: block; }

/* ── Toggle ─────────────────────────────────────────────────── */
.toggle-wrap { width: 46px; height: 26px; background: rgba(255,255,255,.08); border-radius: 999px; border: 1px solid var(--border); cursor: pointer; position: relative; transition: background .25s,border-color .25s; flex-shrink: 0; }
.toggle { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: rgba(255,255,255,.35); border-radius: 50%; transition: transform .25s,background .25s; pointer-events: none; }
.toggle.on { transform: translateX(20px); background: #fff; }
.toggle-wrap.on { background: var(--danger); border-color: var(--danger); }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 5vw, 2.5rem); width: 100%; max-width: 420px; }

/* ── File upload ─────────────────────────────────────────────── */
.file-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2rem 1rem; text-align: center; cursor: pointer;
  transition: all var(--transition); color: var(--text-muted);
  position: relative;
}
.file-drop-zone:hover, .file-drop-zone.drag-over {
  border-color: var(--accent); background: rgba(91,106,240,.05);
  color: var(--text-secondary);
}
.file-drop-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-preview { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; display: flex; align-items: center; gap: .75rem; }
.file-preview .file-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-preview .file-info { flex: 1; min-width: 0; }
.file-preview .file-name { font-size: .875rem; font-weight: 600; truncate: ellipsis; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-preview .file-size { font-size: .75rem; color: var(--text-muted); }

/* ── Ebook builder ──────────────────────────────────────────── */
.ebook-builder { display: flex; flex-direction: column; gap: 1rem; }
.ebook-section {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.ebook-section-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ebook-section-handle { cursor: grab; color: var(--text-muted); font-size: 1.2rem; }

/* ── Series ─────────────────────────────────────────────────── */
.series-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all var(--transition);
}
.series-card:hover { border-color: var(--border-focus); box-shadow: var(--shadow); }
.series-thumb {
  aspect-ratio: 16/9; background: var(--bg-input);
  position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.series-thumb img { width: 100%; height: 100%; object-fit: cover; }
.series-thumb-placeholder { font-size: 2.5rem; }
.series-info { padding: 1rem; }
.series-title { font-weight: 700; margin-bottom: .4rem; font-size: 1rem; }
.series-meta  { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .8rem; }
.series-episodes { font-size: .78rem; color: var(--text-muted); }

/* ── Image base selector ────────────────────────────────────── */
.base-image-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.base-image-option {
  aspect-ratio: 1; border: 2px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  transition: all var(--transition); position: relative; background: var(--bg-input);
  display: flex; align-items: center; justify-content: center;
}
.base-image-option:hover { border-color: var(--accent); }
.base-image-option.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.base-image-option img { width: 100%; height: 100%; object-fit: cover; }
.base-image-option .check { position: absolute; top: .3rem; right: .3rem; background: var(--accent); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: none; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }
.base-image-option.selected .check { display: flex; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { width: 180px; }
}

@media (max-width: 768px) {
  /* Nav */
  .navbar-nav { display: none !important; }
  .navbar-toggle { display: flex !important; }
  /* Show mobile menu only on mobile when toggled open */
  .navbar-mobile.open { display: flex !important; }

  /* Grids */
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }

  /* Admin */
  .admin-wrap { flex-direction: column; }
  .admin-sidebar {
    width: 100%; min-height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: .75rem; display: flex; flex-wrap: wrap; gap: .25rem;
  }
  .admin-sidebar > div { display: none; }
  .admin-sidebar a { margin-bottom: 0; padding: .4rem .7rem; font-size: .8rem; }
  .admin-main { padding: 1rem; }

  /* Misc */
  .pricing-card { padding: 1.25rem; }
  .hero { padding: 3rem 1rem 1.5rem; }
  .modal { padding: 1.25rem; }
  .page-content { padding: 1rem 0; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .duration-grid { justify-content: stretch; }
  .duration-label { flex: 1; min-width: 70px; }
  .navbar-brand { font-size: .95rem; }
  .btn-lg { padding: .65rem 1.2rem; font-size: .9rem; }
  .modal { border-radius: var(--radius); }
  .base-image-selector { grid-template-columns: repeat(3, 1fr); }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
}
