/* Fluent Town - Cozy Light Theme Design System (Vanilla CSS) */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Cozy Light HSL Theme Colors - Artisan indie game look */
  --bg-main: hsl(35, 35%, 96%);          /* Warm Alabaster/Cream */
  --bg-card: hsl(0, 0%, 100%);           /* Pure White */
  --bg-card-hover: hsl(35, 40%, 98%);     /* Warm paper white */
  --bg-nav: hsla(35, 35%, 96%, 0.85);
  
  --color-primary: hsl(14, 70%, 52%);      /* Warm Terracotta / Clay */
  --color-secondary: hsl(146, 22%, 36%);   /* Forest Sage / Cozy Green */
  --color-accent: hsl(40, 75%, 55%);       /* Butterscotch / Warm Honey */
  --color-success: hsl(146, 25%, 45%);     /* Soft Success Green */
  
  --text-main: hsl(220, 25%, 15%);        /* Charcoal Slate */
  --text-muted: hsl(220, 10%, 45%);       /* Soft Warm Grey */
  --text-light: hsl(0, 0%, 100%);
  --text-dark: hsl(220, 25%, 15%);
  
  --border-light: hsla(220, 25%, 15%, 0.07);
  --border-glow: hsla(14, 70%, 52%, 0.25);
  
  --gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  --gradient-soft-glow: radial-gradient(circle at 50% 50%, hsla(40, 75%, 55%, 0.12) 0%, transparent 70%);
  
  /* Sizing and Transitions */
  --max-width: 1100px;
  --transition-fast: 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* organic bouncy spring transition */
  --border-radius: 20px;
  --shadow-cozy: 0 12px 36px hsla(24, 20%, 30%, 0.05), 0 4px 12px hsla(24, 20%, 30%, 0.03);
  --shadow-hover: 0 20px 48px hsla(24, 20%, 30%, 0.09), 0 8px 16px hsla(24, 20%, 30%, 0.05);
}

/* Base Reset & Style */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
}

/* Artisan Serif Typography for titles */
h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Pastel Watercolor Orbs */
.glow-orb {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  opacity: 0.55;
}

.orb-1 { top: -150px; left: -100px; background: radial-gradient(circle, hsla(14, 70%, 52%, 0.12) 0%, transparent 70%); }
.orb-2 { top: 900px; right: -200px; background: radial-gradient(circle, hsla(146, 22%, 36%, 0.1) 0%, transparent 70%); }
.orb-3 { bottom: 100px; left: -150px; background: radial-gradient(circle, hsla(40, 75%, 55%, 0.1) 0%, transparent 70%); }

/* Cozy Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: hsl(35, 10%, 80%);
  border-radius: 10px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* Navigation - Paper Glassmorphism */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
}

.logo-img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 10px hsla(14, 70%, 52%, 0.25));
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-btn {
  padding: 10px 22px;
  border-radius: 24px;
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background: var(--color-primary);
  color: var(--text-light);
  box-shadow: 0 6px 16px hsla(14, 70%, 52%, 0.15);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 160px 0 80px;
  position: relative;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: hsla(40, 75%, 55%, 0.15);
  border: 1px solid hsla(40, 75%, 55%, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  color: hsl(40, 70%, 35%);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.15;
  max-width: 850px;
  margin: 0 auto 24px;
  color: var(--text-main);
}

.hero h1 span {
  color: var(--color-primary);
  display: block;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
}

.btn-primary {
  padding: 16px 36px;
  border-radius: 30px;
  background: var(--color-primary);
  color: var(--text-light);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px hsla(14, 70%, 52%, 0.2);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px hsla(14, 70%, 52%, 0.3);
  background: hsl(14, 70%, 47%);
}

.btn-secondary {
  padding: 16px 36px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-cozy);
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-preview {
  max-width: 850px;
  margin: 0 auto;
  border-radius: var(--border-radius);
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-cozy);
  position: relative;
  transition: var(--transition-smooth);
}

.hero-preview img {
  width: 100%;
  border-radius: calc(var(--border-radius) - 8px);
  display: block;
}

.hero-preview:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Language showcase chips */
.language-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lang-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 8px 18px;
  border-radius: 24px;
  color: var(--text-main);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: var(--transition-fast);
}

.lang-chip:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cozy);
}

.lang-flag {
  font-size: 1.25rem;
}

/* Pillars / Features */
.features {
  padding: 100px 0;
  background-color: hsla(35, 20%, 93%, 0.4);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: 2.8rem;
  margin-bottom: 16px;
  color: var(--text-main);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 44px 32px;
  box-shadow: var(--shadow-cozy);
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: hsla(14, 70%, 52%, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-primary);
  font-size: 1.6rem;
  transition: var(--transition-fast);
}

.feature-card:hover .feature-icon {
  background: var(--color-primary);
  color: var(--text-light);
  transform: scale(1.08) rotate(3deg);
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Interactive Preview Box */
.interactive-simulation {
  padding: 100px 0;
  position: relative;
}

.sim-box {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-cozy);
  display: flex;
  flex-direction: column;
  height: 520px;
}

.sim-header {
  background: hsl(35, 30%, 98%);
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sim-npc-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-npc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background-color: hsl(35, 20%, 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.sim-npc-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.sim-npc-info span {
  font-size: 0.75rem;
  color: var(--color-secondary);
  font-weight: 500;
}

.sim-badge {
  background: hsla(146, 22%, 36%, 0.1);
  color: var(--color-secondary);
  border: 1px solid hsla(146, 22%, 36%, 0.25);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.sim-chat {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: hsl(35, 10%, 99%);
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  animation: fadeIn 0.25s ease forwards;
}

.bubble-npc {
  background: hsl(35, 30%, 94%);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid hsla(35, 20%, 80%, 0.3);
}

.bubble-player {
  background: var(--color-primary);
  color: var(--text-light);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px hsla(14, 70%, 52%, 0.15);
}

.bubble-system {
  align-self: center;
  background: hsla(220, 25%, 15%, 0.04);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  font-weight: 500;
}

.sim-choices-panel {
  background: hsl(35, 30%, 98%);
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
}

.sim-choices-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.sim-choices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .sim-choices-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.sim-choice-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 12px 18px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.sim-choice-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sim-choice-translation {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Gameplay gallery rows */
.gameplay {
  padding: 100px 0;
  background-color: hsla(35, 20%, 93%, 0.4);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.gallery-row {
  display: flex;
  align-items: center;
  gap: 60px;
}

.gallery-row:nth-child(even) {
  flex-direction: row-reverse;
}

.gallery-image {
  flex: 1.2;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-cozy);
}

.gallery-image img {
  width: 100%;
  display: block;
  transition: var(--transition-smooth);
}

.gallery-row:hover .gallery-image img {
  transform: scale(1.02);
}

.gallery-text {
  flex: 1;
}

.gallery-badge {
  color: var(--color-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: block;
}

.gallery-text h3 {
  font-size: 2.2rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.gallery-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Waitlist Application Card */
.pre-register {
  padding: 100px 0 140px;
  position: relative;
}

.register-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 56px;
  box-shadow: var(--shadow-cozy);
  position: relative;
}

.register-card h3 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  text-align: center;
}

.register-card .lead {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: hsl(35, 10%, 99%);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 12px hsla(14, 70%, 52%, 0.08);
  background-color: var(--bg-card);
}

/* Success Form State */
.form-success-wrapper {
  text-align: center;
  display: none;
  padding: 24px 0;
}

.success-icon {
  width: 76px;
  height: 76px;
  background: hsla(146, 22%, 36%, 0.08);
  border: 2.5px solid var(--color-success);
  color: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 24px;
}

.form-success-wrapper h4 {
  font-size: 2rem;
  font-family: 'Fraunces', serif;
  margin-bottom: 12px;
}

.form-success-wrapper p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Admin Dashboard Styling */
.admin-page {
  padding: 130px 0 80px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-cozy);
}

.stat-val {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: 'Fraunces', serif;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: 40px;
  box-shadow: var(--shadow-cozy);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}

th {
  background-color: hsl(35, 20%, 97%);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

tr:hover td {
  background-color: hsl(35, 30%, 99%);
}

.td-actions {
  display: flex;
  gap: 12px;
}

.btn-danger {
  background: hsla(0, 75%, 60%, 0.08);
  color: hsl(0, 75%, 50%);
  border: 1px solid hsla(0, 75%, 60%, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-danger:hover {
  background: hsl(0, 75%, 55%);
  color: var(--text-light);
  border-color: transparent;
}

.btn-export {
  background: hsla(146, 22%, 36%, 0.08);
  color: var(--color-secondary);
  border: 1px solid hsla(146, 22%, 36%, 0.2);
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-export:hover {
  background: var(--color-secondary);
  color: var(--text-light);
}

/* Footer Section */
footer {
  background: hsl(35, 20%, 94%);
  border-top: 1px solid var(--border-light);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Response */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 2.6rem;
  }
  .gallery-row {
    flex-direction: column !important;
    gap: 30px;
  }
  .navbar-container {
    padding: 0 1.25rem;
  }
  .nav-links {
    display: none;
  }
  .register-card {
    padding: 40px 24px;
  }
}
