/* MyExovik - Dark Fantasy Adventure Theme */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #8B3A3A;
  --secondary-color: #D2691E;
  --accent-color: #FF6347;
    /* White + Orange theme variables */
    --primary-color: #ffffff; /* page background */
    --secondary-color: #ffffff; /* used for lighter blocks */
    --accent-color: #ff6a00; /* bright orange */
    --accent-dark: #e65a00; /* darker orange for borders/shadows */
    --dark-bg: #ffffff; /* switch dark bg to white for consistency */
    --light-bg: #ffffff; /* cards and sections will use subtle off-white */
    --text-light: #222222; /* primary text color (dark) */
    --text-muted: #666666; /* muted text */
    --text-accent: #ff6a00; /* accent text color */
    --shadow-dark: rgba(0, 0, 0, 0.08);
    --shadow-glow: rgba(255, 106, 0, 0.12);
    --border-accent: rgba(230, 90, 0, 0.12);
    --gradient-main: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

body {
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  line-height: 1.6;
  color: var(--text-light);
  background: var(--gradient-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header */
.header {
  /* Floating centered header */
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  width: calc(100% - 40px);
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 30px var(--shadow-dark), 0 2px 8px var(--shadow-glow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.4rem;
  gap: 0.5rem;
}

.brand img {
  width: 35px;
  height: 35px;
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 6px 18px var(--shadow-glow);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--accent-color);
  margin: 3px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  /* Use a neutral fallback; image is injected via ::before so we can apply filters */
  background: var(--primary-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  /* background image layer with subtle desaturation and dimming to 'dull' it */
  content: '';
  position: absolute;
  inset: 0;
  background: url('hero.jpg') center/cover no-repeat;
  filter: grayscale(12%) contrast(0.95) brightness(0.66) saturate(0.9);
  transform: scale(1.03);
  z-index: 0;
}

.hero::after {
  /* neutral semi-opaque overlay to ensure text contrast */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.6rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  color: var(--text-light);
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-dark));
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 8px 20px var(--shadow-glow);
  text-transform: none;
  letter-spacing: 0.6px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: var(--text-light);
}

/* Sections */
section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 2.2rem;
  color: var(--text-light);
  font-weight: 800;
}

/* Disclaimer Notice */
.disclaimer-section {
  background: var(--light-bg);
  border-left: 5px solid var(--accent-color);
  border-radius: 10px;
  margin: 2rem 0;
  box-shadow: 0 8px 25px var(--shadow-dark);
}

.notice {
  padding: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--light-bg) 0%, rgba(139, 58, 58, 0.2) 100%);
  border-radius: 8px;
}

.notice-title {
  color: var(--text-accent);
  margin-bottom: 1rem;
  font-size: 1.6rem;
  font-weight: 700;
}

/* Game Section */
.game-section {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 4rem 0;
  margin: 3rem 0;
  box-shadow: 0 10px 40px var(--shadow-dark);
  border: 1px solid var(--border-accent);
}

.game-grid {
  /* Force vertical order: one card per row stacked vertically */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
  align-items: center; /* center the cards horizontally */
}

.game-card {
  background: var(--dark-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--border-accent);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px var(--shadow-dark);
  width: 100%;
  max-width: 900px; /* cap width */
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px var(--shadow-glow);
  border-color: var(--accent-color);
}

.game-card h3 {
  color: var(--text-accent);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-align: center;
}

.game-iframe {
  width: 100%;
  /* Keep 16:9 aspect ratio. When width > 900px, max width is controlled by parent. */
  aspect-ratio: 16 / 9;
  height: 600px;
  border: none;
  border-radius: 8px;
  max-width: 900px;

  background: var(--dark-bg);
  display: block;
}

/* About Section */
.about {
  background: #ffffff;
  border-radius: 14px;
  margin: 2.5rem 0;
  padding: 3rem;
  box-shadow: 0 8px 30px var(--shadow-dark);
  text-align: center;
}

.about h2 {
  color: var(--text-accent);
  margin-bottom: 2rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.about p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* About layout: image left, content right */
.about-layout {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.about-media {
  flex: 1 1 40%;
  display: flex;
  justify-content: center;
}

.about-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  object-fit: cover;
  border: 1px solid var(--border-accent);
}

.about-content {
  flex: 1 1 60%;
  text-align: left;
}

.about-content h2 {
  margin-top: 0;
}

/* Features */
.features {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.features-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 3rem;
}

.feature-box {
  background: var(--light-bg);
  border: 2px solid var(--border-accent);
  border-radius: 15px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px var(--shadow-dark);
  flex: 1;
  min-width: 280px;
  max-width: 350px;
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 45px var(--shadow-glow);
  border-color: var(--accent-color);
}

.feature-icon {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.feature-box h3 {
  color: var(--text-accent);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-box p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Contact Form */
.contact-form {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: 0 10px 40px var(--shadow-dark);
  border: 1px solid var(--border-accent);
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-accent);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-accent);
  border-radius: 8px;
  background: var(--dark-bg);
  color: var(--text-light);
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px var(--shadow-glow);
}

/* Footer */
.footer {
  background: transparent;
  border-top: 0;
  padding: 0 0 2rem;
  margin-top: 4rem;
  position: relative;
}

.footer-wave {
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color) 0%, var(--text-gold) 50%, var(--accent-color) 100%);
}

.footer-main {
  padding: 4rem 0 2rem;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  flex-wrap: wrap;
}

.footer-brand-section {
  flex: 2;
  min-width: 300px;
}

.footer-brand-section .brand {
  margin-bottom: 1.5rem;
}

.footer-description {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.footer-nav-section {
  flex: 1;
  min-width: 200px;
}

.footer-nav-section h4 {
  color: var(--text-gold);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  position: relative;
}

.footer-nav-section h4::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-color);
}

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

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 10px;
}

.footer-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-color) 50%, transparent 100%);
  margin: 3rem 0;
}

.footer-notice {
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.06), rgba(255, 106, 0, 0.03));
  padding: 1.4rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border-accent);
}

.footer-notice p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.footer-copyright {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border-accent);
  background: rgba(56, 56, 56, 0.8);
}

.footer-copyright p {
  margin: 0;
  color: var(--dark-bg);
  font-size: 0.9rem;
}

.footer-copyright .highlight {
  color: var(--text-gold);
  font-weight: 600;
}

/* Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Fallback background for browsers without backdrop-filter */
  background-color: rgba(0, 0, 0, 0.75);
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.popup.show {
  display: flex;
}

.popup-content {
  background: var(--light-bg);
  border: 3px solid var(--accent-color);
  border-radius: 15px;
  padding: 3rem;
  max-width: 500px;
  margin: 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
}

.popup-content::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
}

.popup-title {
  color: var(--text-accent);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.popup-text {
  margin-bottom: 2rem;
  line-height: 1.6;
  color: var(--text-light);
}

.popup-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Legal Pages */
.legal-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  padding: 80px 0 40px;
  text-align: center;
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  font-weight: 800;
  color: var(--text-accent);
}

.page-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
}

.legal-content {
  padding: 5rem 0;
}

.legal-document {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 3rem;
  box-shadow: 0 10px 40px var(--shadow-dark);
  border: 1px solid var(--border-accent);
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section h2 {
  color: var(--text-accent);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.legal-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.legal-footer {
  border-top: 2px solid var(--border-accent);
  padding-top: 2rem;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-gold);
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 20px var(--shadow-dark);
    border-top: 2px solid var(--accent-color);
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 1rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-accent);
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

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

  .features-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .popup-content {
    margin: 1rem;
    padding: 2rem;
  }

  .popup-actions {
    flex-direction: column;
  }

  .container {
    padding: 0 1rem;
  }

  section {
    padding: 3rem 0;
  }

  .page-title {
    font-size: 2.5rem;
  }

  /* Stack about image above content on narrow screens */
  .about-layout {
    flex-direction: column-reverse;
    align-items: center;
    gap: 1.5rem;
  }

  .about-media {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .about-img {
    max-width: 320px; /* tighter cap on small screens */
    width: 80%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .game-iframe {
    height: 250px;
  }

  .legal-document {
    padding: 2rem;
  }
}

/* Utility Classes */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

/* Page top padding to offset fixed header
   Apply to <body> on pages that need extra space under the fixed .header */
.padded-top {
  padding-top: 110px; /* default offset to clear fixed header */
}

@media (max-width: 768px) {
  .padded-top { padding-top: 90px; }
}

@media (max-width: 480px) {
  .padded-top { padding-top: 70px; }
}

/* Smooth animations */
html {
  scroll-behavior: smooth;
}

/* Focus styles */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}