/* ==========================================================================
   FIVE NIGHTS IN MJ — Estilos base compartidos
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --fg: #e8e8e8;
  --fg-dim: #9a9a9a;
  --fg-darker: #5a5a5a;
  --accent: #ffcc44;
  --danger: #cc3333;
  --success: #66bb88;
  --border: #3a3a3a;
  --border-dimmer: #1e1e1e;
  --font-mono: 'Courier New', Courier, monospace;
  --shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  --transition: 0.15s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

body.hub {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 20px 60px;
}

.hidden { display: none !important; }

a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--fg); }

button {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 2px;
  padding: 12px 24px;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  min-height: 44px;
  border-radius: 0;
}
button:hover, button:focus-visible {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  outline: none;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.4; cursor: default; }
button:disabled:hover { background: var(--bg-2); color: var(--fg); }

input[type="text"],
input[type="number"] {
  font-family: var(--font-mono);
  font-size: 17px;
  text-align: center;
  letter-spacing: 3px;
  padding: 11px;
  background: #050505;
  color: var(--fg);
  border: 1px solid var(--fg-darker);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  transition: border-color var(--transition);
}
input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--fg);
}

h1, h2, h3 {
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;
}
h1 { font-size: 24px; letter-spacing: 6px; }
h2 { font-size: 18px; }
h3 { font-size: 13px; color: var(--fg-dim); }

hr {
  border: 0;
  border-top: 1px solid var(--border-dimmer);
  margin: 16px 0;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.94);
  overflow-y: auto;
}
.modal-panel {
  max-width: 560px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  text-align: center;
}
.modal-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg-dim);
  text-align: left;
  margin: 16px 0;
}
.modal-body p { margin: 8px 0; }
.modal-body b { color: var(--fg); }
.modal-btn { margin-top: 12px; }

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 1px;
  max-width: 300px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.5, 1);
  pointer-events: none;
}
.toast.on { transform: translateX(0); }
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}