:root {
  /* Color system */
  --color-primary: #7C3AED;
  --color-primary-light: #A78BFA;
  --color-primary-dark: #5B21B6;
  --color-secondary: #FBBF24;
  --color-secondary-light: #FDE68A;
  --color-secondary-dark: #D97706;
  --color-accent: #F472B6;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  
  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing system (8px) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  
  /* Border radius */
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.5rem;  /* 8px */
  --radius-lg: 1rem;    /* 16px */
  --radius-xl: 1.5rem;  /* 24px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--color-gray-800);
  background-color: var(--color-gray-50);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--color-gray-900);
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
}

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

/* Utility Classes */
.section-title {
  font-size: 2.25rem;
  margin-bottom: var(--space-6);
  text-align: center;
  position: relative;
  color: var(--color-primary-dark);
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--color-secondary);
  margin: var(--space-3) auto 0;
  border-radius: var(--radius-sm);
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-8);
  color: var(--color-gray-600);
  font-size: 1.125rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-gray-900);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-gray-900);
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo h1 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--color-primary);
  font-weight: 800;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: var(--space-6);
}

.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-gray-700);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 200;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-primary);
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M54 22c0 12-18 30-18 30S18 34 18 22a18 18 0 0 1 36 0z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/></svg>');
  background-size: 80px 80px;
  opacity: 0.2;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: var(--space-4);
  color: white;
}

.hero-title span {
  color: var(--color-secondary);
  display: block;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: var(--space-6);
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
}

.hero-image {
  position: relative;
  max-width: 400px;
}

.hero-image img {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* Games Section */
.games-section {
  padding: var(--space-16) 0;
  background-color: white;
}

.game-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.filter-btn {
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-gray-100);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--color-gray-700);
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: var(--color-gray-200);
  color: var(--color-gray-900);
}

.filter-btn.active {
  background-color: var(--color-primary-light);
  color: white;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.game-card {
  background-color: var(--color-gray-50);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.game-thumbnail {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.game-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-thumbnail img {
  transform: scale(1.05);
}

.game-content {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
  color: var(--color-primary-dark);
}

.game-description {
  color: var(--color-gray-600);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.game-tag {
  padding: var(--space-1) var(--space-2);
  background-color: var(--color-gray-200);
  color: var(--color-gray-700);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.game-tag.multiplayer {
  background-color: var(--color-primary-light);
  color: white;
}

.game-tag.deduction {
  background-color: var(--color-secondary-light);
  color: var(--color-gray-800);
}

.game-tag.funny {
  background-color: var(--color-accent);
  color: white;
}

.game-tag.courtroom {
  background-color: var(--color-warning);
  color: white;
}

.game-actions {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.btn-play {
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all 0.3s ease;
}

.btn-play:hover {
  background-color: var(--color-primary-dark);
  color: white;
}

.game-iframe-container {
  margin-top: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
}

.game-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* FAQ Section */
.faq-section {
  padding: var(--space-16) 0;
  background-color: var(--color-gray-50);
  position: relative;
  overflow: hidden;
}

.faq-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-primary-light) 2px, transparent 2px);
  background-size: 30px 30px;
  opacity: 0.1;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.faq-item {
  background-color: white;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  padding: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.faq-question h3 {
  font-size: 1.125rem;
  margin: 0;
  color: var(--color-gray-800);
  font-weight: 600;
}

.faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--space-4);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 var(--space-4) var(--space-4);
  max-height: 500px;
}

/* About Section */
.about-section {
  padding: var(--space-16) 0;
  background-color: white;
}

.about-section .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
}

.about-content p {
  color: var(--color-gray-700);
  margin-bottom: var(--space-4);
}

.newsletter {
  background-color: var(--color-primary-light);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  color: white;
}

.newsletter h3 {
  color: white;
  margin-bottom: var(--space-2);
}

.newsletter p {
  opacity: 0.9;
  margin-bottom: var(--space-4);
}

.newsletter-form {
  display: flex;
  gap: var(--space-2);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-3);
  border: none;
  border-radius: var(--radius-md);
}

.newsletter-form button {
  background-color: var(--color-secondary);
  color: var(--color-gray-900);
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  background-color: var(--color-secondary-dark);
}

/* Footer */
.site-footer {
  background-color: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-12) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-logo h2 {
  color: white;
  margin-bottom: var(--space-2);
}

.footer-logo p {
  color: var(--color-gray-400);
}

.footer-links h3, .footer-social h3 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: var(--space-4);
}

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

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--color-gray-400);
  transition: color 0.3s ease;
}

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

.social-icons {
  display: flex;
  gap: var(--space-4);
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-gray-800);
  border-radius: 50%;
  color: var(--color-gray-300);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.ad-disclaimer p {
  font-size: 0.75rem;
  color: var(--color-gray-600);
}

/* Responsive styles */
@media (max-width: 1024px) {
  .hero {
    padding: 140px 0 60px;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-image {
    max-width: 320px;
  }
  
  .about-section .container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    margin-bottom: var(--space-8);
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image {
    margin-top: var(--space-8);
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu-active .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 250px;
    background-color: white;
    padding: 100px var(--space-6) var(--space-6);
    box-shadow: var(--shadow-xl);
    z-index: 100;
  }
  
  .mobile-menu-active .nav-links li {
    margin: 0 0 var(--space-4) 0;
  }
  
  .mobile-menu-active .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .mobile-menu-active .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-active .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.125rem;
  }
  
  .section-title {
    font-size: 1.875rem;
  }
  
  .game-filters {
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: var(--space-2);
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-right {
  animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Game display state */
.game-card.show-iframe .game-thumbnail,
.game-card.show-iframe .game-description,
.game-card.show-iframe .game-tags {
  display: none;
}

.game-card.show-iframe .game-iframe-container {
  display: block;
}

.game-iframe-container {
  display: none;
}

/* Game Preview Styles */
.game-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-thumbnail:hover .game-preview {
    opacity: 1;
}

.preview-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease;
}

.preview-btn:hover {
    transform: scale(1.1);
}

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.preview-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.preview-video {
    margin: 20px 0;
    border-radius: 4px;
    overflow: hidden;
}

.preview-video img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-tags {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-tags .game-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #f0f0f0;
}