/* ============================================
   AI Games Arcade - Landing Page Styles
   ============================================ */
/* --- Header --- */
.site-header {
  text-align: center;
  padding: 24px 0 20px;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-purple), var(--color-accent-pink));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
  text-shadow: none;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.site-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  font-weight: 300;
  color: var(--color-text-muted);
  margin-top: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Joystick Icon (CSS-only) --- */
.header-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.joystick {
  width: 56px;
  height: 56px;
  position: relative;
}

.joystick__base {
  width: 56px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-cyan));
  border-radius: 8px;
  position: absolute;
  bottom: 0;
}

.joystick__stick {
  width: 12px;
  height: 36px;
  background: linear-gradient(to top, var(--color-accent-cyan), var(--color-accent-purple));
  border-radius: 6px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  animation: joystickWobble 3s ease-in-out infinite;
}

.joystick__knob {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 40% 35%, var(--color-accent-pink), var(--color-accent-purple));
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  animation: joystickWobble 3s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
}

@keyframes joystickWobble {

  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  25% {
    transform: translateX(-50%) rotate(6deg);
  }

  75% {
    transform: translateX(-50%) rotate(-6deg);
  }
}

/* --- Game Cards Grid --- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 1100px;
  width: 100%;
  padding: 48px 0 80px;
}

/* --- Individual Game Card --- */
.game-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform var(--transition-smooth), box-shadow 0s;
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-card) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0s;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--color-bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

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

/* Glow variants */
.game-card--purple-cyan::before {
  background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-cyan));
}

.game-card--orange-pink::before {
  background: linear-gradient(135deg, var(--color-accent-orange), var(--color-accent-pink));
}

.game-card--green-yellow::before {
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-yellow));
}

.game-card--blue-magenta::before {
  background: linear-gradient(135deg, var(--color-accent-blue), #d946ef);
}

.game-card--pink-cyan::before {
  background: linear-gradient(135deg, var(--color-accent-pink), var(--color-accent-cyan));
}

/* Card glow shadow on hover */
.game-card--purple-cyan:hover {
  box-shadow: 0 12px 50px rgba(168, 85, 247, 0.2), 0 4px 20px rgba(6, 214, 160, 0.15);
}

.game-card--orange-pink:hover {
  box-shadow: 0 12px 50px rgba(251, 146, 60, 0.2), 0 4px 20px rgba(244, 114, 182, 0.15);
}

.game-card--green-yellow:hover {
  box-shadow: 0 12px 50px rgba(6, 214, 160, 0.12), 0 4px 20px rgba(250, 204, 21, 0.08);
}

.game-card--blue-magenta:hover {
  box-shadow: 0 12px 50px rgba(56, 189, 248, 0.15), 0 4px 20px rgba(217, 70, 239, 0.15);
}

.game-card--pink-cyan:hover {
  box-shadow: 0 12px 50px rgba(244, 114, 182, 0.15), 0 4px 20px rgba(6, 214, 160, 0.15);
}

/* Card Thumbnail Area */
.game-card__thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Abstract geometric thumbnail backgrounds */
.game-card__thumb--gravity {
  background: linear-gradient(160deg, #1a1040 0%, #0d1b2a 100%);
}

.game-card__thumb--snake {
  background: linear-gradient(160deg, #1a0a2e 0%, #0a2a1a 100%);
}

.game-card__thumb--maze {
  background: linear-gradient(160deg, #0a1628 0%, #1a2a0a 100%);
}

.game-card__thumb--quantum {
  background: linear-gradient(160deg, #0f172a 0%, #2e1065 100%);
}

.game-card__thumb--pong {
  background: linear-gradient(160deg, #1f0d2b 0%, #0d2b24 100%);
}

/* Geometric shapes inside thumbnails */
.thumb-shape {
  position: absolute;
  opacity: 0.6;
  transition: transform var(--transition-smooth);
}

.game-card:hover .thumb-shape {
  filter: brightness(1.25);
}

/* Gravity Drop shapes — static layout with gentle pulsing */
.gravity-preview {
  position: absolute;
  width: 152px;
  height: 100%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
}

.thumb-shape--gd-bar {
  height: 4px;
  border-radius: 2px;
  opacity: 0.85;
  animation: gdBarPulse 4s ease-in-out infinite;
}

/* Row 1 (Cyan) */
.thumb-shape--gd-bar-1L {
  width: 50px;
  background: var(--color-accent-cyan);
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.6);
  top: 30px;
  left: 0;
  animation-delay: 0s;
}

.thumb-shape--gd-bar-1R {
  width: 40px;
  background: var(--color-accent-cyan);
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.6);
  top: 30px;
  right: 0;
  animation-delay: 0s;
}

/* Row 2 (Pink) */
.thumb-shape--gd-bar-2L {
  width: 30px;
  background: var(--color-accent-pink);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.6);
  top: 85px;
  left: 0;
  animation-delay: -1s;
}

.thumb-shape--gd-bar-2R {
  width: 70px;
  background: var(--color-accent-pink);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.6);
  top: 85px;
  right: 0;
  animation-delay: -1s;
}

/* Row 3 (Blue) */
.thumb-shape--gd-bar-3L {
  width: 70px;
  background: var(--color-accent-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  top: 140px;
  left: 0;
  animation-delay: -2s;
}

.thumb-shape--gd-bar-3R {
  width: 30px;
  background: var(--color-accent-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  top: 140px;
  right: 0;
  animation-delay: -2s;
}

@keyframes gdBarPulse {

  0%,
  100% {
    opacity: 0.6;
    filter: brightness(0.8);
  }

  50% {
    opacity: 1;
    filter: brightness(1.2);
  }
}

.thumb-shape--gd-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent-purple);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.8), inset 0 0 4px #d8b4fe;
  top: 52px;
  left: 55px;
  animation: gdOrbHover 3s ease-in-out infinite;
}

@keyframes gdOrbHover {

  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.8), inset 0 0 4px #d8b4fe;
  }

  50% {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 24px rgba(168, 85, 247, 1), inset 0 0 6px #ffffff;
  }
}

/* Neon Snake shapes — grid-segment style matching actual game */
.thumb-shape--grid-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(6, 214, 160, 0.12);
}

/* Fixed-size wrapper centered in the thumb for pixel-perfect spacing */
.snake-preview {
  position: absolute;
  /* 5 cols × 26px + 22px = enough for layout */
  width: 152px;
  /* 3 rows × 26px + 22px */
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.thumb-shape--sn-seg {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  opacity: 0.85;
}

/* 26px step = 22px segment + 4px gap.
   L-shape: 3 across bottom, corner turns up 2, then head goes right.
   Row 0 (top=0):                    [seg-1] [head]
   Row 1 (top=26):                   [seg-2]
   Row 2 (top=52):  [seg-5] [seg-4]  [seg-3]              [food] */
.thumb-shape--sn-5 {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
  top: 52px;
  left: 0;
}

.thumb-shape--sn-4 {
  background: #2dd682;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
  top: 52px;
  left: 26px;
}

.thumb-shape--sn-3 {
  background: #38e86e;
  box-shadow: 0 0 10px rgba(6, 214, 160, 0.45);
  top: 52px;
  left: 52px;
}

.thumb-shape--sn-2 {
  background: #04d496;
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.5);
  top: 26px;
  left: 52px;
}

.thumb-shape--sn-1 {
  background: #06d6a0;
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.55);
  top: 0;
  left: 52px;
}

.thumb-shape--sn-head {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #06d6a0;
  box-shadow: 0 0 16px rgba(6, 214, 160, 0.65);
  top: 0;
  left: 78px;
  opacity: 1;
}

/* Eyes on the head — facing right */
.thumb-shape--sn-head::before,
.thumb-shape--sn-head::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #080c18;
  right: 4px;
}

.thumb-shape--sn-head::before {
  top: 4px;
}

.thumb-shape--sn-head::after {
  bottom: 4px;
}

.thumb-shape--food {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent-pink);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.65);
  top: 55px;
  left: 120px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Pixel Maze shapes */
.thumb-shape--maze-line {
  position: absolute;
  background: var(--color-accent-yellow);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
  opacity: 0.8;
  border-radius: 2px;
}

/* 4x4 Grid (20px per cell = 80x80 total) centered horizontally/vertically */

/* Outer Borders */
.thumb-shape--ml-1 {
  width: 83px;
  height: 3px;
  top: calc(50% - 40px);
  left: calc(50% - 40px);
}

.thumb-shape--ml-2 {
  width: 3px;
  height: 83px;
  top: calc(50% - 40px);
  left: calc(50% - 40px);
}

.thumb-shape--ml-3 {
  width: 83px;
  height: 3px;
  top: calc(50% + 40px);
  left: calc(50% - 40px);
}

.thumb-shape--ml-4 {
  width: 3px;
  height: 83px;
  top: calc(50% - 40px);
  left: calc(50% + 40px);
}

/* Inner Walls */
.thumb-shape--ml-5 {
  width: 23px;
  height: 3px;
  top: calc(50% - 20px);
  left: calc(50% - 40px);
}

.thumb-shape--ml-6 {
  width: 23px;
  height: 3px;
  top: calc(50% - 20px);
  left: calc(50% + 0px);
}

.thumb-shape--ml-7 {
  width: 23px;
  height: 3px;
  top: calc(50% + 0px);
  left: calc(50% - 20px);
}

.thumb-shape--ml-8 {
  width: 23px;
  height: 3px;
  top: calc(50% + 0px);
  left: calc(50% + 20px);
}

.thumb-shape--ml-9 {
  width: 43px;
  height: 3px;
  top: calc(50% + 20px);
  left: calc(50% + 0px);
}

.thumb-shape--ml-10 {
  width: 3px;
  height: 23px;
  top: calc(50% - 20px);
  left: calc(50% - 20px);
}

.thumb-shape--ml-11 {
  width: 3px;
  height: 23px;
  top: calc(50% + 20px);
  left: calc(50% - 20px);
}

.thumb-shape--ml-12 {
  width: 3px;
  height: 23px;
  top: calc(50% - 20px);
  left: calc(50% + 20px);
}

.thumb-shape--player {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent-cyan);
  box-shadow: 0 0 15px rgba(6, 214, 160, 0.8);
  /* Centered in 0,0 cell */
  top: calc(50% - 32.5px);
  left: calc(50% - 32.5px);
  animation: pulse 2.5s ease-in-out infinite;
}

.thumb-shape--exit {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--color-accent-pink);
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.8);
  /* Centered in 3,3 cell */
  top: calc(50% + 26.5px);
  left: calc(50% + 26.5px);
  opacity: 0.9;
  animation: pulse 2s ease-in-out infinite alternate-reverse;
}

/* Quantum Checkers shapes */
.thumb-shape--qc-board {
  width: 80px;
  height: 80px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background:
    linear-gradient(rgba(56, 189, 248, 0.15) 50%, transparent 50%),
    linear-gradient(90deg, rgba(56, 189, 248, 0.15) 50%, transparent 50%);
  background-size: 20px 20px;
  transform: perspective(300px) rotateX(45deg) rotateZ(15deg);
  top: calc(50% - 40px);
  left: calc(50% - 40px);
}

.thumb-shape--qc-piece {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: absolute;
}

.thumb-shape--qc-piece-1 {
  background: #d946ef;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.8);
  top: calc(50% - 14px);
  left: calc(50% - 15px);
  animation: pulse 3s infinite alternate;
}

.thumb-shape--qc-piece-2 {
  background: var(--color-accent-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  top: calc(50% + 14px);
  left: calc(50% - 6px);
  animation: pulse 4s infinite alternate;
}

.thumb-shape--qc-piece-3 {
  background: #d946ef;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.8);
  top: calc(50% - 22px);
  left: calc(50% + 10px);
  animation: pulse 3s infinite alternate;
}

.thumb-shape--qc-link {
  width: 32px;
  height: 2px;
  background: rgba(217, 70, 239, 0.6);
  box-shadow: 0 0 8px rgba(217, 70, 239, 0.6);
  top: calc(50% - 17px);
  left: calc(50% - 2px);
  transform: rotate(-35deg);
}

.thumb-shape--cp-paddle {
  width: 8px;
  height: 40px;
  border-radius: 4px;
  position: absolute;
  top: calc(50% - 20px);
}

.thumb-shape--cp-p1 {
  background: var(--color-accent-cyan);
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.8);
  left: calc(50% - 34px);
  animation: cpPaddlePulse 6s linear 0s infinite;
}

.thumb-shape--cp-p2 {
  background: var(--color-accent-pink);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.8);
  left: calc(50% + 26px);
  animation: cpPaddlePulse 6s linear -3s infinite;
}

.thumb-shape--cp-ball {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  position: absolute;
  top: calc(50% - 6px);
  left: calc(50% - 26px);
  animation: cpBallBounce 3s ease-in-out infinite alternate;
}

@keyframes cpBallBounce {
  0% { left: calc(50% - 26px); }
  100% { left: calc(50% + 14px); }
}

@keyframes cpPaddlePulse {
  0%, 5%, 95%, 100% {
    opacity: 1;
    filter: brightness(1.3);
  }
  20%, 80% {
    opacity: 0.4;
    filter: brightness(0.6);
  }
}

/* Card Body */
.game-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: transparent;
  transition: background 0s;
}

.game-card:hover .game-card__body {
  background: var(--color-bg-card-hover);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.game-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: #ffffff;
}

.game-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.game-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.game-card:hover .game-card__cta {
  gap: 14px;
  color: #ffffff;
}

.game-card--purple-cyan:hover .game-card__cta {
  color: var(--color-accent-cyan);
}

.game-card--orange-pink:hover .game-card__cta {
  color: var(--color-accent-orange);
}

.game-card--green-yellow:hover .game-card__cta {
  color: var(--color-accent-yellow);
}

.game-card--blue-magenta:hover .game-card__cta {
  color: #d946ef;
}

.game-card--pink-cyan:hover .game-card__cta {
  color: var(--color-accent-pink);
}

.game-card__cta-arrow {
  transition: transform var(--transition-fast);
  font-size: 1.1rem;
}

.game-card:hover .game-card__cta-arrow {
  transform: translateX(4px);
}

/* --- Upcoming Games Section --- */
.upcoming-games {
  max-width: 800px;
  width: 100%;
  padding: 0 0 80px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--color-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.upcoming-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upcoming-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-btn);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.upcoming-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.upcoming-item__bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
  margin-top: 8.5px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(193, 203, 216, 0.4);
}

.upcoming-item:nth-child(1) .upcoming-item__bullet {
  background: var(--color-accent-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.upcoming-item:nth-child(2) .upcoming-item__bullet {
  background: var(--color-accent-cyan);
  box-shadow: 0 0 10px rgba(6, 214, 160, 0.6);
}

.upcoming-item:nth-child(3) .upcoming-item__bullet {
  background: var(--color-accent-orange);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.6);
}

.upcoming-item:nth-child(4) .upcoming-item__bullet {
  background: var(--color-accent-pink);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.6);
}

.upcoming-item__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upcoming-item__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.upcoming-item__desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 1100px;
}

.site-footer__text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 300;
  letter-spacing: 0.06em;
}

.site-footer__highlight {
  background: linear-gradient(90deg, var(--color-accent-purple), var(--color-accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
}


/* --- Responsive --- */
@media (max-width: 700px) {

  .games-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 60px;
  }

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

  .game-card__thumb {
    height: 150px;
  }
}