@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Press+Start+2P&display=swap');

:root {
  --primary: #00f5ff;
  --primary-light: #5dfdff;
  --primary-foreground: #0a0e27;
  --accent: #ff006e;
  --secondary: #8338ec;
  --tertiary: #ffbe0b;
  --background: #0a0e27;
  --card-bg: #151b3d;
  --muted: #1e2749;
  --border: #00f5ff33;
  --ring: #00f5ff;
  --success: #3bff6c;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--background);
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;

  /* Animated background */
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      rgba(0, 245, 255, 0.05) 25%,
      rgba(0, 245, 255, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(0, 245, 255, 0.05) 75%,
      rgba(0, 245, 255, 0.05) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      rgba(0, 245, 255, 0.05) 25%,
      rgba(0, 245, 255, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(0, 245, 255, 0.05) 75%,
      rgba(0, 245, 255, 0.05) 76%,
      transparent 77%,
      transparent
    );
  background-size: 50px 50px;
}

/* Legal pages (privacy/terms) */
.legal-page .hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.legal-page h2 {
  font-size: 1.35rem;
  line-height: 1.25;
}

.legal-page a:not(.logo),
#cookie-banner a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-page a:not(.logo):visited,
#cookie-banner a:visited {
  color: rgba(255, 255, 255, 0.7);
}

.legal-page a:not(.logo):hover,
#cookie-banner a:hover {
  color: var(--primary);
}

.legal-page a.logo {
  color: var(--primary);
}

/* Header */
.header-gaming {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.header-gaming.scrolled {
  box-shadow: 0 10px 40px rgba(0, 245, 255, 0.1);
}

.header-gaming .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
}

.logo .icon {
  font-size: 2rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s;
}

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

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

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

.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--tertiary);
}

.stars i {
  font-size: 0.95em;
}

.burger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background: #fff;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    flex-direction: column;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

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

  .burger-menu {
    display: flex;
  }
}

/* Hero Section */
.hero {
  position: relative;
  padding: 120px 2rem 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(0, 245, 255, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

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

/* Sections */
section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

section h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  color: var(--primary);
  text-align: center;
  line-height: 1.2;
}

section h2 .icon-inline {
  gap: 0.35rem;
}

section h2 .icon-inline i {
  font-size: 0.9em;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 245, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 245, 255, 0.5);
}

.btn-secondary {
  display: inline-block;
  padding: 16px 30px;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 0;
}

.btn-secondary:hover {
  background: rgba(0, 245, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

/* Grid Layouts */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Centered grids for uneven counts (e.g., 3 or 2 cards) */
.grid-cards.center-cards {
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  justify-content: center;
}

/* Responsive helper: force split grids to stack on tablets */
@media (max-width: 900px) {
  .grid-cards.stack-900 {
    grid-template-columns: 1fr !important;
  }
}

/* Game Cards */
.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 245, 255, 0.2);
  border-color: var(--primary);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--muted), var(--card-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex: 0 0 auto;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-content {
  padding: 1.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Keep CTA buttons aligned to the bottom regardless of text length */
.game-card-content .btn-primary,
.game-card-content .btn-secondary {
  margin-top: auto !important;
}

.game-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-light);
}

.game-card-genre {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 0;
  align-self: flex-start;
}

.game-card-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  color: var(--tertiary);
}

/* Features List */
.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0;
}

.features-list li {
  background: var(--muted);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: 0.3s;
}

.features-list li:hover {
  transform: translateY(-5px);
  border-color: var(--success);
}

/* Footer */
.footer-gaming {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-gaming .social-icons {
  display: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.footer-col h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

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

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icons a {
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Forms */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.card-panel {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.grid-cards.contact-layout {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
}

.contact-tiles {
  height: 100%;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-tile {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.contact-tile-title {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-tile-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.contact-tile a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-tile a:visited {
  color: rgba(255, 255, 255, 0.7);
}

.contact-tile a:hover {
  color: var(--primary);
}

.contact-tile-main i {
  font-size: 1.3rem;
  color: var(--primary);
}

.contact-tile-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .grid-cards.contact-layout {
    grid-template-columns: 1fr !important;
  }

  .contact-tiles {
    height: auto;
    grid-template-rows: none;
    grid-auto-rows: auto;
  }
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: white;
  font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: rgba(30, 39, 73, 0.8);
  border: 1px solid var(--border);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
  border-color: var(--primary);
}

.filter-btn.active {
  background: transparent;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.filter-btn.active::before {
  opacity: 1;
}

/* Cookie Banner */
#cookie-banner {
  position: fixed;
  bottom: -200px; /* Start hidden below screen */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(21, 27, 61, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 0 40px rgba(0, 245, 255, 0.2);
  z-index: 10000;
  transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#cookie-banner.show {
  bottom: 2rem;
}

#cookie-banner p {
  margin: 0;
  color: white;
  font-size: 0.95rem;
}

#cookie-banner button {
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--primary-foreground);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
  transition: all 0.3s ease;
}

#cookie-banner button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 245, 255, 0.5);
}

@media (max-width: 600px) {
  .hero {
    padding: 90px 1.25rem 60px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1.25rem;
  }

  .hero p {
    font-size: 1rem;
    margin: 0 auto 2rem;
  }

  .hero .icon-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
  }

  .hero h1 .icon-inline i {
    font-size: 2.4rem;
    line-height: 1;
  }

  #cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    bottom: -300px;
    width: 95%;
  }

  #cookie-banner.show {
    bottom: 1rem;
  }

  #cookie-banner button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  h1 > .icon-inline {
    flex-direction: column !important;
  }

  h2 > .icon-inline {
    flex-direction: column !important;
  }
}
