/* =============================================
   CANDY AI - Complete Stylesheet
   Dark luxury theme with glass morphism
   ============================================= */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* === CSS Variables === */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-tertiary: #6a6a7a;
  --text-muted: #4a4a5a;

  /* Accent - Pink/Magenta */
  --pink-500: #ff2d78;
  --pink-400: #ff4d8e;
  --pink-300: #ff6b9d;
  --pink-200: #ff8fb5;
  --pink-glow: rgba(255, 45, 120, 0.3);
  --gradient-pink: linear-gradient(135deg, #ff2d78, #ff6b9d);

  /* Secondary - Purple */
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a855f7;
  --purple-300: #c084fc;
  --purple-glow: rgba(124, 58, 237, 0.3);
  --gradient-purple: linear-gradient(135deg, #7c3aed, #a855f7);

  /* Mixed gradient */
  --gradient-main: linear-gradient(135deg, #ff2d78, #7c3aed);
  --gradient-main-hover: linear-gradient(135deg, #ff4d8e, #8b5cf6);

  /* Status */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-pink: 0 4px 24px rgba(255, 45, 120, 0.25);
  --shadow-purple: 0 4px 24px rgba(124, 58, 237, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === Utility Classes === */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-medium);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-gradient {
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-md) 0;
  transition: background var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.navbar-logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px var(--pink-glow));
  letter-spacing: -0.5px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text-primary);
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-pink);
  border-radius: 1px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  cursor: pointer;
}

.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all var(--transition-fast);
}

.navbar-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.navbar-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  z-index: var(--z-overlay);
  padding: var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--text-primary);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-pink);
  color: white;
  box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 45, 120, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

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

.btn-ghost {
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
}

.btn-xl {
  padding: 18px 48px;
  font-size: 1.1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.sm {
  width: 32px;
  height: 32px;
}

/* === Inputs === */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.input:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

.input::placeholder {
  color: var(--text-muted);
}

.input-error {
  border-color: var(--error) !important;
}

.error-text {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 2px;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a0a0b0' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

select.input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* === Cards === */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.card-body {
  padding: var(--space-md);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.card-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Badges & Tags === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(255, 45, 120, 0.15);
  color: var(--pink-300);
  border: 1px solid rgba(255, 45, 120, 0.2);
}

.badge-purple {
  background: rgba(124, 58, 237, 0.15);
  color: var(--purple-300);
  border-color: rgba(124, 58, 237, 0.2);
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.tag.active {
  background: rgba(255, 45, 120, 0.15);
  border-color: rgba(255, 45, 120, 0.3);
  color: var(--pink-300);
}

/* === Chip (Selection) === */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.chip.selected {
  background: rgba(255, 45, 120, 0.15);
  border-color: var(--pink-500);
  color: var(--pink-300);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-normal);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
  max-width: 420px;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
}

.toast.info {
  border-left: 3px solid var(--info);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

/* === Skeleton Loading === */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-tertiary) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-title {
  height: 20px;
  margin-bottom: 12px;
  width: 80%;
  border-radius: 4px;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 3/4;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}

@keyframes slideLeft {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--pink-glow); }
  50% { box-shadow: 0 0 40px var(--pink-glow), 0 0 60px rgba(255, 45, 120, 0.15); }
}

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

.animate-fadeIn { animation: fadeIn 0.5s ease; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease; }
.animate-pulse { animation: pulse 2s ease infinite; }

/* === Hero Section === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-4xl) var(--space-md);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg canvas {
  width: 100%;
  height: 100%;
}

.hero-gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.hero-gradient-1 {
  width: 600px;
  height: 600px;
  background: var(--pink-500);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.hero-gradient-2 {
  width: 500px;
  height: 500px;
  background: var(--purple-600);
  bottom: -200px;
  left: -100px;
  animation-delay: -4s;
}

.hero-gradient-3 {
  width: 400px;
  height: 400px;
  background: #ff6b9d;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-logo {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px var(--pink-glow));
  margin-bottom: var(--space-lg);
  letter-spacing: -2px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

/* === Stats Bar === */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  max-width: 600px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* === Section === */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* === Featured Characters (Horizontal Scroll) === */
.featured-scroll {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  padding: var(--space-md) var(--space-md) var(--space-xl);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.featured-scroll::-webkit-scrollbar {
  display: none;
}

.featured-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.featured-card .card-image {
  aspect-ratio: 3/4;
  position: relative;
}

.featured-card .card-image .placeholder-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.featured-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.featured-card .card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.featured-card .card-age {
  font-size: 0.75rem;
  color: var(--pink-300);
}

/* === How It Works === */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: var(--space-xl);
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--gradient-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.75rem;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pink-500);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  background: rgba(255, 45, 120, 0.1);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Footer === */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Gallery === */
.gallery-page {
  padding-top: 80px;
  min-height: 100vh;
}

.gallery-header {
  padding: var(--space-lg) 0;
}

.gallery-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.filter-tab.active {
  background: var(--gradient-pink);
  color: white;
}

.filter-tab:hover:not(.active) {
  color: var(--text-primary);
}

.filter-chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: nowrap;
}

.search-bar {
  position: relative;
  margin-bottom: var(--space-lg);
}

.search-bar .input {
  padding-left: 44px;
}

.search-bar .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Character Grid */
.character-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

.character-card {
  cursor: pointer;
  position: relative;
}

.character-card .card-image {
  position: relative;
}

.character-card .placeholder-gradient {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.character-card .card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
}

.character-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-sm);
}

.character-card .card-footer .btn {
  padding: 6px 14px;
  font-size: 0.75rem;
}

.character-bio {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: var(--space-xs);
}

/* === Chat Page === */
.chat-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

/* Chat Sidebar */
.chat-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-sidebar-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.conversation-search {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.conversation-search .input {
  font-size: 0.85rem;
  padding: 8px 12px;
}

.conversation-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  margin-bottom: 2px;
}

.conversation-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.conversation-item.active {
  background: rgba(255, 45, 120, 0.08);
  border: 1px solid rgba(255, 45, 120, 0.15);
}

.conversation-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.conversation-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-preview {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Chat Main */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}

.chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-header-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-header-status {
  font-size: 0.75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.chat-header-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.message {
  display: flex;
  gap: var(--space-sm);
  max-width: 70%;
  animation: fadeInUp 0.3s ease;
}

.message-ai {
  align-self: flex-start;
}

.message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-user .message-avatar {
  background: var(--gradient-purple);
}

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 100%;
  word-wrap: break-word;
}

.message-ai .message-bubble {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}

.message-user .message-bubble {
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.2), rgba(124, 58, 237, 0.2));
  border: 1px solid rgba(255, 45, 120, 0.2);
  border-bottom-right-radius: 4px;
}

.message-bubble img {
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
  max-width: 300px;
}

.message-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.message-user .message-time {
  text-align: right;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 80px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: bounce 1.4s ease infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Chat Input */
.chat-input-area {
  padding: var(--space-md) var(--space-lg);
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-sm) var(--space-md);
  transition: border-color var(--transition-fast);
}

.chat-input-wrapper:focus-within {
  border-color: var(--pink-500);
}

.chat-input-wrapper textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  padding: 6px 0;
}

.chat-input-wrapper textarea::placeholder {
  color: var(--text-muted);
}

.chat-input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 4px;
}

.chat-input-actions button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

.chat-input-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.chat-input-actions .send-btn {
  background: var(--gradient-pink);
  color: white;
  border-radius: 50%;
}

.chat-input-actions .send-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-pink);
}

/* Chat Profile Panel */
.chat-profile {
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: var(--space-lg);
}

.chat-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  background: var(--gradient-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  overflow: hidden;
}

.chat-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-profile-name {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.chat-profile-bio {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.chat-profile-attributes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.profile-attr {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.profile-attr-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-attr-value {
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 2px;
}

/* === Create/Wizard Page === */
.create-page {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wizard-container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  flex: 1;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  padding: 0 var(--space-md);
}

.progress-step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  transition: background var(--transition-normal);
}

.progress-step.completed {
  background: var(--gradient-pink);
}

.progress-step.active {
  background: rgba(255, 45, 120, 0.4);
}

.progress-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* Wizard Step */
.wizard-step {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.wizard-step.active {
  display: block;
}

.wizard-step h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.wizard-step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
}

/* Style Selection Cards */
.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.style-card {
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
}

.style-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
}

.style-card.selected {
  border-color: var(--pink-500);
  background: rgba(255, 45, 120, 0.05);
  box-shadow: 0 0 30px rgba(255, 45, 120, 0.1);
}

.style-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.style-card-image .placeholder-gradient {
  width: 100%;
  height: 100%;
}

.style-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.style-card p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0;
}

/* Wizard Navigation */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xl) 0;
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

/* Review Summary */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.review-item {
  padding: var(--space-sm) 0;
}

.review-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-value {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 2px;
}

/* Slider */
.range-slider {
  width: 100%;
  margin: var(--space-md) 0;
}

.range-slider input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-pink);
  cursor: pointer;
  box-shadow: 0 0 10px var(--pink-glow);
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--gradient-pink);
  cursor: pointer;
}

.range-value {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pink-300);
}

/* === Visual Option Cards (Create Wizard v2 - Candy Style) === */

/* Wizard v2 wider container */
.wizard-container--wide {
  max-width: 1060px;
}

.wizard-step h2 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 8px;
}

.wizard-step > p {
  text-align: center;
  color: var(--text-tertiary);
  margin-bottom: 0;
  font-size: 0.85rem;
}

/* Section label inside wizard */
.wizard-section-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 18px;
  margin-top: 36px;
}

.wizard-section-label:first-of-type {
  margin-top: 8px;
}

/* --- Option Grid --- */
.option-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* --- Photo Card (main card type - like Candy.ai) --- */
.option-card {
  position: relative;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  text-align: center;
  flex-shrink: 0;
}

.option-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.option-card.selected {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff, 0 8px 24px rgba(0,0,0,0.4);
}

.option-card.selected::after {
  content: '\2713';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-pink);
  color: white;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Photo card image */
.option-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.option-card:hover img {
  transform: scale(1.05);
}

/* Gradient overlay for text readability */
.option-card .card-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* Card label overlay */
.option-card .card-label {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* --- Card Sizes --- */
/* Style cards (Step 1 - 2 large cards) */
.option-card--lg {
  width: 280px;
  height: 380px;
}

/* Ethnicity, Body, Bust cards */
.option-card--md {
  width: 170px;
  height: 220px;
}

/* Hair style, hair color, eye color cards */
.option-card--sm {
  width: 140px;
  height: 180px;
}

/* --- Personality / Identity Section --- */
.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
}

.identity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.identity-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.identity-card.selected {
  border-color: var(--pink-500);
  background: rgba(255, 45, 120, 0.08);
}

.identity-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.identity-card__sublabel {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.identity-card__value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.identity-card.selected .identity-card__value {
  color: var(--pink-300);
}

.identity-card__icon {
  font-size: 1.2rem;
  color: var(--text-tertiary);
}

/* Personality chips grid */
.personality-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
}

.personality-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.personality-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.personality-card.selected {
  border-color: var(--pink-500);
  background: rgba(255, 45, 120, 0.08);
}

.personality-card__emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.personality-card__text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.personality-card.selected .personality-card__text {
  color: var(--pink-300);
}

/* Advance button (pink gradient like Candy.ai) */
.btn-advance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  border: none;
  border-radius: 10px;
  background: var(--gradient-pink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-advance:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 45, 120, 0.4);
}

.btn-advance:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Wizard Modal (Step 5 personality/relationship/occupation pickers) */
.wizard-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wizard-modal__content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.wizard-modal__content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

/* Identity Cards (Step 5 dropdown-style triggers) */
.identity-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.identity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.identity-card:hover {
  border-color: var(--accent-pink);
  background: rgba(255, 45, 120, 0.05);
}

.identity-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.identity-card__sublabel {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.identity-card__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.identity-card__icon {
  font-size: 1.2rem;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.identity-card:hover .identity-card__icon {
  color: var(--accent-pink);
}

/* Personality grid inside modals */
.personality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.personality-card {
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.personality-card:hover {
  border-color: rgba(255, 45, 120, 0.4);
  color: var(--text-primary);
}

.personality-card.selected {
  border-color: var(--accent-pink);
  background: rgba(255, 45, 120, 0.1);
  color: #fff;
}

/* Name input area in step 5 */
.name-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.name-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.name-row input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.name-row input:focus {
  border-color: var(--accent-pink);
}

.name-row input::placeholder {
  color: var(--text-tertiary);
}

.name-counter {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: right;
}

@media (max-width: 768px) {
  .wizard-modal__content {
    padding: 20px 16px;
  }
  .personality-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
  }
  .identity-card {
    padding: 14px 16px;
  }
}

/* === Login Page === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-logo span {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 3px;
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.auth-tab.active {
  background: var(--gradient-pink);
  color: white;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-form.active {
  display: flex;
}

.auth-form .btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: var(--space-sm);
}

.auth-error {
  display: none;
  padding: var(--space-sm) var(--space-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: 0.85rem;
}

.auth-error.show {
  display: block;
}

.auth-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: var(--space-md) 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* === Empty States === */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* === Loading Spinner === */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--pink-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

/* === Responsive === */

/* Mobile: <= 480px */
@media (max-width: 480px) {
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    --space-4xl: 64px;
  }

  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-logo { font-size: 3rem; }

  .hero-cta {
    flex-direction: column;
  }

  .stats-bar {
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

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

  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .section-header h2 { font-size: 1.5rem; }

  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .style-grid {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .option-card--lg {
    width: 160px;
    height: 220px;
  }

  .option-card--md {
    width: 105px;
    height: 140px;
  }

  .option-card--sm {
    width: 95px;
    height: 125px;
  }

  .option-card .card-label {
    font-size: 0.72rem;
  }

  .option-grid {
    gap: 8px;
  }

  .personality-grid {
    gap: 6px;
  }

  .personality-card {
    padding: 10px 14px;
    gap: 8px;
  }

  .personality-card__text {
    font-size: 0.78rem;
  }

  .identity-grid {
    grid-template-columns: 1fr;
  }

  .wizard-container--wide {
    max-width: 100%;
  }

  .wizard-section-label {
    font-size: 1rem;
  }

  /* Chat Mobile */
  .chat-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    transition: left var(--transition-normal);
    width: 85%;
    max-width: 320px;
  }

  .chat-sidebar.open {
    left: 0;
  }

  .chat-profile {
    position: fixed;
    right: -100%;
    top: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    transition: right var(--transition-normal);
    width: 85%;
    max-width: 300px;
  }

  .chat-profile.open {
    right: 0;
  }

  .chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-overlay) - 1);
  }

  .chat-overlay.open {
    display: block;
  }

  .message {
    max-width: 85%;
  }

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    top: auto;
    bottom: var(--space-lg);
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }
}

/* Tablet: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .character-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    transition: left var(--transition-normal);
  }

  .chat-sidebar.open {
    left: 0;
  }

  .chat-profile {
    position: fixed;
    right: -100%;
    top: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    transition: right var(--transition-normal);
  }

  .chat-profile.open {
    right: 0;
  }

  .chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-overlay) - 1);
  }

  .chat-overlay.open {
    display: block;
  }
}

/* Desktop nav */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-actions .btn { display: none; }
  .navbar-hamburger { display: flex; }

  .navbar-actions .btn.mobile-show { display: inline-flex; }
}

@media (min-width: 769px) {
  .navbar-hamburger { display: none; }
  .mobile-menu { display: none !important; }
}

/* Large desktop */
@media (min-width: 1024px) {
  .character-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra large */
@media (min-width: 1400px) {
  .container {
    max-width: 1360px;
  }
}
