:root {
  /* Colors */
  --bg-primary: #050a08;
  --bg-secondary: #0f1f1a;
  --card-bg: rgba(255, 255, 255, 0.04);
  --jade: #22c55e;
  --emerald: #10b981;
  --forest: #166534;
  --gold: #facc15;
  --text-primary: #ecfdf5;
  --text-secondary: #86efac;
  
  /* Fonts */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 15px;
}

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

/* Mobile Header */
.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(15, 31, 26, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.mobile-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--jade);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--jade);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Curved Sidebar & 3D Icon System */
.curved-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 80px;
  height: 100vh;
  background: rgba(15, 31, 26, 0.6);
  backdrop-filter: blur(15px);
  border-right: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 0 100% 100% 0 / 0 50% 50% 0; /* Smooth Curved Arc */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  z-index: 1000;
  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 35px;
  perspective: 1200px; /* Crucial for 3D effect */
}

.icon-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  display: block;
  transform-style: preserve-3d;
}

.icon-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(34,197,94,0.05), rgba(16,185,129,0.15));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--jade);
  box-shadow: 0 10px 15px rgba(0,0,0,0.5), inset 0 0 10px rgba(34,197,94,0.1);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
  animation: floatIcon 4s ease-in-out infinite alternate;
}

/* Stagger floating animations */
.icon-wrapper:nth-child(1) .icon-inner { animation-delay: 0s; }
.icon-wrapper:nth-child(2) .icon-inner { animation-delay: 0.5s; }
.icon-wrapper:nth-child(3) .icon-inner { animation-delay: 1.0s; }
.icon-wrapper:nth-child(4) .icon-inner { animation-delay: 1.5s; }
.icon-wrapper:nth-child(5) .icon-inner { animation-delay: 2.0s; }

@keyframes floatIcon {
  0% { transform: translateY(-3px) translateZ(5px); }
  100% { transform: translateY(3px) translateZ(15px); }
}

.icon-wrapper:hover .icon-inner {
  animation-play-state: paused;
  transform: translateZ(40px) rotateX(15deg) rotateY(-15deg) scale(1.1);
  background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(250,204,21,0.15));
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 15px 15px 25px rgba(0,0,0,0.8), -5px -5px 15px rgba(34,197,94,0.5), inset 0 0 20px rgba(250,204,21,0.4);
}

.icon-wrapper svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  transform: translateZ(10px); /* Lifts SVG off the glass panel */
}

/* 3D Tooltip */
.tooltip {
  position: absolute;
  left: 65px;
  top: 50%;
  transform: translateY(-50%) translateZ(-10px) translateX(-10px);
  background: rgba(15, 31, 26, 0.9);
  color: var(--gold);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--jade);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(0,0,0,0.6), 0 0 15px rgba(34,197,94,0.3);
}

.icon-wrapper:hover .tooltip {
  opacity: 1;
  transform: translateY(-50%) translateZ(30px) translateX(10px);
}

/* Main Layout */
.main-wrapper {
  margin-left: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Hero Section (Cinematic Jade Jungle) */
.hero {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: url('images/jade-jungle-temple-bg.jpg') center/cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 10, 8, 0.4), var(--bg-primary) 95%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(5,10,8,0.8) 100%);
  z-index: 1;
}

.light-rays {
  position: absolute;
  top: -50%;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translateX(-50%);
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 2;
  animation: pulseRays 6s ease-in-out infinite alternate;
}

@keyframes pulseRays {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  background: linear-gradient(to right, var(--jade), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--jade), var(--emerald), var(--gold));
  background-size: 200% 200%;
  color: var(--bg-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 16px 40px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.4s ease;
  animation: gradientShift 4s ease infinite;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3), inset 0 -3px 5px rgba(0,0,0,0.2);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(250, 204, 21, 0.4), inset 0 -3px 5px rgba(0,0,0,0.2);
  color: #000;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Game Section */
.game-section {
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-primary);
  position: relative;
  z-index: 5;
}

.section-title {
  font-size: 2.5rem;
  color: var(--jade);
  margin-bottom: 40px;
  text-align: center;
  text-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.game-container {
  width: 950px;
  height: 600px;
  border-radius: 20px;
  border: 2px solid var(--emerald);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.2), inset 0 0 30px rgba(34, 197, 94, 0.1);
  overflow: hidden;
  position: relative;
  background: #000;
}

.game-container::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, var(--jade), var(--forest), var(--gold), var(--emerald));
  z-index: -1;
  filter: blur(10px);
  opacity: 0.5;
  animation: pulseRays 4s infinite alternate;
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Features Section (Glass Cards) */
.features-section {
  padding: 80px 20px;
  background: url('images/ancient-treasure-ruins-bg.jpg') center/cover no-repeat;
  position: relative;
}

.features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 8, 0.85);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.6), 0 0 25px rgba(34, 197, 94, 0.15);
  border-color: rgba(250, 204, 21, 0.4);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.feature-card h3 {
  color: var(--jade);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

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

/* Internal Page Styles */
.page-header {
  padding: 120px 20px 60px;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid rgba(34, 197, 94, 0.1);
}

.page-title {
  font-size: 3rem;
  color: var(--jade);
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

.content-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.content-card h2 {
  color: var(--gold);
  margin-top: 30px;
  margin-bottom: 15px;
}

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

/* Forms */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  color: var(--jade);
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.2);
}

/* Footer */
footer {
  background: #030605;
  padding: 60px 20px 30px;
  border-top: 1px solid rgba(34, 197, 94, 0.1);
  margin-top: auto;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--jade);
}

.disclaimer-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  margin-top: 40px;
}

.disclaimer-box p {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 10px;
}

.disclaimer-box .age-badge {
  display: inline-block;
  background: var(--jade);
  color: #000;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.copyright {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title { font-size: 3rem; }
  .game-container { width: 90%; height: 500px; }
}

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  
  .curved-sidebar {
    transform: translateX(-100%);
    top: 60px; /* Below header */
    height: calc(100vh - 60px);
    width: 100px; /* Slightly wider for touch */
    border-radius: 0 40px 40px 0; /* Less dramatic curve on mobile */
    background: rgba(15, 31, 26, 0.95);
  }

  .curved-sidebar.active {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
    padding-top: 60px; /* Space for mobile header */
  }

  .hero-title { font-size: 2.2rem; }
  .hero-text { font-size: 1rem; }
  
  .game-container { width: 100%; height: 400px; border-radius: 10px; }
  
  .content-card { padding: 30px 20px; }
}