*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #0a0a12;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f0f5;
  --text-muted: #8888a0;
  --accent-cyan: #00e5ff;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --radius: 20px;
  --font: 'Outfit', system-ui, sans-serif;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 500px;
  height: 500px;
  background: rgba(0, 229, 255, 0.18);
  top: -150px;
  right: -100px;
}

.bg-glow--2 {
  width: 400px;
  height: 400px;
  background: rgba(236, 72, 153, 0.16);
  bottom: -100px;
  left: -100px;
}

.bg-glow--3 {
  width: 420px;
  height: 420px;
  background: rgba(168, 85, 247, 0.14);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.site-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--accent-pink);
  filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.9));
  animation: neon-flicker 4.5s infinite alternate;
}

.logo h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.neon-title {
  position: relative;
  color: #fdf4ff;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 11px var(--accent-cyan),
    0 0 22px var(--accent-cyan),
    0 0 38px var(--accent-pink),
    0 0 62px var(--accent-pink);
  animation: neon-flicker 6s infinite alternate;
}

@keyframes neon-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 11px var(--accent-cyan),
      0 0 22px var(--accent-cyan),
      0 0 38px var(--accent-pink),
      0 0 62px var(--accent-pink);
    filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.9));
  }
  20%, 24%, 55% {
    opacity: 0.75;
    text-shadow: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-icon,
  .neon-title {
    animation: none;
  }
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.games-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
}

.game-tile {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(12px);
}

a.game-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 229, 255, 0.08);
}

.game-tile--coming-soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.game-tile__preview {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.06) 0%, rgba(168, 85, 247, 0.06) 100%);
  position: relative;
  overflow: hidden;
}

.game-tile--tetris .game-tile__preview {
  perspective: 400px;
}

.tetris-preview {
  display: grid;
  grid-template-columns: repeat(4, 28px);
  grid-template-rows: repeat(4, 28px);
  gap: 4px;
  transform: rotateX(25deg) rotateY(-15deg);
}

.tetris-block {
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tetris-block--cyan {
  grid-column: 1 / 3;
  grid-row: 1;
  background: linear-gradient(135deg, #00e5ff, #0099cc);
}

.tetris-block--purple {
  grid-column: 3 / 5;
  grid-row: 1 / 3;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.tetris-block--orange {
  grid-column: 1 / 3;
  grid-row: 2 / 4;
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.tetris-block--green {
  grid-column: 2 / 4;
  grid-row: 3 / 5;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.game-tile--solitaire .game-tile__preview {
  background: linear-gradient(160deg, rgba(13, 59, 46, 0.55) 0%, rgba(7, 32, 25, 0.55) 100%);
}

.solitaire-preview {
  position: relative;
  width: 160px;
  height: 110px;
}

.mini-card {
  position: absolute;
  bottom: 0;
  width: 60px;
  height: 84px;
  border-radius: 8px;
  background: linear-gradient(160deg, #ffffff 0%, #e9edf6 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 6px;
  transform-origin: bottom center;
  transition: transform 0.35s ease;
}

.mini-card__rank {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1;
}

.mini-card__rank--red { color: #d81e5b; }

.mini-card__suit {
  position: absolute;
  bottom: 6px;
  right: 7px;
  font-size: 1.3rem;
}

.mini-card__suit--black { color: #1a1a2e; }
.mini-card__suit--red { color: #d81e5b; }

.mini-card--1 { left: 4px;  transform: rotate(-15deg) translateY(6px); z-index: 1; }
.mini-card--2 { left: 34px; transform: rotate(-5deg)  translateY(-2px); z-index: 2; }
.mini-card--3 { left: 66px; transform: rotate(5deg)   translateY(-2px); z-index: 3; }
.mini-card--4 { left: 96px; transform: rotate(15deg)  translateY(6px);  z-index: 4; }

a.game-tile--solitaire:hover .mini-card--1 { transform: rotate(-22deg) translateY(2px)  translateX(-6px); }
a.game-tile--solitaire:hover .mini-card--2 { transform: rotate(-8deg)  translateY(-8px); }
a.game-tile--solitaire:hover .mini-card--3 { transform: rotate(8deg)   translateY(-8px); }
a.game-tile--solitaire:hover .mini-card--4 { transform: rotate(22deg)  translateY(2px)  translateX(6px); }

.game-tile--wordle .game-tile__preview {
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.08) 0%, rgba(234, 179, 8, 0.08) 100%);
}

.wordle-preview {
  display: flex;
  gap: 8px;
}

.wordle-cell {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wordle-cell--correct { background: #22c55e; }
.wordle-cell--present { background: #eab308; color: #1a1a2e; }
.wordle-cell--absent  { background: #3a3a4a; }

a.game-tile--wordle:hover {
  border-color: rgba(34, 197, 94, 0.35);
}

.game-tile--snake .game-tile__preview {
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.08) 0%, rgba(0, 229, 255, 0.08) 100%);
}

.snake-preview {
  position: relative;
  width: 160px;
  height: 90px;
}

.snake-seg {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: transform 0.35s ease, left 0.35s ease;
}

.snake-seg--1    { left: 4px;   background: #16a34a; }
.snake-seg--2    { left: 26px;  background: #1cb552; }
.snake-seg--3    { left: 48px;  background: #22c55e; }
.snake-seg--head {
  left: 72px;
  background: #34e56b;
  box-shadow: 0 0 18px rgba(52, 229, 107, 0.7);
}

.snake-orb {
  position: absolute;
  top: 30%;
  left: 128px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.8);
}

a.game-tile--snake:hover .snake-seg--1    { left: 10px; }
a.game-tile--snake:hover .snake-seg--2    { left: 32px; transform: translateY(-90%); }
a.game-tile--snake:hover .snake-seg--3    { left: 54px; }
a.game-tile--snake:hover .snake-seg--head { left: 78px; transform: translateY(-20%); }

a.game-tile--snake:hover {
  border-color: rgba(34, 197, 94, 0.35);
}

.game-tile--arrows .game-tile__preview {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
}

.arrows-preview {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 8px;
}

.arrow-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 700;
  border-radius: 10px;
  color: #0a0a12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s ease;
}

.arrow-chip--1 { background: linear-gradient(135deg, #00e5ff, #0099cc); }
.arrow-chip--2 { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.arrow-chip--3 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.arrow-chip--4 { background: linear-gradient(135deg, #f97316, #ea580c); }

a.game-tile--arrows:hover .arrow-chip--1 { transform: translateX(8px); }
a.game-tile--arrows:hover .arrow-chip--2 { transform: translate(6px, 6px); }
a.game-tile--arrows:hover .arrow-chip--3 { transform: translateY(-8px); }
a.game-tile--arrows:hover .arrow-chip--4 { transform: translate(-6px, -6px); }

a.game-tile--arrows:hover {
  border-color: rgba(236, 72, 153, 0.35);
}

/* ---- Bubble Chain Blast preview ---- */
.game-tile--bubbleblast .game-tile__preview {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.08) 0%, rgba(168, 85, 247, 0.09) 100%);
}

.bubble-preview {
  display: grid;
  grid-template-columns: repeat(2, 54px);
  grid-template-rows: repeat(2, 54px);
  gap: 10px;
}

.bubble-orb {
  border-radius: 50%;
  box-shadow:
    inset 0 3px 4px rgba(255, 255, 255, 0.5),
    inset 0 -5px 8px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s ease;
}

.bubble-orb--1 { background: radial-gradient(circle at 35% 28%, #7ff4ff, #00e5ff 50%, #0088bb); }
.bubble-orb--2 { background: radial-gradient(circle at 35% 28%, #d9b8ff, #a855f7 50%, #6d28d9); }
.bubble-orb--3 { background: radial-gradient(circle at 35% 28%, #ffd08a, #f97316 50%, #d1418a); }
.bubble-orb--4 { background: radial-gradient(circle at 35% 28%, #7ff4ff, #00e5ff 50%, #0088bb); }

a.game-tile--bubbleblast:hover .bubble-orb--1 { transform: scale(1.15) translate(-3px, -3px); }
a.game-tile--bubbleblast:hover .bubble-orb--2 { transform: scale(1.15) translate(3px, -3px); }
a.game-tile--bubbleblast:hover .bubble-orb--3 { transform: scale(1.15) translate(-3px, 3px); }
a.game-tile--bubbleblast:hover .bubble-orb--4 { transform: scale(1.15) translate(3px, 3px); }

a.game-tile--bubbleblast:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

/* ---- Neon Flap preview ---- */
.game-tile--flappy .game-tile__preview {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.07) 0%, rgba(236, 72, 153, 0.08) 100%);
}

.flappy-preview {
  position: relative;
  width: 180px;
  height: 130px;
}

.flappy-pipe {
  position: absolute;
  width: 26px;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.flappy-pipe--top {
  left: 60px;
  top: 0;
  height: 38px;
  background: linear-gradient(180deg, #0099cc, #00e5ff);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
}

.flappy-pipe--bottom {
  left: 60px;
  bottom: 0;
  height: 44px;
  background: linear-gradient(0deg, #0099cc, #00e5ff);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
}

.flappy-pipe--top2 {
  left: 140px;
  top: 0;
  height: 58px;
  background: linear-gradient(180deg, #7c3aed, #a855f7);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

.flappy-pipe--bottom2 {
  left: 140px;
  bottom: 0;
  height: 24px;
  background: linear-gradient(0deg, #7c3aed, #a855f7);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

.flappy-bird {
  position: absolute;
  top: 58px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #c8f9ff, #00e5ff 55%, #0088bb);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.8);
  transition: transform 0.35s ease;
}

.flappy-bird::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a0a12;
}

a.game-tile--flappy:hover .flappy-bird {
  transform: translate(26px, -22px) rotate(-14deg);
}

a.game-tile--flappy:hover {
  border-color: rgba(0, 229, 255, 0.35);
}

/* ---- Neon Breakout preview ---- */
.game-tile--breakout .game-tile__preview {
  background: linear-gradient(160deg, rgba(236, 72, 153, 0.08) 0%, rgba(0, 229, 255, 0.07) 100%);
}

.breakout-preview {
  position: relative;
  width: 180px;
  height: 130px;
}

.breakout-brick {
  position: absolute;
  width: 52px;
  height: 18px;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.breakout-brick--1 { left: 5px; top: 0; background: linear-gradient(180deg, #ff6ab8, #d1418a); box-shadow: 0 0 14px rgba(236, 72, 153, 0.45); }
.breakout-brick--2 { left: 64px; top: 0; background: linear-gradient(180deg, #ff6ab8, #d1418a); box-shadow: 0 0 14px rgba(236, 72, 153, 0.45); }
.breakout-brick--3 { left: 123px; top: 0; background: linear-gradient(180deg, #ff6ab8, #d1418a); box-shadow: 0 0 14px rgba(236, 72, 153, 0.45); }
.breakout-brick--4 { left: 5px; top: 25px; background: linear-gradient(180deg, #a855f7, #7c3aed); box-shadow: 0 0 14px rgba(168, 85, 247, 0.45); }
.breakout-brick--5 { left: 64px; top: 25px; background: linear-gradient(180deg, #a855f7, #7c3aed); box-shadow: 0 0 14px rgba(168, 85, 247, 0.45); }
.breakout-brick--6 { left: 123px; top: 25px; background: linear-gradient(180deg, #a855f7, #7c3aed); box-shadow: 0 0 14px rgba(168, 85, 247, 0.45); }

.breakout-ball {
  position: absolute;
  left: 82px;
  top: 72px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #c8f9ff, #00e5ff 55%, #0088bb);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.8);
  transition: transform 0.35s ease;
}

.breakout-paddle {
  position: absolute;
  left: 55px;
  bottom: 0;
  width: 70px;
  height: 12px;
  border-radius: 100px;
  background: linear-gradient(180deg, #7ff4ff, #00e5ff 50%, #0088bb);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
  transition: transform 0.35s ease;
}

a.game-tile--breakout:hover .breakout-ball { transform: translate(-14px, -46px); }
a.game-tile--breakout:hover .breakout-paddle { transform: translateX(-16px); }
a.game-tile--breakout:hover .breakout-brick--5 { transform: scale(1.25); opacity: 0; }

a.game-tile--breakout:hover {
  border-color: rgba(236, 72, 153, 0.35);
}

/* ---- Neon Hole preview ---- */
.game-tile--hole .game-tile__preview {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.08) 0%, rgba(124, 58, 237, 0.1) 100%);
}

.hole-preview {
  position: relative;
  width: 180px;
  height: 130px;
}

.hole-pit {
  position: absolute;
  left: 50px;
  top: 62px;
  width: 80px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #1a1030 0%, #06060c 65%);
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.9);
}

.hole-ring {
  position: absolute;
  left: 48px;
  top: 60px;
  width: 84px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.7), inset 0 0 10px rgba(0, 229, 255, 0.4);
  transition: transform 0.35s ease;
}

.hole-bldg {
  position: absolute;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, opacity 0.4s ease;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 233, 176, 0.55) 0 3px,
    transparent 3px 8px
  );
}

.hole-bldg--1 {
  left: 24px;
  top: 14px;
  width: 24px;
  height: 58px;
  background-color: #4c4468;
}

.hole-bldg--2 {
  left: 128px;
  top: 2px;
  width: 28px;
  height: 74px;
  background-color: #3a4a72;
}

.hole-bldg--3 {
  left: 86px;
  top: 30px;
  width: 20px;
  height: 40px;
  background-color: #5a3a60;
  transform-origin: bottom center;
}

.hole-person {
  position: absolute;
  left: 66px;
  top: 46px;
  width: 8px;
  height: 16px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #e8b58e 0 5px, #e15b64 5px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

a.game-tile--hole:hover .hole-bldg--3 {
  transform: translate(2px, 26px) rotate(38deg) scale(0.7);
  opacity: 0;
}

a.game-tile--hole:hover .hole-person {
  transform: translate(14px, 28px) rotate(-60deg) scale(0.6);
  opacity: 0;
}

a.game-tile--hole:hover .hole-ring {
  transform: scale(1.12);
}

a.game-tile--hole:hover {
  border-color: rgba(0, 229, 255, 0.35);
}

.coming-soon-icon {
  font-size: 3rem;
  font-weight: 300;
  color: var(--text-muted);
  border: 2px dashed var(--border-subtle);
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-tile__info {
  padding: 1.5rem;
}

.game-tile__info h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.game-tile__info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.game-tile__cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-cyan);
  transition: letter-spacing 0.2s ease;
}

a.game-tile:hover .game-tile__cta {
  letter-spacing: 0.05em;
}

.game-tile__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 2rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}
