/* ============================================
   Century Birthday - Common Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Brand palette - bright & clear */
  --color-light-blue: #7eb8da;
  --color-lavender: #b39dda;
  --color-gold: #d4a853;
  --color-gold-light: #f0d78c;
  --color-gold-dark: #a67c30;

  /* Space backgrounds */
  --color-space-deep: #0a0a1e;
  --color-space-mid: #1a1040;
  --color-space-light: #2a1a50;

  /* UI */
  --color-text: #e8e0f0;
  --color-text-dim: #9990b0;
  --color-success: #5adb7a;
  --color-error: #db5a5a;

  /* Typography */
  --font-display: 'Cinzel', 'Georgia', serif;
  --font-body: 'Cormorant Garamond', 'Georgia', serif;
  --font-mono: 'Courier New', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;

  /* Animation */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-body);
  background: var(--color-space-deep);
  color: var(--color-text);
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

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

a:hover {
  color: var(--color-gold);
}

button {
  cursor: pointer;
  font-family: var(--font-display);
  border: none;
  outline: none;
}

/* --- Utility Classes --- */
.text-gold { color: var(--color-gold); }
.text-center { text-align: center; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
  color: #1a1a2e;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(212, 168, 83, 0.5);
  color: #1a1a2e;
}

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

/* --- Page Sections (SPA) --- */
.page-section { display: block; }
.page-section.hidden { display: none; }

/* --- Page Transitions --- */
.page-enter {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Back Button --- */
.back-btn {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(26, 16, 64, 0.7);
  border: 1px solid rgba(212, 168, 83, 0.4);
  color: var(--color-gold-light);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(42, 26, 80, 0.8);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* --- Noscript --- */
noscript {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--color-gold-light);
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  padding: var(--space-lg);
}

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

::-webkit-scrollbar-track {
  background: var(--color-space-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold-dark);
  border-radius: 3px;
}

/* --- Selection --- */
::selection {
  background: rgba(212, 168, 83, 0.4);
  color: #fff;
}
