﻿* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #f4f7ff;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 255, 200, 0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(115, 88, 255, 0.28), transparent 25%),
    linear-gradient(135deg, #050816 0%, #11162b 45%, #03040a 100%);
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(5, 8, 22, 0.68);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.logo {
  font-weight: 800;
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  gap: 10px;
}

button {
  cursor: pointer;
  border: 0;
  color: inherit;
  font: inherit;
}

.tab, .primary, .back {
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  transition: 0.2s;
}

.tab.active, .tab:hover, .primary:hover, .back:hover {
  background: #00ffc8;
  color: #071018;
  box-shadow: 0 0 24px rgba(0,255,200,0.35);
}

main {
  width: min(980px, calc(100% - 32px));
  margin: 46px auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.glass {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
}

.hero {
  padding: 58px;
  min-height: 360px;
}

.eyebrow {
  color: #00ffc8;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 5rem);
  margin: 10px 0;
}

h2 {
  margin-top: 0;
}

.hero p {
  max-width: 680px;
  color: #cbd3ef;
  line-height: 1.6;
}

.games-menu {
  padding: 32px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0,255,200,0.16), rgba(111,81,255,0.16));
  border: 1px solid rgba(255,255,255,0.15);
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0,255,200,0.2);
}

.icon {
  font-size: 2.5rem;
}

.game-card small {
  display: block;
  color: #cbd3ef;
  margin-top: 4px;
}

.hidden {
  display: none;
}

.game-screen {
  background: #05060d;
  min-height: 620px;
  border-radius: 28px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 0 80px rgba(0,255,200,0.06), 0 20px 60px rgba(0,0,0,0.55);
}

.back {
  margin-bottom: 20px;
}

.minesweeper-panel {
  max-width: 620px;
  margin: auto;
}

.game-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.stats {
  display: flex;
  gap: 12px;
  color: #cbd3ef;
}

.message {
  color: #00ffc8;
  min-height: 24px;
}

.board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  background: #090b16;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
}

.cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(145deg, #1b2342, #11182e);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  font-weight: 800;
  user-select: none;
}

.cell:hover {
  outline: 2px solid #00ffc8;
}

.cell.open {
  background: #0c1020;
  color: #dfe7ff;
  outline: none;
}

.cell.flagged {
  background: #2b2040;
}

.cell.mine {
  background: #5c101c;
}

.controls {
  margin-top: 18px;
  text-align: center;
}

@media (max-width: 560px) {
  .topbar {
    flex-direction: column;
    gap: 12px;
  }

  .hero {
    padding: 32px;
  }

  .cell {
    border-radius: 7px;
    font-size: 0.9rem;
  }
}
