/* Head Cup 2026 — estilos base del shell */

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0A1430;
  color: #F0F0F5;
  font-family: 'Trebuchet MS', 'Inter', system-ui, sans-serif;
  position: fixed;
  inset: 0;
  touch-action: none;
}

#game-container {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: none;
}
#game-container canvas {
  display: block;
}

/* ===== Loader inicial ===== */
#pre-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background:
    radial-gradient(circle at 50% 30%, #1a3a7a 0%, #0A1430 70%);
  transition: opacity .5s ease;
}
#pre-loader.hidden { opacity: 0; pointer-events: none; }
.pl-logo {
  font-size: clamp(28px, 7vw, 56px);
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 0 #C0392B, 0 6px 18px rgba(0,0,0,.5);
  display: flex;
  align-items: baseline;
  gap: .4rem;
}
.pl-logo span {
  font-size: .5em;
  color: #F1C40F;
  -webkit-text-stroke: 1px #00000033;
}
.pl-bar {
  width: min(260px, 60vw);
  height: 10px;
  background: rgba(255,255,255,.15);
  border-radius: 6px;
  overflow: hidden;
}
.pl-bar-fill {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, #F1C40F, #E67E22);
  border-radius: 6px;
  animation: plload 1.1s ease-in-out infinite;
}
@keyframes plload {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}
.pl-tip { font-size: 13px; color: #A0B0D0; letter-spacing: .5px; }

/* ===== Overlay rotación ===== */
#rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #0E1B3A, #07101f);
  padding: 1.5rem;
}
.rotate-inner { max-width: 360px; }
.rotate-phone {
  font-size: 72px;
  display: inline-block;
  animation: rotatehint 1.8s ease-in-out infinite;
}
@keyframes rotatehint {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-90deg); }
}
#rotate-overlay h2 {
  margin: 1rem 0 .5rem;
  font-size: 24px;
  color: #F1C40F;
}
#rotate-overlay p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #C8D2E8;
}

/* Mostrar overlay solo en vertical (mobile) */
@media (max-width: 920px) and (orientation: portrait) {
  #rotate-overlay { display: flex; }
  #pre-loader, #game-container { visibility: hidden; }
}
