:root {
  --bg1: #05050a;
  --bg2: #0b0b12;
  --neon-blue: #33f0ff;
  --neon-pink: #ff4ddb;
  --neon-green: #7eff8a;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-2: rgba(255, 255, 255, 0.02);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial;
  background: radial-gradient(
      circle at 10% 10%,
      rgba(51, 240, 255, 0.05),
      transparent 6%
    ),
    radial-gradient(circle at 90% 90%, rgba(255, 77, 219, 0.03), transparent 6%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  color: #e9f5ff;
}

/* Center layout */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* Card */
.card {
  width: 920px;
  max-width: 96%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.015)
  );
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}
.logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  color: #05050a;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  box-shadow: 0 6px 30px rgba(51, 240, 255, 0.08),
    inset 0 -6px 18px rgba(0, 0, 0, 0.2);
}
h1 {
  margin: 0;
  font-size: 20px;
  color: var(--neon-blue);
  text-shadow: 0 0 12px rgba(51, 240, 255, 0.18),
    0 0 30px rgba(51, 240, 255, 0.06);
}
p.lead {
  margin: 0;
  color: #cfeef7;
  opacity: 0.8;
}

/* Menu */
.menu {
  display: flex;
  gap: 20px;
  margin-top: 26px;
  align-items: center;
}
.mode-card {
  flex: 1;
  padding: 22px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
}
.mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.mode-card .title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.mode-card .desc {
  opacity: 0.85;
}

.neon-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  border: 0;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
  color: #030314;
  box-shadow: 0 6px 30px rgba(255, 77, 219, 0.12),
    0 0 24px rgba(51, 240, 255, 0.06);
}

/* Game area */
.game-area {
  display: none;
  margin-top: 22px;
}
.game-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
}

/* Board */
.board {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 14px;
}
.cell {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: transform 0.12s ease;
}
.cell:hover {
  transform: scale(1.03);
}
.cell.x {
  color: var(--neon-pink);
  text-shadow: 0 0 18px rgba(255, 77, 219, 0.2);
}
.cell.o {
  color: var(--neon-green);
  text-shadow: 0 0 18px rgba(126, 255, 138, 0.18);
}

/* Sidebar */
.side {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  padding: 18px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.score {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.score .item {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.status {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  color: #dff8ff;
  background: linear-gradient(
    90deg,
    rgba(51, 240, 255, 0.04),
    rgba(255, 77, 219, 0.03)
  );
}

.controls {
  display: flex;
  gap: 8px;
}
.btn {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
  color: #05050a;
  font-weight: 700;
}



/* Winner line (overlay) */
.overlay {
  position: relative;
}
.strike {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  bottom: 12px;
  pointer-events: none;
}

@media (max-width: 880px) {
  .game-container {
    grid-template-columns: 1fr;
  }
  .board {
    aspect-ratio: 1;
  }
}
