@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');

:root {
  /* Colors */
  --bg-primary: #020203;
  --bg-secondary: #0c0f14;
  
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-gloss: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  
  --accent-red-start: #b91c1c;
  --accent-red-end: #ef4444;
  --accent-red: linear-gradient(135deg, var(--accent-red-start), var(--accent-red-end));
  
  --accent-gold-start: #facc15;
  --accent-gold-end: #f59e0b;
  --accent-gold: linear-gradient(135deg, var(--accent-gold-start), var(--accent-gold-end));
  
  --accent-jade-start: #10b981;
  --accent-jade-end: #059669;
  --accent-jade: linear-gradient(135deg, var(--accent-jade-start), var(--accent-jade-end));
  
  /* Glows */
  --glow-red: rgba(239, 68, 68, 0.35);
  --glow-gold: rgba(250, 204, 21, 0.35);
  --glow-jade: rgba(16, 185, 129, 0.30);
  
  /* Typography */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --max-width: 1280px;
  --nav-width: 90px;
  --nav-offset: 120px;
  --spacing-desktop: 120px;
  --spacing-tablet: 80px;
  --spacing-mobile: 60px;
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* =========================================
   LAYOUT SYSTEM
   ========================================= */
.main-layout {
  padding-left: var(--nav-offset);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.section-spacing {
  padding: var(--spacing-desktop) 0;
}

/* =========================================
   UTILITIES & GLASSMORPHISM
   ========================================= */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255,255,255,0.15);
  border-left: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: var(--glass-gloss);
  pointer-events: none;
  opacity: 0.5;
}

.text-gold {
  background: var(--accent-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* =========================================
   BUTTON SYSTEM
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  z-index: -1;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent-gold);
  color: #451a03; /* Dark brown for high contrast on gold */
  box-shadow: 0 4px 15px var(--glow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--glow-gold);
  color: #000;
}

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

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

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,204,21,0.5);
  box-shadow: 0 0 15px rgba(250,204,21,0.2);
  transform: translateY(-2px);
}

/* =========================================
   FLOATING IMPERIAL NAV
   ========================================= */
.imperial-nav {
  position: fixed;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
  width: var(--nav-width);
  height: 80vh;
  max-height: 800px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(250, 204, 21, 0.3);
  transition: all 0.3s ease;
}

.imperial-nav:hover {
  box-shadow: 0 0 30px var(--glow-gold), inset 0 0 0 1px rgba(250, 204, 21, 0.6);
}

.nav-brand {
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: bold;
  font-family: var(--font-heading);
  box-shadow: 0 0 15px var(--glow-gold);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: auto 0;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold-start);
  transform: translateY(-3px);
}

.nav-link:hover svg, .nav-link.active svg {
  filter: drop-shadow(0 0 8px var(--glow-gold));
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--accent-gold);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--glow-gold);
}

.nav-bottom {
  margin-top: auto;
}

.nav-play-btn {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--accent-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--glow-red);
  transition: all 0.3s ease;
}

.nav-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px var(--glow-red);
}

.nav-play-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('images/china-town.png') center/cover no-repeat;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(2,2,3,0.4) 0%, rgba(2,2,3,0.9) 80%, rgba(2,2,3,1) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
  animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--accent-gold-start);
  font-size: 0.875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 60px;
}

.hero-legal-text {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 10;
  padding: 0 20px;
}

/* Hero Animations (Lanterns & Particles) */
.lantern {
  position: absolute;
  z-index: 3;
  width: 30px;
  height: 45px;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border-radius: 10px 10px 15px 15px;
  box-shadow: 0 0 20px var(--glow-red), inset 0 0 10px rgba(255,255,255,0.5);
  animation: floatUp 15s infinite linear;
  opacity: 0.8;
}

.lantern::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 15px; height: 5px;
  background: #facc15;
  border-radius: 2px;
}

.lantern::after {
  content: '';
  position: absolute;
  bottom: -15px; left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 15px;
  background: #facc15;
  box-shadow: -4px 0 0 #facc15, 4px 0 0 #facc15;
}

.l-1 { left: 15%; bottom: -100px; animation-duration: 22s; transform: scale(0.6); }
.l-2 { left: 35%; bottom: -150px; animation-duration: 18s; animation-delay: 2s; transform: scale(1.2); }
.l-3 { left: 70%; bottom: -50px; animation-duration: 25s; animation-delay: 5s; transform: scale(0.8); }
.l-4 { left: 85%; bottom: -200px; animation-duration: 20s; animation-delay: 1s; transform: scale(1); }

.particles {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: radial-gradient(circle, #facc15 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.1;
  z-index: 3;
  animation: particleShimmer 10s infinite linear;
}

/* =========================================
   GAME SECTION
   ========================================= */
.game-section {
  position: relative;
  z-index: 10;
  margin-top: -80px;
  padding-bottom: var(--spacing-desktop);
}

.game-header {
  text-align: center;
  margin-bottom: 40px;
}

.game-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.game-container {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 24px;
  padding: 4px; /* Space for animated border */
  position: relative;
  background: var(--bg-secondary);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px;
  background: conic-gradient(from 0deg, transparent 0%, var(--accent-gold-start) 25%, var(--accent-red-start) 50%, transparent 50%);
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
  opacity: 0.8;
}

.game-container:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(250, 204, 21, 0.15);
}

.game-frame-wrapper {
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.game-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* =========================================
   FEATURES SECTION
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  padding: 40px 30px;
  border-radius: 24px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-card:nth-child(1):hover { box-shadow: 0 10px 30px var(--glow-gold); }
.feature-card:nth-child(2):hover { box-shadow: 0 10px 30px var(--glow-jade); }
.feature-card:nth-child(3):hover { box-shadow: 0 10px 30px var(--glow-red); }

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.icon-gold { color: var(--accent-gold-start); box-shadow: inset 0 0 20px var(--glow-gold); }
.icon-jade { color: var(--accent-jade-start); box-shadow: inset 0 0 20px var(--glow-jade); }
.icon-red { color: var(--accent-red-start); box-shadow: inset 0 0 20px var(--glow-red); }

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* =========================================
   INNER PAGES (Standard Layout)
   ========================================= */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(250, 204, 21, 0.1) 0%, transparent 60%);
}

.page-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.page-content-wrapper {
  padding: 40px;
  border-radius: 24px;
  margin-bottom: 80px;
}

.content-text h2 {
  font-size: 2rem;
  margin: 40px 0 20px;
  color: var(--accent-gold-start);
}

.content-text p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.content-text ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.content-text li {
  margin-bottom: 10px;
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold-start);
  box-shadow: 0 0 10px var(--glow-gold);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px;
  background: var(--bg-secondary);
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: block;
}

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

.footer-links-group h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-gold-start);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto 10px;
  color: #9ca3af;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(var(--scale, 1)) rotate(-5deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-120vh) scale(var(--scale, 1)) rotate(5deg); opacity: 0; }
}

@keyframes rotateBorder {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes particleShimmer {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* =========================================
   MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
  :root {
    --nav-offset: 0;
  }
  
  .main-layout {
    padding-left: 0;
    padding-bottom: 80px; /* Space for bottom nav */
  }
  
  .imperial-nav {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 70px;
    border-radius: 20px 20px 0 0;
    flex-direction: row;
    padding: 0 20px;
    justify-content: space-between;
  }
  
  .nav-brand {
    display: none; /* Hide logo on mobile nav */
  }
  
  .nav-links {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    gap: 0;
  }
  
  .nav-link.active::after {
    left: 50%;
    top: auto;
    bottom: -10px;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    border-radius: 4px 4px 0 0;
  }
  
  .nav-bottom {
    display: none; /* Hide play btn on mobile nav to save space */
  }
  
  .hero-title { font-size: 3rem; }
  
  .game-section {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 250px; }
  
  .page-title { font-size: 2.5rem; }
  .page-content-wrapper { padding: 20px; }
}