/* =========================================================
   BATTLE.CSS - Modo Multijugador "La Cinchada" (Feature 15)
   Design System: Baldor Watercolor – Módulo aditivo
   ========================================================= */

/* ─── Variables locales de batalla (ajustadas a paleta Baldora) ── */
:root {
    --clr-blue-400: var(--clr-rose-500);    /* Jugador → rosa marca   */
    --clr-blue-600: var(--clr-rose-700);
    --clr-yellow-400: var(--clr-gold-500);  /* Fantasma → dorado marca */
    --clr-yellow-600: #c8940e;
    --clr-battle-bg: var(--clr-sand-100);
    --clr-battle-surface: rgba(255, 255, 255, 0.82);
    --dial-size: 56px;
    --dial-gap: 10px;
}

/* ─── Avatares circulares en header ──────────────────────── */
.battle-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--clr-sand-300);
}

.battle-avatar-blue {
    border-color: #3b82f6;
}

.battle-avatar-yellow {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
}

.battle-player-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.battle-player-meta-right {
    align-items: flex-end;
}

/* ─── Vista de Batalla ────────────────────────────────────── */
#battle-view {
    min-height: 100vh;
    background: url('../images/baldora_background.png') center / cover no-repeat;
    display: none;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#battle-view.view.active {
    display: flex;
}

/* Overlay suave sobre el fondo para legibilidad */
#battle-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(250, 249, 246, 0.45);
    pointer-events: none;
}

/* ─── Header de batalla ────────────────────────────────────── */
.battle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--clr-sand-300);
    z-index: 2;
    flex-shrink: 0;
}

.battle-player-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.battle-player-info-right {
    flex-direction: row-reverse;
}

.battle-player-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.battle-player-color.blue {
    background: var(--clr-blue-400);
    box-shadow: 0 0 8px var(--clr-blue-400);
}

.battle-player-color.yellow {
    background: var(--clr-yellow-400);
    box-shadow: 0 0 8px var(--clr-yellow-400);
}

.battle-player-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--clr-ink-900);
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-score {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.battle-score.blue {
    color: var(--clr-blue-400);
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.battle-score.yellow {
    color: var(--clr-yellow-400);
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.6);
}

.battle-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.battle-ops-counter {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--clr-rock-500);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.battle-ops-counter strong {
    color: var(--clr-ink-900);
    font-size: 4rem;
    line-height: 1;
}

/* ─── Arena: Cuerda y Personajes ─────────────────────────── */
.battle-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    position: relative;
    flex-shrink: 0;
    z-index: 2;
}

.battle-rope-track {
    width: 90%;
    max-width: 600px;
    height: 12px;
    background: linear-gradient(
        90deg,
        #facc15 0%,
        #facc15 calc(50% - 1.5px),
        #000    calc(50% - 1.5px),
        #000    calc(50% + 1.5px),
        #3b82f6 calc(50% + 1.5px),
        #3b82f6 100%
    );
    border-radius: 6px;
    position: relative;
    margin: 8px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Fills eliminados — el degradado es estático; el indicador marca la posición */
.battle-rope-fill-blue,
.battle-rope-fill-yellow {
    display: none;
}

.battle-rope-indicator {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: left 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* CA-02: ≤250ms */
    z-index: 5;
    left: 50%;
}

/* Zonas de victoria */
.battle-rope-track::before {
    content: '🟡';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.battle-rope-track::after {
    content: '🔵';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

/* Área de cavernícolas */
.battle-characters {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 60px;
}

.battle-meat {
    font-size: 2.8rem;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    user-select: none;
    display: inline-block;
}

/* ─── Operación central ──────────────────────────────────── */
.battle-operation-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    z-index: 2;
    padding: 0 120px;
    /* Espacio para diales laterales en desktop */
    gap: 12px;
}

.battle-operation-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--clr-sand-300);
    border-radius: 20px;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.battle-factor {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--clr-ink-900);
    font-weight: 700;
    line-height: 1;
    min-width: 2ch;
    text-align: center;
}

.battle-operator {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--clr-rock-500);
}

.battle-equals {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--clr-rock-500);
}

.battle-answer-display {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--clr-rose-500);
    min-width: 3ch;
    text-align: center;
    transition: color 0.15s;
}

.battle-answer-display.wrong-flash {
    animation: wrongFlash 0.4s ease;
}

@keyframes wrongFlash {

    0%,
    100% {
        color: var(--clr-rose-500);
    }

    50% {
        color: #ff4444;
        transform: scale(1.1);
    }
}

/* ─── Diales de Control ──────────────────────────────────── */
.battle-dials-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 3;
    padding: 0 10px;
}

.battle-dial {
    pointer-events: all;
    display: flex;
    flex-direction: column;
    gap: var(--dial-gap);
    padding: 16px 12px;
    backdrop-filter: blur(12px);
    border-radius: 20px;
    user-select: none;
    transition: opacity 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Dial amarillo — fantasma (izquierda) */
#dial-left {
    background: rgba(255, 245, 200, 0.88);
    border: 2px solid rgba(218, 165, 32, 0.45);
}

/* Dial azul — jugador (derecha) */
#dial-right {
    background: rgba(210, 230, 255, 0.88);
    border: 2px solid rgba(59, 130, 246, 0.45);
}

/* Diales inactivos (del oponente) */
.battle-dial:not(.my-dial) {
    opacity: 0.25;
    pointer-events: none;
}

.dial-row {
    display: flex;
    gap: var(--dial-gap);
    justify-content: center;
}

.dial-btn {
    width: var(--dial-size);
    height: var(--dial-size);
    background: var(--clr-sand-100);
    border: 2px solid var(--clr-sand-300);
    border-radius: 12px;
    color: var(--clr-ink-900);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Táctil: mínimo 44px para CA-04 */
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.dial-btn:hover {
    background: var(--clr-sand-300);
    border-color: var(--clr-rock-500);
    transform: scale(1.05);
}

.dial-btn:active {
    transform: scale(0.95);
    background: var(--clr-sand-300);
}

/* Botones del dial azul (jugador) */
#dial-right .dial-btn {
    background: rgba(186, 217, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.4);
}

#dial-right .dial-btn:hover {
    background: rgba(147, 197, 253, 0.9);
    border-color: rgba(59, 130, 246, 0.75);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Botones del dial amarillo (fantasma) */
#dial-left .dial-btn {
    background: rgba(253, 240, 170, 0.7);
    border-color: rgba(218, 165, 32, 0.4);
}

#dial-left .dial-btn:hover {
    background: rgba(253, 224, 100, 0.9);
    border-color: rgba(218, 165, 32, 0.75);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.2);
}

/* Botón Clear */
.dial-btn-clear {
    background: rgba(255, 68, 68, 0.2) !important;
    border-color: rgba(255, 68, 68, 0.4) !important;
    font-size: 0.85rem !important;
    letter-spacing: 0;
}

.dial-btn-clear:hover {
    background: rgba(255, 68, 68, 0.4) !important;
}

/* Label del dial */
.dial-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--clr-rock-500);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: -4px;
}

/* ─── Overlay de Invitación de Duelo ─────────────────────── */
#duel-invite-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#duel-invite-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.duel-invite-card {
    background: var(--clr-sand-100);
    border: 2px solid var(--clr-gold-500);
    border-radius: 24px;
    padding: 36px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 0 40px rgba(218, 165, 32, 0.2), 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.duel-invite-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    animation: shake 0.6s 0.3s ease both;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.duel-invite-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--clr-rock-500);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.duel-invite-challenger {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--clr-gold-500);
    margin-bottom: 24px;
    text-shadow: 0 0 16px rgba(218, 165, 32, 0.35);
}

.duel-invite-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-duel-accept {
    background: linear-gradient(135deg, var(--clr-rose-500), var(--clr-rose-700));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-duel-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(209, 107, 165, 0.4);
}

.btn-duel-decline {
    background: var(--clr-sand-300);
    color: var(--clr-rock-500);
    border: 1px solid var(--clr-sand-300);
    border-radius: 12px;
    padding: 14px 20px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}

.btn-duel-decline:hover {
    background: #d9b8b8;
    border-color: var(--clr-rose-500);
    color: var(--clr-ink-900);
}

/* ─── Overlay de Resultado de Batalla ─────────────────────── */
#battle-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

#battle-result-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.battle-result-card {
    background: var(--clr-surface-high);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: resultSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultSlide {
    from { transform: translateY(40px) scale(0.92); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.battle-result-icon {
    font-size: 2rem;
    text-align: center;
}

.battle-result-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--clr-rose-500);
    margin: 0;
    text-align: center;
}

.battle-result-msg {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

.battle-result-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.btn-battle-home {
    background: var(--clr-sand-300);
    color: var(--clr-ink-900);
    border: 1px solid var(--clr-sand-300);
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-battle-home:hover {
    background: var(--clr-rock-500);
    color: white;
}

/* ─── Overlay: Cuenta Regresiva VS ───────────────────────── */
.battle-countdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.battle-countdown-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.battle-countdown-box {
    background: var(--clr-surface-high);
    border-radius: var(--radius-lg);
    padding: 36px 48px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-countdown-number {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 700;
    color: var(--clr-rose-500);
    line-height: 1;
    animation: countPulse 0.5s ease;
}

@keyframes countPulse {
    from { transform: scale(1.4); opacity: 0.4; }
    to   { transform: scale(1);   opacity: 1; }
}

.battle-countdown-label {
    font-size: 0.9rem;
    color: var(--clr-rock-500);
}

/* ─── Botón Buscar Duelo (en Config View) ────────────────── */
.btn-find-duel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 2px);
    padding: 14px;
    background: linear-gradient(135deg, var(--clr-rose-500), var(--clr-rose-700));
    border: 2px solid var(--clr-rose-500);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-find-duel:hover {
    border-color: var(--clr-rose-700);
    box-shadow: 0 0 20px rgba(209, 107, 165, 0.35);
    transform: translateY(-2px);
}

.btn-find-duel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* ─── Toast de batalla ───────────────────────────────────── */
.battle-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(250, 249, 246, 0.96);
    border: 1px solid var(--clr-sand-300);
    color: var(--clr-ink-900);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 340px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.battle-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── Ops config slider en battle search ────────────────── */
.battle-config-section {
    background: var(--clr-sand-100);
    border: 1px solid var(--clr-sand-300);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
}

.battle-config-section label {
    font-size: 0.85rem;
    color: var(--clr-rock-500);
    display: block;
    margin-bottom: 6px;
}

/* ─── Responsive ─────────────────────────────────────────── */
/* Mobile vertical: diales apilados */
@media (max-width: 600px) {
    .battle-dials-wrapper {
        position: static;
        flex-direction: row;
        padding: 8px;
        gap: 12px;
    }

    .battle-operation-area {
        padding: 0 12px;
    }

    .battle-dial {
        flex: 1;
    }

    #battle-view {
        min-height: 100dvh;
    }

    :root {
        --dial-size: 44px;
        --dial-gap: 6px;
    }

    .battle-factor {
        font-size: 2rem;
    }

    .battle-answer-display {
        font-size: 2rem;
    }

    .battle-operation-card {
        padding: 14px 20px;
        gap: 10px;
    }
}

/* Mobile horizontal: modo gamepad */
@media (orientation: landscape) and (max-height: 500px) {
    .battle-dials-wrapper {
        position: absolute;
        padding: 8px;
    }

    :root {
        --dial-size: 48px;
        --dial-gap: 6px;
    }

    .battle-arena {
        padding: 4px 0;
    }

    .battle-header {
        padding: 6px 16px;
    }
}

/* ─── Ghost Selection: Layout base ─────────────────────── */
.ghost-selection-content {
    max-width: 500px !important;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ghost-list-container {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
    min-height: 200px;
    max-height: 50vh;
}

.ghost-loader {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── Ghost Selection Full View ────────────────────────── */
#ghost-selection-view .profile-container {
    background: var(--clr-sand-50);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.ghost-list-full-container {
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-sand-200);
    margin-bottom: 40px;
}

/* ─── Ghost Selection: Hall of Fame Table ──────────────── */
.ghost-count-msg {
    font-size: 0.82rem;
    color: var(--text-muted, #888);
    margin-bottom: 12px;
    padding-left: 4px;
}

.ghost-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--clr-sand-300, #e8ddd0);
    background: var(--bg-primary, #fff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ghost-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ghost-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #666);
    background: var(--bg-secondary, #faf7f4);
    border-bottom: 2px solid var(--clr-sand-300, #e8ddd0);
    white-space: nowrap;
}

.ghost-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--clr-sand-200, #f0ebe4);
    color: var(--text-primary, #1a1a1a);
    vertical-align: middle;
}

.ghost-table tbody tr:last-child td {
    border-bottom: none;
}

.ghost-table tbody tr:hover td {
    background: var(--bg-secondary, #faf7f4);
}

.ghost-table tbody tr.ghost-row-me td {
    background: rgba(209, 107, 165, 0.05);
}

.ghost-table tbody tr.ghost-row-me:hover td {
    background: rgba(209, 107, 165, 0.09);
}

.ghost-td-rank {
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-weight: 700;
    color: var(--text-secondary, #888);
    font-size: 0.82rem;
    min-width: 36px;
}

.ghost-td-name {
    font-weight: 700;
    min-width: 120px;
}

.ghost-you-tag {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--clr-rose-500, #e91e63);
    margin-left: 4px;
}

.ghost-td-score,
.ghost-td-time {
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-weight: 600;
    white-space: nowrap;
}

.ghost-td-action {
    white-space: nowrap;
}

/* Liga pill */
.ghost-league-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.ghost-league-pill.league-diamante { background: rgba(0,200,255,0.12); color: #00a8d8; }
.ghost-league-pill.league-platino  { background: rgba(180,200,215,0.18); color: #607d8b; }
.ghost-league-pill.league-oro      { background: rgba(245,166,35,0.12); color: #c47d00; }
.ghost-league-pill.league-plata    { background: rgba(142,167,184,0.12); color: #546e7a; }
.ghost-league-pill.league-bronce   { background: rgba(205,127,50,0.12); color: #a0522d; }
.ghost-league-pill.league-madera   { background: rgba(139,96,66,0.12); color: #795548; }

/* Botones RETAR / SUPERAR */
.btn-challenge {
    background: var(--clr-rose-500, #e91e63);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 999px;
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.btn-challenge:hover {
    background: #c2185b;
    transform: scale(1.05);
}

.btn-challenge-self {
    background: var(--clr-green-500, #6E8C38);
}

.btn-challenge-self:hover {
    background: #5a7830;
}

/* ─── Botones flotantes en vista de batalla ──────────────── */
/* Solo se mantiene visible el botón de perfil/auth */
body.battle-mode #auth-header-btn,
body.battle-mode #btn-lang-toggle,
body.battle-mode #btn-audio-toggle,
body.battle-mode #btn-patreon-float,
body.battle-mode #btn-store-float,
body.battle-mode #btn-help-tour {
    display: none !important;
}
