/* ===========================
   Star Wars Character Watch Guide
   Shared Global Styles
   =========================== */

/* ===========================
   TYPE SCALE - DO NOT MODIFY
   ===========================
   Use ONLY these font sizes throughout the site:

   12px - Small (labels, captions, meta info)
   14px - Body small (compact UI, secondary text)
   16px - Body (default text, navigation)
   20px - Body large (emphasized content)
   24px - Heading small (card titles, section labels)
   32px - Heading medium (page sections)
   48px+ - Heading large (hero titles, requires approval)

   For sizes >48px, discuss before adding.
   =========================== */

/* CSS Variables */
:root {
  /* ===========================
     8px Grid Spacing System
     Following Design System Principles
     =========================== */
  --space-0-5: 4px;     /* Tight - icon/text gaps only */
  --space-1: 8px;       /* Base unit */
  --space-1-5: 12px;    /* Compact */
  --space-2: 16px;      /* Comfortable */
  --space-3: 24px;      /* Breathing room */
  --space-4: 32px;      /* Clear separation */
  --space-5: 40px;      /* Distinct sections */
  --space-6: 48px;      /* Major sections */
  --space-8: 64px;      /* Page-level */
  --space-10: 80px;     /* Hero sections */
  --space-12: 96px;
  --space-15: 120px;
  --space-16: 128px;
  --space-20: 160px;
  --space-24: 192px;

  /* Semantic Spacing - Atomic Design Hierarchy */
  --padding-atom: var(--space-1);          /* 8px - buttons, inputs */
  --padding-molecule: var(--space-2);      /* 16px - form fields */
  --padding-organism: var(--space-2);      /* 16px - cards (mobile) */
  --padding-organism-md: var(--space-3);   /* 24px - cards (tablet) */
  --padding-organism-lg: var(--space-6);   /* 48px - cards (desktop) */

  /* Gap Tokens */
  --gap-tight: var(--space-0-5);    /* 4px - icon/text */
  --gap-base: var(--space-1);       /* 8px - default */
  --gap-form: var(--space-2);       /* 16px - form elements */
  --gap-component: var(--space-3);  /* 24px - between components */
  --gap-section: var(--space-6);    /* 48px - between sections */

  /* Arcwise / Beacon accent — flagged key episodes only */
  --gold: #E3A63E;

  /* Theme-aware semantic colors - Dark mode (default) */
  --bg-primary: #15130F;
  --bg-secondary: rgba(21, 19, 15, 0.6);
  --bg-elevated: #221F19;

  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.6);  /* dimmed white, not a warm grey */
  --text-inverse: #15130F;

  --surface-primary: #221F19;
  --surface-secondary: #2B2720;
  --surface-elevated: #332E25;

  /* Content-type indicators (movie vs. TV) — neutral, not decorative */
  --movie-color: var(--text-primary);          /* legacy name; it's just white */
  --tv-color: rgba(255, 255, 255, 0.55);       /* legacy name; dimmed white */

  /* Borders */
  --border-primary: rgba(255, 255, 255, 0.18); /* neutral, no warm cast */
  --border-hover: rgba(227,166,62,0.35);
  --border-focus: rgba(227,166,62,0.5);

  /* Legacy aliases for backward compatibility */
  --bg: var(--bg-primary);
  --bg2: var(--bg-secondary);
  --text: var(--text-primary);
  --text-dim: var(--text-secondary);
  --border: var(--border-primary);

  /* ===========================
     Line Length Standards
     Based on Apple/Google best practices: 50-75 characters optimal
     Calculated at ~65 characters per line for readability
     =========================== */

  /* Large text (20-24px): ~700px = 65 chars */
  --line-length-large: 700px;

  /* Body text (16-18px): ~650px = 65 chars */
  --line-length-body: 650px;

  /* Small text (14-15px): ~580px = 70 chars */
  --line-length-small: 580px;

  /* Narrow (12-13px): ~500px = 75 chars */
  --line-length-narrow: 500px;
}

/* Prevent flash of untranslated content (FOUC) */
html.i18n-loading [data-i18n],
html.i18n-loading [data-i18n-placeholder],
html.i18n-loading .browse-button,
html.i18n-loading .lang-switcher,
html.i18n-loading .nav-link,
html.i18n-loading .nav-logo,
html.i18n-loading .content-section,
html.i18n-loading .featured-section,
html.i18n-loading .about-section {
  opacity: 0;
  transition: opacity 0.15s ease-in;
}

html:not(.i18n-loading) [data-i18n],
html:not(.i18n-loading) [data-i18n-placeholder],
html:not(.i18n-loading) .browse-button,
html:not(.i18n-loading) .lang-switcher,
html:not(.i18n-loading) .nav-link,
html:not(.i18n-loading) .nav-logo,
html:not(.i18n-loading) .content-section,
html:not(.i18n-loading) .featured-section,
html:not(.i18n-loading) .about-section {
  opacity: 1;
  transition: opacity 0.15s ease-out;
}

/* ===========================
   Premium Page Loader
   =========================== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

.page-loader.hidden {
  opacity: 0;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--movie-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fade-in animation for loaded content */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image loading states */
img {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

img.loaded {
  opacity: 1;
}

/* Hero background images should be visible immediately */
.hero-background img,
.watch-hero img,
.timeline-hero img,
.about-hero img {
  opacity: 0.5 !important;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Public Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===========================
   Typography - Line Length Standards
   Applied to base elements for universal readability
   =========================== */

/* Body text elements (16-18px) */
p,
.text-body {
  max-width: var(--line-length-body);
}

/* List items */
li {
  max-width: var(--line-length-body);
}

/* Small text (14-15px) */
small,
.text-small {
  max-width: var(--line-length-small);
}

/* Large text (20-24px) */
.text-large {
  max-width: var(--line-length-large);
}

/* Override: Full width when needed */
.text-full {
  max-width: none;
}

/* Override: Headings don't get line length limits */
h1, h2, h3, h4, h5, h6 {
  max-width: none;
}

/* Override: Cards and constrained containers are their own width constraints */
.feature-card p,
.feature-card li,
.info-card p,
.info-card li,
.card p,
.card li {
  max-width: none;
}

/* Navigation */
/* Skip to main content - visually hidden but accessible */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--bg);
  color: var(--text);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  gap: var(--gap-section);
  border-bottom: 1px solid var(--border);
}

.mobile-search-bar {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 9999;
  width: 100%;
  margin-top: -64px;
  margin-bottom: var(--space-5);
  flex-wrap: nowrap;
}

.nav-links {
  display: flex;
  gap: var(--gap-base);
  flex-wrap: nowrap;
  flex: 1;
  align-items: center;
}

.nav-logo {
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: var(--space-1) 0;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.nav-logo-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--movie-color);
}

.nav-logo:focus {
  outline: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: var(--space-1) var(--space-2);
  min-height: 48px;
  white-space: nowrap;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-decoration: none;
  line-height: 1.5;
  position: relative;
}

.nav-link:hover {
  color: var(--movie-color);
}

.nav-link:focus {
  outline: none;
}

.nav-link.primary {
  color: var(--text-dim);
}

.nav-link.primary:hover {
  color: var(--movie-color);
}

/* Navigation Search Bar - Amazon Style (Dark Mode) */
.nav-search-wrapper {
  flex: 1;
  max-width: 100%;
  position: relative;
  margin-left: var(--space-4);
  margin-right: var(--space-4);
}

.nav-search-input {
  width: 100%;
  padding: var(--space-1) var(--space-3);
  background: var(--surface-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  min-height: 48px;
}

.nav-search-input::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

.nav-search-input:hover {
  background: var(--surface-elevated);
  border-color: var(--border-hover);
}

.nav-search-input:focus {
  background: var(--surface-elevated);
  border-color: var(--border-focus);
}

/* Navigation Search Autocomplete */
.nav-search-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface-elevated);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: none;
  width: 100%;
}

.nav-search-autocomplete.show {
  display: block;
}

/* Navigation Search Autocomplete Items - Same styling as homepage search */
.nav-search-autocomplete .autocomplete-item {
  padding: var(--space-2);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.nav-search-autocomplete .autocomplete-item:last-child {
  border-bottom: none;
}

.nav-search-autocomplete .autocomplete-item:hover,
.nav-search-autocomplete .autocomplete-item.selected {
  background: rgba(255, 255, 255, 0.1);
}

.nav-search-autocomplete .autocomplete-name {
  color: var(--text);
  font-weight: 500;
  text-align: left;
  width: 100%;
}

.nav-search-autocomplete .autocomplete-desc {
  color: var(--text-dim);
  font-size: 16px;
  margin-top: var(--gap-tight);
}

.nav-search-autocomplete .autocomplete-empty {
  padding: var(--space-2);
  text-align: center;
  color: var(--text-dim);
}

/* Legacy nav-autocomplete classes (keep for backwards compatibility) */
.nav-autocomplete-item {
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-autocomplete-item:hover,
.nav-autocomplete-item.highlighted {
  background: rgba(255, 255, 255, 0.15);
}

.nav-autocomplete-item:last-child {
  border-bottom: none;
}

.nav-autocomplete-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.nav-autocomplete-meta {
  font-size: 12px;
  color: var(--text-dim);
}

/* Browse Dropdown & Language Switcher - Shared Styles */
.browse-dropdown-wrapper,
.lang-switcher-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.browse-button,
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-base);
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-dim);
  padding: var(--space-1) var(--space-2);
  min-height: 48px;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-decoration: none;
  line-height: 1.5;
  position: relative;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.browse-button svg,
.lang-switcher svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.browse-button[aria-expanded="true"] svg,
.lang-switcher[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.browse-button:hover,
.lang-switcher:hover {
  color: var(--movie-color);
}

.browse-button:focus,
.lang-switcher:focus {
  outline: none;
}

.browse-button:focus-visible,
.lang-switcher:focus-visible {
  outline: none;
}

.browse-dropdown,
.lang-dropdown {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  background: rgba(10, 10, 15, 1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 1000;
  box-shadow:
    0 0 0 1px rgba(100,120,160,0.1),
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.browse-dropdown.show,
.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.browse-dropdown-link,
.lang-option {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-dim);
  padding: var(--space-1) var(--space-2);
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: left;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.browse-dropdown-link:hover,
.lang-option:hover {
  color: var(--movie-color);
}

.browse-dropdown-link:focus,
.lang-option:focus {
  outline: none;
}

/* Language Switcher */
.lang-switcher-wrapper {
  position: relative;
  display: inline-block;
}

.browse-button,
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-base);
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-dim);
  padding: var(--space-1) var(--space-2);
  min-height: 48px;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-decoration: none;
  line-height: 1.5;
  position: relative;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.browse-button svg,
.lang-switcher svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.browse-button[aria-expanded="true"] svg,
.lang-switcher[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.browse-button:hover,
.lang-switcher:hover {
  color: var(--movie-color);
}

.browse-button:focus,
.lang-switcher:focus {
  outline: none;
}

.browse-button:focus-visible,
.lang-switcher:focus-visible {
  outline: none;
}

.browse-dropdown,
.lang-dropdown {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  background: rgba(10, 10, 15, 1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 1000;
  box-shadow:
    0 0 0 1px rgba(100,120,160,0.1),
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.browse-dropdown.show,
.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.browse-dropdown-link,
.lang-option {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-dim);
  padding: var(--space-1) var(--space-2);
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: left;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.browse-dropdown-link:hover,
.lang-option:hover {
  color: var(--movie-color);
}

.browse-dropdown-link:focus,
.lang-option:focus {
  outline: none;
}

/* Theme Switcher - Matches Language Switcher Pattern */
.hamburger {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
  margin-left: auto;
  order: 3;
}

.hamburger span {
  display: block;
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger span:nth-child(1) {
  transform: translateY(-7px);
}

.hamburger span:nth-child(2) {
  transform: translateY(0);
}

.hamburger span:nth-child(3) {
  transform: translateY(7px);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* Typography */
h1 {
  font-family: 'Public Sans', sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
  word-break: keep-all;
  hyphens: none;
  overflow-wrap: break-word;
}

/* Allow CJK text to break naturally */
:lang(ja) h1,
:lang(zh) h1,
:lang(zh-Hans) h1,
:lang(zh-Hant) h1 {
  word-break: normal;
  overflow-wrap: anywhere;
}

h2 {
  font-family: 'Public Sans', sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-4);
  letter-spacing: 0.01em;
  line-height: 1.2;
  word-break: keep-all;
  hyphens: none;
  overflow-wrap: break-word;
}

/* Allow CJK text to break naturally */
:lang(ja) h2,
:lang(zh) h2,
:lang(zh-Hans) h2,
:lang(zh-Hant) h2 {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Search */
.search-box {
  max-width: 600px;
  margin: 0 auto var(--gap-section);
}

.search-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--bg2);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  outline: none;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow:
    0 2px 12px rgba(255, 255, 255, 0.12),
    0 1px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-height: 48px;
}

.search-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 4px 16px rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.search-input:focus {
  border-color: var(--movie-color);
  outline: 2px solid var(--movie-color);
  outline-offset: 2px;
  background: var(--bg2);
  box-shadow:
    0 6px 20px rgba(255, 255, 255, 0.2),
    0 3px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1.01);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: var(--gap-form);
  justify-content: center;
  margin-bottom: var(--gap-section);
  flex-wrap: wrap;
}

.filter-btn,
.tab {
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  padding: var(--space-1) var(--space-3);
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg2);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.filter-btn:hover,
.tab:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.filter-btn:focus,
.tab:focus {
  outline: 2px solid var(--movie-color);
  outline-offset: 2px;
}

.filter-btn.active,
.tab.active {
  border-color: var(--movie-color);
  color: var(--movie-color);
  background: rgba(255, 255, 255, 0.12);
}

/* Badges */
.badge {
  font-family: 'Public Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 500;
  padding: var(--gap-tight) var(--gap-base);
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-movie {
  background: rgba(255, 255, 255, 0.15);
  color: var(--movie-color);
}

.badge-tv {
  background: rgba(255, 255, 255, 0.09);
  color: var(--tv-color);
}

/* Importance Badges */
.importance-badge {
  font-size: 12px;
  padding: var(--gap-tight) var(--gap-base);
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.importance-essential {
  background: rgba(227,166,62,0.15);
  color: var(--gold);
  border: 1px solid rgba(227,166,62,0.4);
}

.importance-supporting {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Timeline Dots */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid;
  position: relative;
  z-index: 1;
}

.dot-movie {
  background: rgba(255, 255, 255, 0.3);
  border-color: var(--movie-color);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.dot-tv {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--tv-color);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.24);
}

/* Streaming Buttons Container */
.streaming-buttons {
  display: flex;
  gap: var(--gap-form);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

/* ===========================
   BUTTON COMPONENT
   Standard button with 2 variants: Blue (primary) and White (secondary)
   Height: 48px, Font: 16px, Padding: 24px left/right
   Following 8px grid system
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-base);
  padding: 0 var(--space-3);
  height: 48px;
  min-height: 48px;
  text-decoration: none !important;
  border-radius: 50px;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
  border: 1px solid;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:hover {
  text-decoration: none !important;
  transform: translateY(-1px);
}

.btn:focus {
  outline: 2px solid;
  outline-offset: 2px;
  text-decoration: none !important;
}

/* Button Variant: Blue (Primary) */
.btn-primary {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #FFFFFF;
}

.btn-primary:focus {
  outline-color: #FFFFFF;
}

/* Button Variant: Secondary */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:focus {
  outline-color: #ffffff;
}


/* Button Icon Styles */
.btn-icon {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ===========================
   BUTTON STACK COMPONENT
   For multiple buttons in same section
   Mobile: stack vertically with 16px gap
   Desktop: horizontal with 32px gap
   =========================== */

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2); /* 16px - comfortable stacking */
  align-items: center;
}

@media (min-width: 640px) {
  .btn-stack {
    flex-direction: row;
    gap: var(--space-4); /* 32px - horizontal spacing */
    justify-content: center;
    flex-wrap: wrap;
  }
}


/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--gap-base);
  margin: var(--space-3) 0 var(--space-4);
  font-size: 16px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--movie-color);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb-separator {
  color: var(--text-dim);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 500;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--movie-color);
  color: var(--bg);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--text);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.back-to-top:focus {
  outline: none;
}

/* Related Characters Section */
.related-characters {
  margin-top: var(--space-10);
  padding-top: var(--gap-section);
  border-top: 1px solid var(--border);
}

.related-characters h2 {
  font-family: 'Public Sans', sans-serif;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: var(--space-4);
  text-align: center;
  word-break: keep-all;
  hyphens: none;
  overflow-wrap: break-word;
}

:lang(ja) .related-characters h2,
:lang(zh) .related-characters h2,
:lang(zh-Hans) .related-characters h2,
:lang(zh-Hant) .related-characters h2 {
  word-break: normal;
  overflow-wrap: anywhere;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap-component);
}

.related-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--padding-organism);
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Responsive card padding - scales with screen size */
@media (min-width: 768px) {
  .related-card {
    padding: var(--padding-organism-md);
  }
}

@media (min-width: 1024px) {
  .related-card {
    padding: var(--space-4);
  }
}

.related-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--movie-color), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.related-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  background: var(--bg2);
}

.related-card:hover::before {
  transform: scaleX(1);
}

.related-card h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: clamp(18px, 2.5vw, 20px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: var(--space-2);
  transition: color 0.3s ease;
  word-break: keep-all;
  hyphens: none;
  overflow-wrap: break-word;
}

:lang(ja) .related-card h3,
:lang(zh) .related-card h3,
:lang(zh-Hans) .related-card h3,
:lang(zh-Hant) .related-card h3 {
  word-break: normal;
  overflow-wrap: anywhere;
}

.related-card:hover h3 {
  color: var(--movie-color);
}

.related-card p {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-shared {
  font-size: 12px;
  color: var(--movie-color);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Skeleton Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg2) 0%,
    var(--bg2) 50%,
    var(--bg2) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.skeleton-title {
  height: 22px;
  width: 70%;
  margin-bottom: 16px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text:last-of-type {
  width: 85%;
  margin-bottom: 16px;
}

.skeleton-badge {
  height: 12px;
  width: 120px;
}

/* Responsive */
@media (max-width: 1100px) {
  .filter-btn,
  .tab {
    padding: 8px 16px;
    font-size: 16px;
    min-height: 36px;
  }

  .search-input {
    padding: 16px 16px;
    font-size: 16px;
    min-height: 44px;
  }
}

/* Mobile Navigation - Tablets and Small Screens */
@media (max-width: 900px) {
  .nav-header {
    padding: var(--space-2);
    gap: var(--gap-base);
    flex-wrap: nowrap;
    position: sticky;
    top: 0;
    z-index: 101;
    background: var(--bg);
  }

  .nav-logo {
    font-size: 16px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    gap: 0;
    background: var(--bg);
    z-index: 100;
  }

  .nav-links.active {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-search-desktop {
    display: none;
  }

  .mobile-search-bar {
    display: block;
    position: sticky;
    top: 64px;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    margin: 0;
    width: 100%;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* Hide mobile search when hamburger menu is open */
  body.menu-open .mobile-search-bar {
    display: none;
  }

  .mobile-search-bar .nav-search-wrapper {
    width: 100%;
    padding: var(--space-1-5) var(--space-2);
    margin: 0;
  }

  .nav-search-input {
    min-height: 48px;
    font-size: 16px;
    padding: var(--space-2);
    width: 100%;
  }

  .nav-search-autocomplete {
    max-height: 300px;
  }

  .nav-link {
    font-size: 16px;
    padding: var(--space-2);
    min-height: 48px;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--movie-color);
  }

  .browse-dropdown-wrapper,
  .lang-switcher-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .browse-button,
  .lang-switcher {
    width: 100%;
    text-align: left;
    padding: var(--space-2);
    min-height: 48px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .browse-button:hover,
  .lang-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--movie-color);
  }

  .browse-dropdown,
  .lang-dropdown {
    position: static;
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    will-change: max-height;
  }

  .browse-dropdown.show,
  .lang-dropdown.show {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .browse-dropdown-link,
  .lang-option {
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    min-height: 48px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 16px;
    display: block;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .browse-dropdown-link:hover,
  .lang-option:hover,
  .browse-dropdown-link:active,
  .lang-option:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
  }

  /* iOS-specific active state */
  @supports (-webkit-touch-callout: none) {
    .browse-dropdown-link:active,
    .lang-option:active {
      background: rgba(255, 255, 255, 0.2);
    }
  }

  .breadcrumb {
    font-size: 16px;
    margin: var(--space-2) 0 var(--space-3);
  }

  .back-to-top {
    bottom: var(--space-3);
    right: var(--space-3);
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .btn {
    height: 48px;
    min-height: 48px;
    font-size: 16px;
    padding: 0 24px;
  }

  .related-characters {
    margin-top: var(--space-8);
    padding-top: var(--space-5);
  }

  .related-characters h2 {
    font-size: 20px;
    margin-bottom: var(--space-3);
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  /* .related-card padding is handled by responsive breakpoints above (16px mobile, 24px tablet, 32px desktop) */

  .related-card h3 {
    font-size: 16px;
  }
}

/* ===========================
   12-Column Grid System
   =========================== */

:root {
  /* Grid system variables */
  --grid-container: 1200px;
  --grid-gutter: 24px;
  --grid-columns: 12;
}

/* Container */
.container {
  max-width: var(--grid-container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Grid Base */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gutter);
}

/* Column Spans */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* Centered Columns */
.col-centered-8 {
  grid-column: 3 / 11; /* Centers 8 columns */
}

.col-centered-10 {
  grid-column: 2 / 12; /* Centers 10 columns */
}

/* Responsive Grid Breakpoints - Apple Standards */

/* Large Desktop - iPad Pro landscape */
@media (max-width: 1366px) {
  .container {
    padding: 0 var(--space-4);
  }
}

/* Desktop / iPad landscape */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-3);
  }
}

/* Tablet - iPad portrait */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
  }

  /* Stack columns on tablet */
  .col-1, .col-2, .col-3, .col-4,
  .col-5, .col-6, .col-7, .col-8,
  .col-9, .col-10, .col-11, .col-12 {
    grid-column: span 12;
  }

  .col-centered-8,
  .col-centered-10 {
    grid-column: 1 / -1;
  }
}

/* Standard phones - iPhone and similar */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-2);
  }

  .nav-header {
    padding: var(--space-2);
    gap: var(--gap-base);
  }

  .nav-logo {
    font-size: 16px;
  }
}

/* Small phones - iPhone SE */
@media (max-width: 320px) {
  .container {
    padding: 0 var(--space-2);
  }

  .nav-header {
    padding: var(--space-2) var(--space-1);
    gap: var(--gap-tight);
  }

  .nav-logo {
    font-size: 16px;
  }
}

/* ===========================
   Anthology Series Section
   =========================== */

.anthology-section {
  margin-top: var(--space-8);
  padding-top: var(--gap-section);
  border-top: 1px solid var(--border);
}

.anthology-note {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: var(--space-3);
  font-style: italic;
  opacity: 0.85;
}

/* ===========================
   Footer Styles
   =========================== */

footer {
  text-align: center;
  padding: var(--space-4) var(--space-2) var(--space-3);
  margin-top: var(--space-10);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  footer {
    padding: var(--space-4) var(--space-5) var(--space-3);
  }
}

footer p {
  margin: 0;
  max-width: none;
}

footer p:last-child {
  margin-top: var(--space-1-5);
}

footer a {
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  color: var(--movie-color);
  border-bottom-color: var(--movie-color);
}

footer .divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--space-3) auto;
}

/* Small mobile: Better positioning for scroll button and adjust creator card */
@media (max-width: 640px) {
  .back-to-top {
    bottom: 16px !important;
    right: 16px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .back-to-top svg {
    width: 20px !important;
    height: 20px !important;
  }

  .creator-photo {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Long German/compound words: allow breaks in headings on mobile */
@media (max-width: 640px) {
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }

  .legal-section h2,
  .section-header h2 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }
}

/* Mobile: Buttons take full available width within padding */
@media (max-width: 640px) {
  .btn, .btn-primary, .btn-secondary {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
  }

  /* Timeline section and other homepage sections */
  .timeline-section .btn,
  .cta-section .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: inline-flex;
    width: auto;
    max-width: 100%;
  }
}

/* ===========================
   COMPONENT LIBRARY - Centralized Styles
   All common components defined here
   =========================== */

/* === CTA SECTION COMPONENT === */
.cta-section {
  text-align: center;
  padding: var(--space-8) 0; /* 64px vertical, 0 horizontal - margin handles spacing */
  margin: 0 var(--space-2); /* 16px horizontal margin outside */
  margin-left: auto;
  margin-right: auto;
  max-width: calc(1000px - var(--space-4));
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(0, 150, 200, 0.12) 50%,
    rgba(0, 100, 150, 0.18) 100%);
  border-radius: 24px;
  box-sizing: border-box; /* Ensure padding doesn't add to width */
}

@media (min-width: 640px) {
  .cta-section {
    padding: 80px 0;
    margin: 64px var(--space-2) 0;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 768px) {
  .cta-section {
    padding: 120px var(--space-6);
    margin: 80px auto 0;
    max-width: 1000px;
  }
}

.cta-section h3 {
  font-family: 'Public Sans', sans-serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  word-break: keep-all;
  hyphens: none;
  overflow-wrap: break-word;
}

:lang(ja) .cta-section h3,
:lang(zh) .cta-section h3,
:lang(zh-Hans) .cta-section h3,
:lang(zh-Hant) .cta-section h3 {
  word-break: normal;
  overflow-wrap: anywhere;
}

.cta-section p {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 36px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  opacity: 0.9;
}

/* Mobile: Ensure CTA never touches edges with stronger specificity */
@media (max-width: 767px) {
  .cta-section {
    padding: var(--space-8) 0 !important; /* 64px vertical, 0 horizontal - margin handles spacing */
    margin: 0 var(--space-2) !important; /* 16px horizontal margin outside */
    box-sizing: border-box !important;
    width: auto !important;
  }

  .cta-section h3,
  .cta-section p,
  .cta-section .btn-stack {
    padding-left: var(--space-3) !important;
    padding-right: var(--space-3) !important;
  }

  .cta-section .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 375px) {
  .cta-section {
    padding: 48px 0 !important;
  }

  .cta-section h3 {
    margin-bottom: 16px;
  }
}

/* === HERO SECTION COMPONENT === */
/* hero-section styles moved to inline <style> in index.html */
/* Other hero sections remain here */
.watch-hero,
.timeline-hero,
.about-hero {
  position: relative;
  text-align: center;
  padding: 8rem var(--space-2) 0;
  margin: 0;
}

@media (min-width: 768px) {
  .watch-hero,
  .timeline-hero,
  .about-hero {
    padding: 8rem var(--space-8) 0;
  }
}

/* === CONTAINER COMPONENT === */
.timeline-container,
.orders-container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

@media (min-width: 768px) {
  .timeline-container,
  .orders-container {
    padding: 0 var(--space-8);
  }
}

/* === CARD COMPONENTS === */
.order-section,
.timeline-item,
.era-header {
  padding: 2rem var(--space-2);
}

@media (min-width: 768px) {
  .order-section {
    padding: 2rem 1.5rem;
  }

  .timeline-item {
    padding: 1.5rem;
  }

  .era-header {
    padding: 2rem 1.5rem;
  }
}

/* Mobile responsive card padding */
@media (max-width: 375px) {
  .order-section,
  .timeline-item {
    padding: var(--space-4) var(--space-2) !important;
  }

  .order-card {
    padding: var(--space-6) var(--space-2) !important;
  }
}

/* Fix icon alignment in buttons */
.btn svg,
.btn i svg,
.btn [data-feather] {
  vertical-align: middle;
  flex-shrink: 0;
}

.btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Contact cards: left-align all content including buttons */
.contact-card {
  text-align: left !important;
}

.contact-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 640px) {
  .contact-card .btn {
    margin-left: 0 !important;
  }
}

/* Creator card mobile fixes */
@media (max-width: 640px) {
  .creator-section {
    padding: var(--space-10) var(--space-2) !important;
  }

  .creator-card {
    margin: 0 !important;
    text-align: center;
  }

  .creator-image-wrapper {
    margin-bottom: var(--space-4);
  }

  .creator-photo {
    width: 140px !important;
    height: 140px !important;
  }

  .creator-content {
    text-align: center !important;
  }

  .creator-name {
    font-size: 24px !important;
  }

  .creator-title {
    font-size: 16px !important;
    margin-bottom: var(--space-4) !important;
  }

  .creator-bio {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin-bottom: var(--space-6) !important;
  }

  .creator-content .btn {
    margin: 0 auto !important;
    display: inline-flex !important;
  }
}

/* Character page: feedback section spacing */
.feedback-section {
  margin-top: 64px !important;
}

@media (max-width: 768px) {
  .feedback-section {
    margin-top: 64px !important;
  }
}

/* Button mobile behavior: prevent overflow, no automatic spacing */
@media (max-width: 640px) {
  .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Note: Use .btn-stack for proper button spacing instead of margins */
}
