@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap');

:root {
  --bg: #0d0a1f;
  --bg2: #171233;
  --card: rgba(255, 255, 255, 0.065);
  --card2: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.13);
  --text: #fff7ea;
  --muted: rgba(255, 247, 234, 0.62);
  --gold: #ffcc4d;
  --gold2: #ffad33;
  --red: #ff4d6d;
  --mint: #3ee6b0;
  --ice: #9ad7ff;
  --violet: #a98bff;
  --radius: 20px;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(255, 77, 109, 0.22), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(62, 230, 176, 0.16), transparent 60%),
    radial-gradient(700px 500px at 80% -20%, rgba(169, 139, 255, 0.18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
button, input, select, textarea { font-family: inherit; color: inherit; }

.gold { color: var(--gold); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Botones */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 20px; border-radius: 18px;
  font-size: 17px; font-weight: 700; letter-spacing: 0.01em;
  background: var(--card2); color: var(--text);
  border: 1px solid var(--line);
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn.primary {
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  color: #2a1a00; border: 0;
  box-shadow: 0 10px 30px -10px rgba(255, 190, 60, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.red { background: linear-gradient(180deg, #ff6b85, var(--red)); color: #fff; border: 0; box-shadow: 0 10px 30px -12px rgba(255, 77, 109, 0.8); }
.btn.mint { background: linear-gradient(180deg, #6ff3c8, var(--mint)); color: #002b1e; border: 0; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.big { padding: 22px 20px; font-size: 20px; border-radius: 22px; }
.btn.small { padding: 9px 12px; font-size: 14px; border-radius: 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(6px);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--card2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.chip.gold { background: rgba(255, 204, 77, 0.16); border-color: rgba(255, 204, 77, 0.45); color: var(--gold); }
.chip.mint { background: rgba(62, 230, 176, 0.14); border-color: rgba(62, 230, 176, 0.4); color: var(--mint); }
.chip.red { background: rgba(255, 77, 109, 0.14); border-color: rgba(255, 77, 109, 0.45); color: #ff8da1; }

input[type=text], input[type=password], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line);
  font-size: 16px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 204, 77, 0.2); }
textarea { min-height: 140px; resize: vertical; }

/* Avisos */
#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: #241c4d; border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 1000;
  max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 20px 40px -10px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: #4d1626; border-color: rgba(255, 77, 109, 0.5); }

.conn {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  background: #4d1626; color: #ffd0d9; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; z-index: 999; display: none;
}
.conn.show { display: block; }

/* Animaciones */
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 204, 77, 0)); } 50% { filter: drop-shadow(0 0 18px rgba(255, 204, 77, 0.8)); } }
@keyframes spinblur { 0% { filter: blur(0); } 50% { filter: blur(1.5px); } 100% { filter: blur(0); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.pop { animation: pop 0.5s cubic-bezier(.2,.9,.3,1.2) both; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
.floaty { animation: floaty 3s ease-in-out infinite; }

/* Guirnalda de luces */
.lights { display: flex; justify-content: space-between; padding: 0 8px; height: 18px; position: relative; }
.lights::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; }
.lights i {
  width: 10px; height: 14px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  margin-top: 4px; display: block; animation: blink 1.6s ease-in-out infinite;
}
.lights i:nth-child(4n+1) { background: var(--red); box-shadow: 0 0 12px var(--red); }
.lights i:nth-child(4n+2) { background: var(--gold); box-shadow: 0 0 12px var(--gold); animation-delay: .4s; }
.lights i:nth-child(4n+3) { background: var(--mint); box-shadow: 0 0 12px var(--mint); animation-delay: .8s; }
.lights i:nth-child(4n+4) { background: var(--ice); box-shadow: 0 0 12px var(--ice); animation-delay: 1.2s; }
