/* ================================================================
   LOGIN OVERLAY
   ================================================================ */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary, #0a0a0a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 2rem;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border-color, #222);
    border-radius: 16px;
    width: min(380px, 92vw);
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-green, #4ade80);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.login-divider {
    color: #444;
    font-size: 0.78rem;
    margin: 0.2rem 0;
}

.login-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}
.login-form input[type="password"] {
    flex: 1;
    padding: 0.65rem 1rem;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    color: var(--text-primary, #eee);
    font-size: 16px; /* mínimo 16px en iOS para evitar zoom automático */
    touch-action: manipulation;
    outline: none;
    -webkit-appearance: none;
}
.login-form input[type="password"]:focus {
    border-color: var(--accent-green, #4ade80);
}

.login-error {
    color: #f87171;
    font-size: 0.83rem;
    margin: 0;
}

/* ================================================================
   SPECTATOR VIEW — Karaoke
   ================================================================ */
#spectator-view {
    position: fixed;
    inset: 0;
    background: #000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spec-header {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border-bottom: 1px solid #1a1a1a;
}

.spec-title-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #555;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.spec-size-btn {
    background: transparent;
    border: 1px solid #333;
    border-radius: 6px;
    color: #555;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
    flex-shrink: 0;
}
.spec-size-btn:hover { color: #aaa; border-color: #555; }

.spec-exit-btn {
    background: transparent;
    border: none;
    color: #333;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    flex-shrink: 0;
}
.spec-exit-btn:hover { color: #666; }

.spec-wait {
    color: #2a2a2a;
    font-style: italic;
    font-size: 1rem;
    margin-top: 40vh;
    text-align: center;
}

.spec-lyrics {
    width: min(680px, 96vw);
    padding-top: 38vh;
    padding-bottom: 65vh;
}

.spec-line {
    font-size: var(--spec-font-size, 2rem);
    line-height: 1.75;
    text-align: center;
    color: #666;
    padding: 0.15rem 0.5rem;
    transition: color 0.35s ease, font-size 0.25s ease, text-shadow 0.35s ease;
}

.spec-line.spec-past {
    color: #444;
}

.spec-line.spec-active {
    color: #ffffff;
    font-size: calc(var(--spec-font-size, 2rem) * 1.2);
    font-weight: 700;
    text-shadow:
        0 0 20px rgba(74, 222, 128, 0.5),
        0 0 60px rgba(74, 222, 128, 0.2);
}

/* Cuenta atrás 4-3-2-1 para espectadores */
#spec-countdown {
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    font-size: clamp(5rem, 20vw, 12rem);
    font-weight: 900;
    color: var(--accent-cyan, #3ce5d7);
    text-shadow: 0 0 40px rgba(60,229,215,0.6);
    pointer-events: none;
}

/* Ingreso con banda */
.login-form-col { flex-direction: column; }
.login-form input[type="text"] {
    flex: 1; min-width: 0;
    padding: 0.65rem 1rem;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    color: var(--text-primary, #eee);
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}
.login-form input[type="text"]:focus { border-color: var(--accent-green, #4ade80); }
.login-form input[type="password"] { min-width: 0; }
.nav-band-name { color: var(--accent-cyan, #3ce5d7); font-size: 0.85rem; margin-right: 8px; font-weight: 700; }
.btn-logout {
    background: transparent; border: 1px solid var(--border-color, #333); color: #aaa; border-radius: 6px;
    font-size: 0.75rem; padding: 2px 8px; margin-right: 15px; cursor: pointer;
}
.btn-logout:hover { color: #fff; border-color: #888; }
.btn-logout.hidden { display: none; }
.nav-band-name { cursor: pointer; }
.nav-band-name:hover { text-decoration: underline; }
.nav-band-name:not(:empty)::after { content: " ⚙"; font-size: 0.8em; opacity: 0.7; }

/* ¿Quién eres? */
#existing-profiles .profile-current { background: var(--accent-cyan, #3ce5d7); color: #000; border-color: transparent; }
.profile-modal-hint { color: #777; font-size: 0.75rem; margin: 6px 0 0; }
.profile-modal-hint a { color: var(--accent-cyan, #3ce5d7); }

/* Contraseña provisoria: elegir la propia */
.new-password-modal {
    background: var(--bg-panel); color: var(--text-bright); border: 1px solid var(--accent-cyan, #3ce5d7);
    border-radius: 12px; padding: 22px; max-width: 380px; width: 92vw; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.new-password-modal::backdrop { background: rgba(0,0,0,0.8); }
.new-password-modal h2 { color: var(--accent-cyan, #3ce5d7); font-size: 1.15rem; }
.new-password-modal p { color: #aaa; font-size: 0.85rem; margin: 8px 0 14px; }
.new-password-modal input {
    width: 100%; margin-bottom: 8px; padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 16px;
    background: var(--bg-color); color: #fff; border: 1px solid var(--border-color);
}
.new-password-modal input:focus { outline: none; border-color: var(--accent-cyan, #3ce5d7); }
.new-password-modal button { width: 100%; margin-top: 6px; }
