/* =========================================
   GAMESO - RACING CATEGORY
   ========================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #070a14;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}


/* =========================================
   HEADER
   ========================================= */

.site-header {
  width: 100%;
  height: 72px;
  padding: 0 6%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(7, 10, 20, 0.96);
  border-bottom: 1px solid #20273a;

  position: sticky;
  top: 0;
  z-index: 1000;

  backdrop-filter: blur(12px);
}


/* LOGO */

.logo {
  display: flex;
  align-items: center;
  gap: 10px;

  color: #ffffff;
  text-decoration: none;

  font-size: 23px;
  font-weight: 900;
}

.logo-icon {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: linear-gradient(
    135deg,
    #7657ff,
    #4d36c7
  );

  font-size: 20px;

  box-shadow:
    0 7px 22px rgba(118, 87, 255, 0.25);
}


/* BACK BUTTON */

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;

  border: 1px solid #303951;
  border-radius: 10px;

  color: #aeb8d1;
  text-decoration: none;

  font-size: 13px;
  font-weight: 700;

  transition: all 0.25s ease;
}

.back-btn:hover {
  color: #ffffff;
  border-color: #7657ff;
  background: rgba(118, 87, 255, 0.12);
}


/* =========================================
   MAIN
   ========================================= */

.racing-page {
  width: 100%;
  max-width: 1180px;

  margin: 0 auto;

  padding: 65px 25px 80px;
}


/* =========================================
   PAGE HEADING
   ========================================= */

.page-heading {
  width: 100%;
  max-width: 760px;

  margin: 0 auto 45px;

  text-align: center;
}

.category-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 15px;

  border: 1px solid rgba(118, 87, 255, 0.4);
  border-radius: 50px;

  background: rgba(118, 87, 255, 0.08);

  color: #b7adff;

  font-size: 11px;
  font-weight: 900;

  letter-spacing: 1.4px;

  margin-bottom: 16px;
}

.page-heading h1 {
  margin: 0 0 16px;

  font-size: clamp(42px, 6vw, 68px);

  line-height: 1.05;

  font-weight: 900;

  letter-spacing: -2px;

  background: linear-gradient(
    135deg,
    #ffffff 20%,
    #a89bff 100%
  );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.page-heading p {
  max-width: 680px;

  margin: 0 auto;

  color: #8f9ab8;

  font-size: 15px;

  line-height: 1.7;
}


/* =========================================
   GAMES GRID
   ========================================= */

.games-grid {
  width: 100%;

  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 24px;

  align-items: stretch;
}


/* =========================================
   GAME CARD
   ========================================= */

.game-card {
  width: 100%;
  min-width: 0;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      #111827,
      #0b111f
    );

  border: 1px solid #29324a;

  border-radius: 18px;

  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.game-card:hover {
  transform: translateY(-7px);

  border-color: rgba(118, 87, 255, 0.65);

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(118, 87, 255, 0.08);
}


/* =========================================
   CARD LINK
   ========================================= */

.game-link {
  display: block;

  width: 100%;

  color: inherit;

  text-decoration: none;
}


/* =========================================
   GAME IMAGE
   ========================================= */

.game-image {
  width: 100%;
  height: 220px;

  position: relative;

  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  border-bottom: 1px solid #29324a;
}


/* =========================================
   TRAFFIC RACER IMAGE
   ========================================= */

.traffic-image {
  background:
    linear-gradient(
      90deg,
      #101c14 0%,
      #101c14 16%,
      #292d34 16%,
      #292d34 84%,
      #101c14 84%,
      #101c14 100%
    );
}


/* ROAD LANE */

.traffic-image::before {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;

  left: 16%;
  right: 16%;

  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 38px,
      rgba(255,255,255,0.72) 38px,
      rgba(255,255,255,0.72) 70px,
      transparent 70px,
      transparent 108px
    );

  opacity: 0.75;
}


/* ROAD EDGES */

.traffic-image::after {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;

  left: 16%;
  right: 16%;

  border-left: 4px solid rgba(255,255,255,0.65);
  border-right: 4px solid rgba(255,255,255,0.65);

  pointer-events: none;
}


/* =========================================
   CAR EMOJI
   ========================================= */

.game-emoji {
  position: relative;

  z-index: 5;

  display: block;

  font-size: 76px;

  line-height: 1;

  filter:
    drop-shadow(
      0 15px 16px rgba(0,0,0,0.55)
    );

  transition:
    transform 0.3s ease;
}

.game-card:hover .game-emoji {
  transform:
    translateY(-5px)
    scale(1.1);
}


/* =========================================
   SPEED LINES
   ========================================= */

.speed-effect {
  position: absolute;

  z-index: 2;

  width: 4px;
  height: 42px;

  border-radius: 20px;

  background: rgba(255,255,255,0.45);

  animation:
    speedMove 1.1s linear infinite;
}

.speed-one {
  left: 30%;
  top: -50px;

  animation-delay: 0s;
}

.speed-two {
  left: 52%;
  top: -20px;

  animation-delay: 0.35s;
}

.speed-three {
  left: 72%;
  top: -80px;

  animation-delay: 0.7s;
}

@keyframes speedMove {

  0% {
    transform: translateY(0);
    opacity: 0;
  }

  20% {
    opacity: 0.7;
  }

  100% {
    transform: translateY(320px);
    opacity: 0;
  }

}


/* =========================================
   CARD CONTENT
   ========================================= */

.game-content {
  width: 100%;

  padding: 20px;
}

.game-content h2 {
  margin: 0 0 11px;

  color: #ffffff;

  font-size: 21px;
  line-height: 1.25;

  font-weight: 850;
}

.game-meta {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 12px;

  font-size: 12px;
  font-weight: 700;
}

.game-meta span:first-child {
  color: #a99cff;
}

.game-meta span:last-child {
  color: #ffd84a;
}

.game-content p {
  min-height: 43px;

  margin: 0 0 17px;

  color: #818ca7;

  font-size: 13px;

  line-height: 1.65;
}


/* =========================================
   PLAY BUTTON
   ========================================= */

.play-btn {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px 15px;

  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      #7657ff,
      #5940d5
    );

  color: #ffffff;

  font-size: 12px;

  font-weight: 850;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;

  box-shadow:
    0 7px 20px rgba(118, 87, 255, 0.12);
}

.game-card:hover .play-btn {
  background:
    linear-gradient(
      135deg,
      #866cff,
      #654be2
    );

  box-shadow:
    0 10px 25px rgba(118, 87, 255, 0.22);
}


/* =========================================
   FOOTER
   ========================================= */

.site-footer {
  width: 100%;

  padding: 25px 20px;

  border-top: 1px solid #20273a;

  text-align: center;

  color: #68738f;

  font-size: 12px;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 950px) {

  .racing-page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .games-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 20px;
  }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 650px) {

  .site-header {
    height: 64px;

    padding: 0 16px;
  }

  .logo {
    font-size: 20px;
  }

  .logo-icon {
    width: 35px;
    height: 35px;

    font-size: 18px;
  }

  .back-btn {
    padding: 8px 11px;

    font-size: 11px;
  }

  .racing-page {
    width: 100%;

    padding: 42px 15px 60px;
  }

  .page-heading {
    margin-bottom: 30px;
  }

  .page-heading h1 {
    font-size: 43px;

    letter-spacing: -1.5px;
  }

  .page-heading p {
    padding: 0 5px;

    font-size: 13px;
  }

  .games-grid {
    grid-template-columns: 1fr;

    gap: 17px;
  }

  .game-image {
    height: 205px;
  }

  .game-emoji {
    font-size: 72px;
  }

  .game-content {
    padding: 18px;
  }

  .game-content h2 {
    font-size: 20px;
  }

}


/* =========================================
   SMALL MOBILE
   ========================================= */

@media (max-width: 380px) {

  .site-header {
    padding: 0 12px;
  }

  .logo {
    font-size: 18px;
  }

  .back-btn {
    padding: 7px 9px;

    font-size: 10px;
  }

  .racing-page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-heading h1 {
    font-size: 37px;
  }

  .game-image {
    height: 190px;
  }

}
