/* ===========================
   Mnemosyne Showcase Website
   Professional Dark Theme
   =========================== */

/* CSS Custom Properties */
:root {
  /* Primary Colors - Gold & Purple */
  --gold: #D4AF37;
  --gold-light: #E8C969;
  --gold-dark: #A68B2A;
  --gold-dim: #8B7128;
  --purple: #6B46C1;
  --purple-light: #8B5CF6;
  --purple-dark: #5B21B6;
  --purple-dim: #4C3D8F;

  /* Background Colors */
  --bg-primary: #0A0E14;
  --bg-secondary: #0F1419;
  --bg-card: #141B24;
  --bg-elevated: #1A2332;
  --bg-input: #0D1219;

  /* Text Colors */
  --text-primary: #E8E6E3;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-dim: #4B5563;

  /* Accent Colors */
  --green: #10B981;
  --green-dim: #059669;
  --blue: #3B82F6;
  --red: #EF4444;
  --orange: #F59E0B;

  /* Border & Effects */
  --border: #2D3748;
  --border-light: #374151;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.3);
  --shadow-purple: 0 0 20px rgba(107, 70, 193, 0.3);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
}

/* ===========================
   Reset & Base
   =========================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Global SVG constraints - prevent icons from expanding */
svg {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

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

/* ===========================
   Starfield Background
   =========================== */

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #050810 100%);
}

/* ===========================
   Typography
   =========================== */

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

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p { margin-bottom: var(--space-md); }

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

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

/* ===========================
   Layout Utilities
   =========================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* ===========================
   Navigation
   =========================== */

#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 14, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--gold);
}

.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
  stroke: var(--gold);
}

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

.nav-links a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.nav-cta {
  padding: var(--space-sm) var(--space-lg) !important;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-radius: var(--radius);
  color: white !important;
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  color: white !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ===========================
   Hero Section
   =========================== */

#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(107, 70, 193, 0.2);
  border: 1px solid var(--purple-dim);
  border-radius: 50px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--gold);
  text-shadow: var(--shadow-gold);
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease-out;
}

.hero-tagline {
  font-size: var(--font-size-2xl);
  color: var(--text-primary);
  font-weight: 300;
  margin-bottom: var(--space-sm);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 1.2s ease-out;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 1.4s ease-out;
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  animation: fadeInUp 1.6s ease-out;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: fadeInRight 1s ease-out;
}

/* ===========================
   CTA Buttons
   =========================== */

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.cta-button svg {
  width: 18px;
  height: 18px;
}

.cta-button.primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white;
  box-shadow: var(--shadow-purple);
}

.cta-button.primary:hover {
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(107, 70, 193, 0.5);
  color: white;
}

.cta-button.secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.cta-button.secondary:hover {
  background: var(--gold);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.cta-button.large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--font-size-lg);
}

/* ===========================
   Screenshot Frames (Mockups)
   =========================== */

.screenshot-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
}

.screenshot-frame.main-screenshot {
  max-width: 550px;
}

.screenshot-frame.large {
  max-width: 700px;
}

.screenshot-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27CA40; }

.screenshot-title {
  margin-left: auto;
  font-size: var(--font-size-xs);
  color: #9CA3AF; /* Improved contrast for accessibility (4.5:1 on dark bg) */
}

.screenshot-content {
  padding: var(--space-md);
  min-height: 250px;
  background: var(--bg-primary);
}

/* Game Interface Mockup */
.screenshot-content.game-interface {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  gap: var(--space-sm);
  min-height: 280px;
}

.mock-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.mock-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dim), var(--purple-dark));
}

.mock-avatar.small {
  width: 24px;
  height: 24px;
}

.mock-text {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
}

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

.mock-nav-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: auto;
}

.mock-nav-item {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
}

.mock-nav-item.active {
  background: var(--gold-dim);
}

.mock-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mock-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.mock-message {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.mock-message.player {
  flex-direction: row-reverse;
}

.mock-bubble {
  height: 24px;
  width: 70%;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.mock-bubble.long { width: 90%; height: 36px; }
.mock-bubble.short { width: 40%; }

.mock-message.gm .mock-bubble {
  background: linear-gradient(135deg, var(--purple-dim), var(--bg-elevated));
}

.mock-message.player .mock-bubble {
  background: linear-gradient(135deg, var(--gold-dim), var(--bg-elevated));
}

.mock-input {
  height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mock-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.mock-card {
  height: 50px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold-dim);
}

/* Rules Panel Mockup */
.screenshot-content.rules-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mock-search {
  height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mock-rule-card {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--purple);
}

.mock-rule-title {
  height: 12px;
  width: 40%;
  background: var(--gold-dim);
  border-radius: 4px;
  margin-bottom: var(--space-sm);
}

.mock-rule-text {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: var(--space-xs);
}

.mock-rule-text.short { width: 70%; }

.mock-bookmarks {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mock-bookmark {
  height: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold-dim);
}

/* Personality Panel Mockup */
.screenshot-content.personality-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
  justify-content: center;
}

.mock-personality-header {
  height: 16px;
  width: 50%;
  background: var(--gold-dim);
  border-radius: var(--radius);
}

.mock-personality-modes {
  display: flex;
  gap: var(--space-md);
}

.mock-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid transparent;
  opacity: 0.6;
}

.mock-mode.active {
  border-color: var(--purple);
  opacity: 1;
}

.mock-mode-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.mock-mode-icon.dramatic { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.mock-mode-icon.tactical { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.mock-mode-icon.whimsical { background: linear-gradient(135deg, #F59E0B, #D97706); }
.mock-mode-icon.horror { background: linear-gradient(135deg, #6B21A8, #4C1D95); }

.mock-mode-label {
  height: 8px;
  width: 50px;
  background: var(--border);
  border-radius: 4px;
}

.mock-slider {
  width: 80%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  position: relative;
}

.mock-slider::after {
  content: '';
  position: absolute;
  left: 30%;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
}

/* Voice Panel Mockup */
.screenshot-content.voice-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  min-height: 220px;
}

.mock-voice-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
}

.wave-bar {
  width: 6px;
  background: linear-gradient(180deg, var(--purple), var(--purple-dark));
  border-radius: 3px;
  animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 40px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 50px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 35px; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 45px; animation-delay: 0.5s; }
.wave-bar:nth-child(7) { height: 25px; animation-delay: 0.6s; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

.mock-voice-status {
  font-size: var(--font-size-sm);
  color: var(--green);
  font-weight: 500;
}

.mock-transcript {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mock-voice-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dim));
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Multiplayer UI Mockup */
.screenshot-content.multiplayer-ui {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  gap: var(--space-sm);
  min-height: 300px;
}

.mock-players-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.mock-player {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs);
  border-radius: var(--radius);
}

.mock-player.online {
  background: rgba(16, 185, 129, 0.1);
}

.mock-player-name {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
}

.mock-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.mock-status-dot.offline {
  background: var(--text-muted);
}

.mock-session-chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.mock-message.player-1 .mock-bubble {
  background: linear-gradient(135deg, #3B82F6, var(--bg-elevated));
}

.mock-message.player-2 .mock-bubble {
  background: linear-gradient(135deg, #10B981, var(--bg-elevated));
}

.mock-dice-roll {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-card);
  border-radius: var(--radius);
  align-self: center;
}

.mock-dice {
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: 4px;
}

.mock-result {
  height: 12px;
  width: 40px;
  background: var(--green);
  border-radius: 4px;
}

.mock-turn-tracker {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.mock-turn {
  height: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
}

.mock-turn.active {
  border-left-color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}

/* ===========================
   Section Headers
   =========================== */

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

.section-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-dim);
  border-radius: 50px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.section-title {
  color: var(--gold);
  text-shadow: var(--shadow-gold);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.subsection-title {
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* ===========================
   Features Section
   =========================== */

.features-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.feature-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.feature-spotlight.reverse {
  direction: rtl;
}

.feature-spotlight.reverse > * {
  direction: ltr;
}

.feature-visual {
  display: flex;
  justify-content: center;
}

.feature-content {
  max-width: 500px;
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--gold);
}

.feature-icon.purple {
  background: rgba(107, 70, 193, 0.1);
  border-color: var(--purple-dim);
}

.feature-icon.purple svg {
  stroke: var(--purple-light);
}

.feature-icon.green {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--green-dim);
}

.feature-icon.green svg {
  stroke: var(--green);
}

.feature-content h3 {
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.feature-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

.feature-list li svg {
  width: 18px;
  height: 18px;
  stroke: var(--green);
  flex-shrink: 0;
}

/* ===========================
   Universe Section
   =========================== */

#universe {
  background: linear-gradient(180deg, transparent 0%, rgba(107, 70, 193, 0.05) 50%, transparent 100%);
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.universe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition);
}

.universe-card:hover {
  border-color: var(--purple);
  transform: translateY(-5px);
  box-shadow: var(--shadow-purple);
}

.universe-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.universe-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--purple-light);
}

.universe-card h3 {
  font-size: var(--font-size-lg);
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.universe-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.universe-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
}

.universe-features span {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(107, 70, 193, 0.2);
  border-radius: var(--radius);
  font-size: var(--font-size-xs);
  color: #A78BFA; /* Lighter purple for accessibility */
}

/* Environment Systems */
.environment-systems {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.system-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition);
}

.system-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.system-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
}

.system-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
}

.system-card h4 {
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.system-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* ===========================
   Multiplayer Section
   =========================== */

#multiplayer {
  background: linear-gradient(180deg, transparent 0%, rgba(16, 185, 129, 0.03) 50%, transparent 100%);
}

.multiplayer-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.multiplayer-visual {
  display: flex;
  justify-content: center;
}

.multiplayer-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

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

.mp-feature:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.mp-feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}

.mp-feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--green);
}

.mp-feature h3 {
  color: var(--text-primary);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
}

.mp-feature p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* ===========================
   NPC Section
   =========================== */

#npcs {
  background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.03) 50%, transparent 100%);
}

.npc-showcase {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.npc-card-display {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.npc-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.npc-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.npc-portrait {
  flex-shrink: 0;
}

.npc-portrait-placeholder {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple-dim), var(--purple-dark));
  border-radius: var(--radius);
}

.npc-portrait-placeholder.elf {
  background: linear-gradient(135deg, var(--green-dim), #047857);
}

.npc-portrait-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: rgba(255, 255, 255, 0.5);
}

.npc-info {
  flex: 1;
}

.npc-name {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.npc-role {
  font-size: var(--font-size-sm);
  color: #9CA3AF; /* Improved contrast for accessibility */
  margin-bottom: var(--space-md);
}

.npc-traits {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.trait {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(107, 70, 193, 0.2);
  border-radius: var(--radius);
  font-size: var(--font-size-xs);
  color: #A78BFA; /* Lighter purple for accessibility */
}

.npc-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-style: italic;
}

.npc-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.npc-feature {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.npc-feature svg {
  width: 32px;
  height: 32px;
  stroke: var(--gold);
  margin-bottom: var(--space-md);
}

.npc-feature h3 {
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.npc-feature p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* ===========================
   AI Systems Section
   =========================== */

#ai-systems {
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.03) 50%, transparent 100%);
}

.ai-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.ai-option {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.ai-option.local {
  border-color: var(--green-dim);
}

.ai-option.local:hover {
  border-color: var(--green);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.ai-option.cloud:hover {
  border-color: var(--blue);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.ai-option-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.ai-option-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.ai-option-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
}

.ai-option h3 {
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  margin: 0;
}

.recommended-badge {
  padding: var(--space-xs) var(--space-sm);
  background: #047857; /* Dark green for 4.5:1 contrast with white text */
  border-radius: var(--radius);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.ai-option > p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.ai-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.ai-benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

.ai-benefits li svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold);
  flex-shrink: 0;
}

.ai-models {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.model-tag {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ===========================
   Game Systems Section
   =========================== */

.game-systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.game-system-card {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition);
}

.game-system-card:hover {
  border-color: var(--purple);
  transform: translateY(-5px);
  box-shadow: var(--shadow-purple);
}

.game-system-card.custom {
  border-style: dashed;
}

.game-system-badge {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.game-system-badge.add {
  background: linear-gradient(135deg, #6B21A8, #581C87);
  color: #E9D5FF;
}

.game-system-badge.traveller {
  background: linear-gradient(135deg, #1E40AF, #1E3A8A);
  color: #BFDBFE;
}

.game-system-badge.dnd5e {
  background: linear-gradient(135deg, #047857, #065F46);
  color: #A7F3D0;
}

.game-system-badge.coc {
  background: linear-gradient(135deg, #B91C1C, #991B1B);
  color: #FECACA;
}

.game-system-badge.pathfinder {
  background: linear-gradient(135deg, #B45309, #92400E);
  color: #FDE68A;
}

.game-system-card h3 {
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.game-system-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.system-features {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.system-features span {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ===========================
   Architecture Section
   =========================== */

#architecture {
  background: linear-gradient(180deg, transparent 0%, rgba(107, 70, 193, 0.03) 50%, transparent 100%);
}

.architecture-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-layer {
  width: 100%;
  max-width: 800px;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.layer-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.services-row {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.arch-service {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.service-name {
  font-weight: 600;
  color: #A78BFA; /* Lighter purple for accessibility */
  font-size: var(--font-size-sm);
}

.service-desc {
  font-size: var(--font-size-xs);
  color: #9CA3AF; /* Improved contrast for accessibility */
}

.arch-connector {
  width: 2px;
  height: 30px;
  background: var(--border);
}

.arch-connector.multi {
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  position: relative;
}

.arch-connector.multi::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -15px;
  width: 2px;
  height: 15px;
  background: var(--border);
}

.arch-connector.multi::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 2px;
  height: 15px;
  background: var(--border);
}

/* ===========================
   CTA Section
   =========================== */

#cta {
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(107, 70, 193, 0.1) 50%, var(--bg-primary) 100%);
}

.cta-content {
  text-align: center;
}

.cta-content h2 {
  font-size: var(--font-size-3xl);
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.cta-content p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* Newsletter Form */
.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input-group {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.newsletter-input-group input[type="email"] {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
}

.newsletter-input-group input[type="email"]::placeholder {
  color: var(--text-muted);
}

.newsletter-input-group input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.newsletter-input-group .cta-button {
  white-space: nowrap;
  padding: var(--space-md) var(--space-xl);
}

.newsletter-note {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.newsletter-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--green);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

.newsletter-success svg {
  width: 48px;
  height: 48px;
  stroke: var(--green);
}

.newsletter-success p {
  color: var(--green);
  font-size: var(--font-size-lg);
  margin: 0;
}

.newsletter-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--red);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

.newsletter-error svg {
  width: 48px;
  height: 48px;
  stroke: var(--red);
}

.newsletter-error p {
  color: var(--red);
  font-size: var(--font-size-lg);
  margin: 0;
}

.newsletter-form button .btn-loading {
  display: none;
}

.newsletter-form button.loading .btn-text {
  display: none;
}

.newsletter-form button.loading .btn-loading {
  display: inline;
}

.newsletter-form button.loading svg {
  animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
  .newsletter-input-group {
    flex-direction: column;
  }

  .newsletter-input-group .cta-button {
    width: 100%;
    justify-content: center;
  }
}

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

footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-3xl);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.footer-logo .logo-icon {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
}

.footer-tagline {
  font-size: var(--font-size-sm);
  color: #A78BFA; /* Lighter purple for accessibility */
  font-style: italic;
}

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

.footer-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-column h3 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.footer-column a {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

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

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: var(--font-size-sm);
  color: #9CA3AF; /* Improved contrast for accessibility */
  margin: 0;
}

.footer-bottom p + p {
  margin-top: var(--space-xs);
}

/* ===========================
   Animations
   =========================== */

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

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

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1024px) {
  #hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-height) + var(--space-2xl));
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  .feature-spotlight,
  .feature-spotlight.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .feature-spotlight > * {
    direction: ltr;
  }

  .feature-visual {
    order: -1;
  }

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

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

  .multiplayer-showcase {
    grid-template-columns: 1fr;
  }

  .multiplayer-visual {
    order: -1;
  }

  .npc-showcase {
    grid-template-columns: 1fr;
  }

  .ai-options {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .game-systems-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .npc-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .npc-traits {
    justify-content: center;
  }

  .screenshot-content.game-interface {
    grid-template-columns: 1fr;
  }

  .mock-sidebar, .mock-panel {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
  }

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

  .cta-button {
    width: 100%;
    justify-content: center;
  }

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

/* ===========================
   Accessibility
   =========================== */

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

  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
