:root {
    --nc-base:   #00f0ff;
    --nc-accent: #ff2d75;
}

* { font-family: 'Space Grotesk', sans-serif; }
.f-display { font-family: 'Rajdhani', sans-serif; }

/* ── Screen logic ── */
.screen { display: none; }
.screen.activo { display: flex; flex-direction: column; }
#resultadoPartida { display: none; }
#resultadoPartida.mostrar {
    display: block;
    animation: slideUp .4s cubic-bezier(.16,1,.3,1) both;
}

/* ── Background ── */
body {
    background-color: #0a0a0a;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,45,117,.13) 0%, transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(0,240,255,.13) 0%, transparent 28%),
        radial-gradient(ellipse 80% 55% at 10% 5%,  rgba(245,158,11,.04) 0%, transparent 60%),
        radial-gradient(ellipse 80% 55% at 90% 95%, rgba(34,211,238,.03) 0%, transparent 60%);
}
.z-up { position: relative; z-index: 2; }

/* ── Particles canvas ── */
#particlesCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ── Neon cursor ── */
.neon-cursor {
    position: fixed;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--nc-base);
    mix-blend-mode: screen;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    filter: blur(1px);
    opacity: .7;
    transition: transform .15s ease, background .15s ease;
}
.neon-cursor::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--nc-accent);
    mix-blend-mode: screen;
    animation: cursorPulse 2s ease-in-out infinite;
}
@keyframes cursorPulse {
    0%,100% { opacity: .6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.4); }
}

/* ── Glow card ── */
.glow-card {
    box-shadow:
        0 0 12px rgba(245,158,11,.18),
        0 0 28px rgba(0,240,255,.1),
        0 0 0 1px rgba(255,255,255,.06),
        0 20px 60px rgba(0,0,0,.55) !important;
    backdrop-filter: blur(14px);
}

/* ── 3D Coin ── */
.coin-stage {
    perspective: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 148px;
}
#liveCoin {
    width: 116px;
    height: 116px;
    position: relative;
    transform-style: preserve-3d;
}
#liveCoin[data-result="sello"] {
    transform: rotateY(180deg);
}
.coin-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.coin-front {
    box-shadow: 0 0 44px rgba(245,158,11,.22);
}
.coin-back {
    transform: rotateY(180deg);
    box-shadow: 0 0 30px rgba(148,163,184,.12);
}
.coin-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

@keyframes coinSpin {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(1440deg); }
}
#liveCoin.is-spinning {
    animation: coinSpin .92s cubic-bezier(.4,0,.2,1);
}

/* ── Player cards ── */
.pcard-1 {
    background: linear-gradient(150deg, rgba(34,211,238,.055) 0%, transparent 100%);
    border: 1.5px solid rgba(34,211,238,.22);
}
.pcard-2 {
    background: linear-gradient(150deg, rgba(251,113,133,.055) 0%, transparent 100%);
    border: 1.5px solid rgba(251,113,133,.22);
}
.score-1 { color: #22d3ee; text-shadow: 0 0 28px rgba(34,211,238,.5); }
.score-2 { color: #fb7185; text-shadow: 0 0 28px rgba(251,113,133,.5); }

/* ── Choice buttons ── */
.btn-choice {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    border: none;
}
.btn-choice::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 38%;
    background: linear-gradient(180deg, rgba(255,255,255,.1), transparent);
    pointer-events: none;
}
.btn-choice:not(:disabled):hover { transform: translateY(-4px); }
.btn-choice:not(:disabled):active { transform: translateY(0) scale(.97); }
.btn-choice:disabled { opacity: .38; cursor: not-allowed; pointer-events: none; }

.btn-cara {
    background: linear-gradient(158deg, #92400e 0%, #78350f 50%, #431407 100%);
    box-shadow: 0 8px 28px rgba(120,53,15,.45), inset 0 1px 0 rgba(255,255,255,.12);
    outline: 1.5px solid rgba(245,158,11,.4);
}
.btn-cara:not(:disabled):hover {
    box-shadow: 0 14px 36px rgba(180,83,9,.55), 0 0 0 1.5px rgba(245,158,11,.6);
}
.btn-sello {
    background: linear-gradient(158deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 8px 28px rgba(15,23,42,.55), inset 0 1px 0 rgba(255,255,255,.08);
    outline: 1.5px solid rgba(148,163,184,.22);
}
.btn-sello:not(:disabled):hover {
    box-shadow: 0 14px 36px rgba(15,23,42,.65), 0 0 0 1.5px rgba(148,163,184,.4);
}

/* ── Round pills ── */
.round-pill {
    flex: 1;
    padding: .5rem 0;
    border-radius: .625rem;
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: .04em;
    border: 1.5px solid rgba(255,255,255,.08);
    background: transparent;
    color: rgba(255,255,255,.28);
    cursor: pointer;
    transition: all .2s ease;
}
.round-pill:hover, .round-pill.active {
    background: rgba(245,158,11,.1);
    border-color: rgba(245,158,11,.45);
    color: #fbbf24;
}
.round-pill.active { box-shadow: 0 0 14px rgba(245,158,11,.18); }

/* ── Round progress dots ── */
.rdot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    transition: all .3s ease;
}
.rdot.done    { background: rgba(255,255,255,.18); border-color: transparent; }
.rdot.current { background: #f59e0b; border-color: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,.55); }

/* ── Inputs ── */
.game-input {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1.5px solid rgba(255,255,255,.08);
    border-radius: .75rem;
    padding: .65rem 1rem;
    color: white;
    font-size: .95rem;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.game-input::placeholder { color: rgba(255,255,255,.2); }
.game-input-p1 { border-left: 2.5px solid rgba(34,211,238,.5); }
.game-input-p1:focus { border-color: rgba(34,211,238,.45); box-shadow: 0 0 0 3px rgba(34,211,238,.07); }
.game-input-p2 { border-left: 2.5px solid rgba(251,113,133,.5); }
.game-input-p2:focus { border-color: rgba(251,113,133,.45); box-shadow: 0 0 0 3px rgba(251,113,133,.07); }

/* ── Animations ── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes winReveal {
    0%  { opacity: 0; transform: scale(.85) translateY(18px); }
    70% { transform: scale(1.025) translateY(-2px); }
    100%{ opacity: 1; transform: scale(1) translateY(0); }
}
.anim-win { animation: winReveal .5s cubic-bezier(.16,1,.3,1) both; }

@keyframes pulseGold {
    0%,100% { box-shadow: 0 0 22px rgba(245,158,11,.1), 0 0 0 1px rgba(245,158,11,.12); }
    50%      { box-shadow: 0 0 44px rgba(245,158,11,.22), 0 0 0 1px rgba(245,158,11,.25); }
}
.pulse-gold { animation: pulseGold 3s ease-in-out infinite; }

/* ── Helpers ── */
.hr-dim {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245,158,11,.28); border-radius: 99px; }
