/* Import Nordic-inspired fonts */
@import url('https://fonts.googleapis.com/css2?family=Fjalla+One:wght@400&family=Lato:wght@300;400;500;700&display=swap');

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fjalla One', sans-serif;
  font-weight: 400;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  font-weight: 300;
}

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

.section {
  padding: 4rem 0;
}

/* Header Styles */
.site-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Fjalla One', sans-serif;
  font-size: 1.8rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  text-align: center;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  color: #ffffff;
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="nordic" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23nordic)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #06b6d4, #8b5cf6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #cbd5e1;
  font-weight: 300;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: #ffffff;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(20, 184, 166, 0.6);
}

/* Card Styles */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Games Section */
.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.game-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.game-header {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  padding: 1rem;
  text-align: center;
}

.game-title {
  font-size: 1.2rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* About Section */
.about-section {
  background: #ffffff;
  border-radius: 12px;
  margin: 2rem 0;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.about-text h2 {
  color: #0f172a;
  margin-bottom: 1rem;
}

.about-text p {
  color: #475569;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Media placeholder inside about */
.about-media {
  display: block;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(14, 20, 30, 0.06);
  border: 1px solid rgba(14, 20, 30, 0.03);
}

/* Features Section */
.features-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.feature-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
}

.feature-icon {
  flex: 0 0 56px;
  height: 56px;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(8,145,178,0.06));
  box-shadow: 0 6px 18px rgba(99,102,241,0.06);
}

.feature-card h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.feature-card p {
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
}

/* Hover/interaction for feature cards */
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}


/* Contact Form */
.contact-form {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: 'Lato', sans-serif;
}

.form-control:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Lato', sans-serif;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Legal Pages */
.legal-content {
  background: #ffffff;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  margin: 2rem 0;
}

.legal-content h1 {
  color: #0f172a;
  border-bottom: 3px solid #6366f1;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.legal-content p {
  color: #475569;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-content ul {
  margin: 1rem 0 1rem 2rem;
  color: #475569;
}

.legal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #cbd5e1;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section p,
.footer-section li {
  color: #94a3b8;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #06b6d4;
}

.footer-note {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid #334155;
  margin-top: 2rem;
  backdrop-filter: blur(10px);
  flex: 1 1 100%;
}

.footer-note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-note a {
  color: #06b6d4;
  text-decoration: none;
  font-weight: 500;
}

.footer-note a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  color: #64748b;
  font-size: 0.9rem;
}

/* Age Verification Modal */
.age-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.age-modal-content {
  background: #ffffff;
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
  max-width: 500px;
  margin: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid #e2e8f0;
  position: relative;
}

.age-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
  border-radius: 16px 16px 0 0;
}

.age-modal h2 {
  color: #0f172a;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.age-modal p {
  color: #475569;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.age-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.age-btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Lato', sans-serif;
}

.age-btn.yes {
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: #ffffff;
}

.age-btn.yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
}

.age-btn.no {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
}

.age-btn.no:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform-origin: center;
    /* keep visible above header content */
    z-index: 1100;
  }

  /* ensure header content has room and logo stays left */
  .header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav a {
    display: block;
    padding: 1rem;
    border-radius: 0;
  }

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

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 0.5rem;
  }

  .section {
    padding: 2rem 0;
  }

  .card,
  .legal-content,
  .about-section {
    padding: 1.5rem;
  }

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

  .age-modal-content {
    padding: 2rem;
    margin: 0.5rem;
  }

  .age-buttons {
    flex-direction: column;
  }

  .age-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .game-frame {
    height: 400px;
  }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
  .card,
  .legal-content,
  .about-section {
    border: 2px solid #000000;
  }
  
  .cta-button,
  .btn-primary {
    border: 2px solid #000000;
  }
}

@media (min-width: 900px) {
  /* Two column layout for about and features on larger screens */
  .about-grid {
    grid-template-columns: 40% 60%;
    align-items: center;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .feature-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
  }

  .feature-icon {
    margin-bottom: 0.6rem;
  }
}

/* Disclaimer card used above games */
.disclaimer-card {
  border-left: 4px solid rgba(99,102,241,0.9);
  background: linear-gradient(180deg, rgba(99,102,241,0.03), rgba(8,145,178,0.02));
  padding: 1rem 1.25rem;
  color: #0f172a;
}

.disclaimer-card a {
  color: #06b6d4;
  text-decoration: underline;
}

.disclaimer-card strong {
  display: inline-block;
  margin-right: 0.4rem;
}