/* ═══════════════════════════════════════════
   ANALOG ARCHITECT — App Styles
   ═══════════════════════════════════════════ */

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Base */
html, body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
}

/* ── Screen ── */
.screen {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

.screen.active {
  display: block;
}

/* ── Bottom Nav ── */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 16px;
  flex: 1;
  color: #777777;
  transition: all 75ms ease-linear;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.nav-item:hover {
  background: #E2E3E1;
}

.nav-item.active {
  color: #1a1c1b;
  border-top: 4px solid #1a1c1b;
  padding-top: 8px;
}

.nav-item span:last-child {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Toast ── */
.toast {
  background: #2f3130;
  color: #f1f1ef;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 10px 16px;
  border: 1px solid #777777;
  pointer-events: all;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  width: 100%;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Player Accent Colors ── */
.accent-0  { --accent: #0047FF; }
.accent-1  { --accent: #FF2E2E; }
.accent-2  { --accent: #FFB800; }
.accent-3  { --accent: #00B85C; }
.accent-4  { --accent: #8B5CF6; }
.accent-5  { --accent: #EC4899; }
.accent-6  { --accent: #14B8A6; }
.accent-7  { --accent: #F97316; }
.accent-8  { --accent: #6366F1; }
.accent-9  { --accent: #84CC16; }

.accent-bar {
  height: 3px;
  width: 100%;
  background: var(--accent);
}

/* ── Inputs (Analog Architect style) ── */
input[type="text"],
input[type="number"] {
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Score input: ledger-style bottom border */
.score-input {
  background: transparent;
  border: 0;
  border-bottom: 2px solid #000000;
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  text-align: center;
  width: 80px;
  padding: 4px 0;
  outline: none;
  color: #1a1c1b;
  transition: border-color 0.15s;
}

.score-input:focus {
  border-color: #0046fa;
}

/* ── Buttons ── */
.btn-primary {
  background: #000000;
  color: #ffffff;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
  font-size: 16px;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  background: #ffffff;
  color: #000000;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 24px;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 16px;
}

.btn-secondary:hover { background: #e8e8e6; }
.btn-secondary:active { transform: scale(0.98); }

/* ── Modal / Bottom Sheet ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: #ffffff;
  border-top: 1px solid #777777;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.open + .modal-sheet,
.modal-sheet.open {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: #c6c6c6;
  border-radius: 2px;
  margin: 8px auto 16px;
}

/* ── Overtime Banner ── */
.overtime-banner {
  background: #000000;
  color: #ffffff;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  animation: pulse-banner 2s ease-in-out infinite;
}

@keyframes pulse-banner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Utility ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #c6c6c6;
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
