/* AnimeForge Adventures — Main CSS: Variables, Resets, Typography */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Shippori+Mincho+B1:wght@400;600;700&family=Yomogi&display=swap');

:root {
  --bg-deep: #0B0712;
  --bg-surface: #13101C;
  --bg-elevated: #1C1528;
  --bg-card: #211A30;

  --accent-sakura: #F472B6;
  --accent-sakura-dim: rgba(244, 114, 182, 0.15);
  --accent-gold: #FBBF24;
  --accent-ink: #312E81;
  --accent-jade: #34D399;

  --text-primary: #F8F4FC;
  --text-secondary: #C4B5D4;
  --text-muted: #6B5A80;

  --border-subtle: rgba(244, 114, 182, 0.15);
  --border-strong: rgba(244, 114, 182, 0.35);
  --shadow-bloom: 0 4px 30px rgba(244, 114, 182, 0.1), 0 0 60px rgba(244, 114, 182, 0.05);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --overlay: rgba(11, 7, 18, 0.88);

  --res-energy: #38BDF8;
  --res-mood: #F472B6;
  --res-money: #FBBF24;
  --res-rep: #A78BFA;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-hero: clamp(2.5rem, 6vw, 4.5rem);

  --font-display: 'Shippori Mincho B1', Georgia, serif;
  --font-ui: 'DM Sans', system-ui, sans-serif;
  --font-accent: 'Yomogi', cursive;

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

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --z-base: 1;
  --z-overlay: 100;
  --z-modal: 200;
  --z-toast: 300;
}

[data-theme="light"] {
  --bg-deep: #FEFBFF;
  --bg-surface: #F5F0FA;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-primary: #1A0A2E;
  --text-secondary: #5C3D7A;
  --text-muted: #A07CC0;
  --accent-ink: #EDE9FE;
  --border-subtle: rgba(92, 61, 122, 0.15);
  --border-strong: rgba(92, 61, 122, 0.3);
  --shadow-bloom: 0 4px 24px rgba(92, 61, 122, 0.08);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);
  --overlay: rgba(254, 251, 255, 0.92);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

a { color: var(--accent-sakura); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-gold); }

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
  color: inherit;
}

/* Form Inputs — Full Redesign */
input, textarea, select {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  outline: none;
  width: 100%;
  display: block;
  transition: all var(--transition-normal);
}

input:hover, textarea:hover, select:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-sakura);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px var(--accent-sakura-dim), 0 4px 12px rgba(244, 114, 182, 0.1);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
  line-height: 1.7;
}

/* Range Input */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, var(--accent-sakura-dim), var(--bg-elevated));
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-sakura), #EC4899);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.5), 0 2px 6px rgba(0,0,0,0.3);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-sakura), #EC4899);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.5);
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

::selection { background: var(--accent-sakura); color: white; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-ink); border-radius: 999px; }

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

.u-hidden { display: none !important; }
.u-flex-center { display: flex; align-items: center; justify-content: center; }

#app { min-height: 100vh; position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
