/* ═══════════════════════════════════════════════
   Calcross — Game Styles
   ═══════════════════════════════════════════════ */

/* ── MENU ── */
.menu {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; gap: 18px;
}
.menu-logo-row { display: flex; gap: 5px; margin-bottom: 4px; }
.menu-cell {
  width: 52px; height: 52px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  animation: fadeUp 0.45s ease both;
}
.menu-cell--num { background: var(--navy); color: var(--white); }
.menu-cell--op { background: transparent; color: var(--text-dim); }

.menu-title {
  font-size: clamp(38px, 10vw, 56px);
  font-weight: 700; letter-spacing: 4px; color: var(--navy);
}
.menu-sub {
  font-size: 14px; font-weight: 300; color: var(--text-dim); letter-spacing: 1.5px;
}
.menu-how {
  max-width: 340px; text-align: center;
  font-size: 13px; font-weight: 400; line-height: 1.7; color: var(--text-mid);
  padding: 16px 20px; border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.diff-btns {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; justify-content: center;
}
.diff-btn {
  padding: 14px 24px; border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--navy); font-size: 13px; font-weight: 600;
  letter-spacing: 2.5px; cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.diff-btn:hover {
  background: var(--bg-subtle);
  border-color: rgba(45,50,112,0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── GAME SCREEN ── */
.game {
  display: none; flex-direction: column; align-items: center;
  width: 100%; max-width: 460px; flex: 1;
}
.game.active { display: flex; }

/* Game header */
.game-hdr {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 0 0 14px;
}
.pause-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-subtle); border: 1.5px solid var(--border);
  color: var(--navy); font-size: 16px; font-weight: 600;
  padding: 7px 18px; border-radius: var(--radius-pill);
  cursor: pointer; font-family: var(--font);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}
.pause-btn:hover { background: var(--bg-surface); }
.pause-icon { font-size: 11px; }
.game-hdr-right { display: flex; gap: 8px; align-items: center; }
.badge {
  background: var(--bg-subtle); border: 1.5px solid var(--border);
  padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px;
  color: var(--navy); box-shadow: var(--shadow-sm);
}
.hint-btn {
  background: var(--bg-subtle); border: 1.5px solid var(--border);
  color: var(--navy); width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.hint-btn:hover { background: var(--bg-surface); }

/* Grid */
.grid-wrap {
  display: flex; justify-content: center; width: 100%;
  flex: 1; padding: 4px 0 12px;
}
.grid { display: grid; gap: 4px; width: 100%; }
.grid-cell { aspect-ratio: 1; }
.cell-empty {}
.cell-op {
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 4.5vw, 26px); font-weight: 700; color: var(--navy);
  opacity: 0.55;
}
.cell-num {
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-size: clamp(13px, 3.5vw, 21px); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cell-num--fixed {
  background: var(--navy); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.cell-num--blank {
  background: var(--bg-surface); cursor: pointer;
}
.cell-num--blank:hover { background: #d8d8e2; }
.cell-num--filled {
  background: #c8c8d8; color: var(--text); cursor: pointer;
}
.cell-num--selected {
  outline: 3px solid var(--sky);
  outline-offset: -1px;
  animation: glow 1.3s ease infinite;
}
.cell-num--error {
  background: var(--error) !important;
  color: #fff !important;
  outline: none !important;
  animation: shake 0.35s ease;
}

/* Tile bank */
.bank-wrap { width: 100%; padding: 28px 0 8px; }
.bank { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.tile {
  min-width: 48px; height: 50px; padding: 0 12px;
  border-radius: 10px;
  background: var(--teal-pale);
  border: 2px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  font-size: clamp(16px, 4vw, 21px); font-weight: 700;
  color: var(--navy);
}
.tile:hover:not(.tile--used) {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.tile--used {
  opacity: 0.2; cursor: default;
  background: var(--bg-subtle); border-color: var(--border);
  box-shadow: none;
}
.tile--selected {
  transform: scale(1.1);
  outline: 3px solid var(--sky); outline-offset: 0;
  box-shadow: 0 0 16px rgba(91,184,245,0.25);
}

/* Footer */
.game-footer { display: flex; gap: 18px; padding: 10px 0 4px; }
.foot-btn {
  background: none; border: none; color: var(--text-mid);
  font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: var(--font); padding: 10px 14px;
  transition: color var(--transition);
}
.foot-btn:hover { color: var(--navy); }

/* ── PAUSE ── */
.pause-card { text-align: center; cursor: pointer; }
.pause-card-icon { font-size: 52px; margin-bottom: 12px; color: var(--navy); }
.pause-card-label { font-size: 15px; letter-spacing: 5px; font-weight: 700; color: var(--navy); }
.pause-card-hint { font-size: 12px; font-weight: 300; margin-top: 10px; color: var(--text-dim); }

/* ── WIN ── */
.win-card {
  background: var(--bg);
  border-radius: var(--radius-lg); padding: 40px 48px;
  text-align: center;
  border: 1.5px solid var(--border);
  box-shadow: 0 12px 40px rgba(45,50,112,0.12);
  animation: pop 0.45s ease;
}
.win-check {
  width: 68px; height: 68px; border-radius: 50%;
  margin: 0 auto 16px;
  background: var(--teal-pale); border: 3px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: var(--teal);
}
.win-title {
  font-size: 28px; font-weight: 700; letter-spacing: 4px;
  color: var(--navy); margin-bottom: 4px;
}
.win-time {
  font-size: 22px; font-weight: 600; color: var(--text-dim);
  margin-bottom: 24px; font-variant-numeric: tabular-nums;
}
.win-btn {
  display: block; width: 100%; padding: 14px 0;
  border-radius: var(--radius-md); border: none;
  background: var(--navy);
  color: var(--white); font-size: 13px; font-weight: 700;
  letter-spacing: 2px; cursor: pointer;
  font-family: var(--font); margin-bottom: 8px;
  transition: opacity var(--transition);
}
.win-btn:hover { opacity: 0.88; }
.win-btn--sec {
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text-dim); font-size: 12px; letter-spacing: 2px;
}
.win-btn--sec:hover { background: var(--bg-subtle); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,184,245,0.3); }
  50%      { box-shadow: 0 0 0 7px rgba(91,184,245,0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(2px); }
}

/* ── RESPONSIVE ── */
@media (max-width: 420px) {
  .menu-cell { width: 44px; height: 44px; font-size: 15px; }
  .diff-btns { flex-direction: column; gap: 8px; }
  .diff-btn { width: 200px; text-align: center; }
}
