:root {
  --red: #e60012;
  --blue: #0046af;
  --yellow: #ffd93b;
  --green: #1fa34a;
  --dark-bg: #0b1020;
  --light-bg: #f5f7ff;
  --text-main: #ffffff;
  --text-dark: #111827;
  --card-bg: #141a33;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.35);
  --transition-fast: 0.2s ease-out;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #1b2340 0, #050814 55%, #000000 100%);
  color: var(--text-main);
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(5, 8, 20, 0.9);
  backdrop-filter: blur(12px);
}

.logo {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow);
}

.nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #cbd5ff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav a:hover {
  color: var(--yellow);
}

/* LAYOUT */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.section {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(10, 16, 35, 0.9);
  box-shadow: var(--shadow-soft);
}

.section-light {
  background: var(--light-bg);
  color: var(--text-dark);
}

.section-dark {
  background: linear-gradient(135deg, #0b1020, #141a33);
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.section-header p {
  margin: 0;
  color: #9ca3ff;
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at left, #e60012 0, #0b1020 45%, #050814 100%);
  box-shadow: var(--shadow-soft);
}

.hero-content h1 {
  font-size: 2.2rem;
  margin: 0 0 0.75rem;
}

.hero-content p {
  margin: 0 0 1.5rem;
  max-width: 420px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* BUTTONS */

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: var(--yellow);
  color: #111827;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

.btn-secondary {
  background: transparent;
  color: #e5e7ff;
  border: 1px solid #e5e7ff;
}

.btn-secondary:hover {
  background: #e5e7ff;
  color: #111827;
}

/* HERO CAROUSEL */

.hero-carousel {
  background: rgba(5, 8, 20, 0.85);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carousel-card {
  display: none;
}

.carousel-card.active {
  display: block;
}

.carousel-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.carousel-card p {
  margin: 0;
  color: #d1d5ff;
}

.carousel-dots {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4b5563;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.dot.active {
  background: var(--yellow);
  transform: scale(1.2);
}

/* GAME GRID */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.game-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
}

.game-card h3 {
  margin: 0 0 0.5rem;
}

.game-card p {
  margin: 0 0 0.75rem;
  color: #d1d5ff;
}

.game-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: #9ca3ff;
}

.game-meta li + li {
  margin-top: 0.25rem;
}

.game-tag {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827;
}

.game-tag.racing {
  background: var(--yellow);
}

.game-tag.adventure {
  background: var(--green);
}

.game-tag.action {
  background: var(--blue);
  color: #f9fafb;
}

/* CONSOLE */

.console-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.console-info {
  background: rgba(10, 16, 35, 0.9);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.console-info h3 {
  margin-top: 0;
}

/* COMMUNITY */

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.community-card {
  background: rgba(20, 26, 55, 0.95);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

/* NEWS */

.news-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.news-item {
  background: rgba(10, 16, 35, 0.9);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.news-item h3 {
  margin: 0 0 0.4rem;
}

/* FOOTER */

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.8rem;
  color: #9ca3ff;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .nav {
    margin-top: 0.5rem;
  }
}
.game-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* GAME PAGE */
.game-page {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.game-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.4);
}

.game-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  padding: 1rem 2rem;
  font-size: 1.4rem;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.loader {
    --color-1: rgba(68, 215, 235, 0.2);
    --color-2: #1BB6D8;
    --size: 1px;

    width: calc(160 * var(--size));
    height: calc(8 * var(--size));
    border-radius: calc(4 * var(--size));
    display: block;
    margin: calc(20 * var(--size)) auto;
    position: relative;
    background: var(--color-1);
    overflow: hidden;
    box-sizing: border-box;
}

.loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: calc(70 * var(--size));
    border-radius: inherit;
    background: var(--color-2);
    box-sizing: border-box;
    animation: slide 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes slide {
    0% {
        transform: translateX(calc(-70 * var(--size)));
    }

    100% {
        transform: translateX(calc(160 * var(--size)));
    }
}