/* ==========================================================================
   BATTLE - Estilos específicos para batalla, votación y resultados
   ========================================================================== */

/* Battle Screen */
.battle-screen {
    text-align: center;
    padding: 20px;
}

.battle-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.battle-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.battle-info .back-btn {
    width: auto;
    margin: 0;
    padding: 8px 15px;
    height: fit-content;
    min-height: 44px;
}

/* Battle Layout */
.battle-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.battle-top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
}

/* Battle MC Containers */
.battle-mc-container {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    justify-content: center;
    min-width: 200px;
}

.battle-mc-indicator {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid #444;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.battle-mc-container.active-turn .battle-mc-indicator {
    border-color: #00bfff;
    background: rgba(0, 191, 255, 0.15);
    box-shadow: 0 0 40px rgba(0, 191, 255, 0.6), inset 0 0 20px rgba(0, 191, 255, 0.2);
    transform: scale(1.1);
}

.battle-mc-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.battle-mc-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: #ccc;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
    user-select: none;
}

.battle-mc-score {
    font-family: 'Russo One', sans-serif;
    font-size: 1.8rem;
    color: #ff6b35;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
}

.battle-mc-container.active-turn .battle-mc-name,
.battle-mc-container.active-turn .battle-mc-score {
    color: #00bfff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

#battle-mc2-container {
    flex-direction: row-reverse;
}

/* Voting Screen */
.voting-screen {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.voting-header {
    margin-bottom: 30px;
}

.voting-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: #ffd700;
    letter-spacing: 2px;
}

.voting-info {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #444;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.voting-round-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.current-scores {
    display: flex;
    justify-content: center;
    gap: 50px;
    font-family: 'Russo One', sans-serif;
    font-size: 1.2rem;
    flex-wrap: wrap;
}

.score-item {
    color: #ffd700;
}

.voting-question {
    margin-bottom: 40px;
}

.voting-question h2 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Results Screen */
.results-screen {
    text-align: center;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.results-header {
    margin-bottom: 30px;
}

.results-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: #ffd700;
    letter-spacing: 2px;
}

.results-winner {
    margin-bottom: 40px;
}

.winner-announcement {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 2px 2px 0px #ff6b35, 4px 4px 0px rgba(0,0,0,0.8);
    letter-spacing: 3px;
    margin-bottom: 10px;
    user-select: none;
    word-break: break-word;
    line-height: 1.1;
}

.winner-subtitle {
    font-family: 'Russo One', sans-serif;
    font-size: 1.5rem;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.results-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #444;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.final-scores {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.final-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Russo One', sans-serif;
    color: #ffd700;
    font-size: 1.5rem;
}

.score-number {
    font-size: 3rem;
    color: #ff6b35;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.8);
    user-select: none;
}

.vs-separator {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #ccc;
    letter-spacing: 2px;
}

.battle-details {
    color: #ccc;
    font-size: 1.1rem;
}

.results-rounds {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #444;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.results-rounds h3 {
    font-family: 'Russo One', sans-serif;
    color: #ffd700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.round-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid #444;
}

.round-number {
    font-family: 'Russo One', sans-serif;
    color: #ff6b35;
    font-weight: 600;
}

.round-winner {
    color: #ffd700;
    font-weight: 600;
    word-break: break-word;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Mobile Battle Adjustments */
@media (max-width: 768px) {
    .battle-screen {
        padding: 15px 10px;
    }
    
    .battle-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .battle-info {
        justify-content: center;
        gap: 15px;
    }
    
    .battle-layout {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .battle-top-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
        text-align: center;
    }
    
    /* Reorder: MC1, MC2, Timer */
    .battle-top-row > *:nth-child(1) { grid-row: 1; } /* MC1 */
    .battle-top-row > *:nth-child(2) { grid-row: 3; } /* Timer */
    .battle-top-row > *:nth-child(3) { grid-row: 2; } /* MC2 */
    
    .battle-mc-container {
        flex-direction: row;
        justify-content: center;
        min-width: auto;
        max-width: 100%;
    }
    
    .battle-mc-name {
        font-size: 1.8rem;
        max-width: 250px;
        word-break: break-word;
    }
    
    .battle-mc-score {
        font-size: 1.2rem;
    }
    
    .battle-mc-indicator {
        width: 45px;
        height: 45px;
    }
    
    .timer-display {
        font-size: 3rem;
        order: 3;
    }
    
    .word-container {
        width: 95%;
        height: 160px;
        padding: 25px 15px;
    }
}

/* Mobile Voting Adjustments */
@media (max-width: 768px) {
    .voting-screen {
        padding: 20px 15px;
    }
    
    .voting-title {
        font-size: 2rem;
    }
    
    .voting-info {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .voting-round-info {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .current-scores {
        gap: 30px;
        font-size: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .voting-question h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .voting-options {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 30px;
    }
}

/* Mobile Results Adjustments */
@media (max-width: 768px) {
    .results-screen {
        padding: 20px 15px;
    }
    
    .results-title {
        font-size: 2rem;
    }
    
    .winner-announcement {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 8px;
    }
    
    .winner-subtitle {
        font-size: 1.2rem;
    }
    
    .results-summary {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .final-scores {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .final-score {
        font-size: 1.2rem;
    }
    
    .score-number {
        font-size: 2.2rem;
    }
    
    .vs-separator {
        font-size: 1.5rem;
        order: 2;
    }
    
    .results-rounds {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .round-result {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 12px 15px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .results-actions .control-btn {
        min-width: 200px;
        width: 100%;
        max-width: 300px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .battle-mc-name {
        font-size: 1.5rem;
        max-width: 200px;
    }
    
    .battle-mc-score {
        font-size: 1rem;
    }
    
    .battle-mc-indicator {
        width: 40px;
        height: 40px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .voting-title {
        font-size: 1.7rem;
    }
    
    .voting-question h2 {
        font-size: 1.2rem;
    }
    
    .winner-announcement {
        font-size: 1.8rem;
    }
    
    .final-score {
        font-size: 1rem;
    }
    
    .score-number {
        font-size: 1.8rem;
    }
    
    .round-result {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .battle-header {
        margin-bottom: 15px;
    }
    
    .battle-layout {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .battle-top-row {
        gap: 10px;
    }
    
    .battle-mc-name {
        font-size: 1.5rem;
    }
    
    .battle-mc-score {
        font-size: 1rem;
    }
    
    .battle-mc-indicator {
        width: 40px;
        height: 40px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .word-container {
        height: 120px;
        padding: 20px 15px;
    }
    
    .current-word {
        font-size: 1.5rem;
    }
    
    .voting-screen {
        padding: 15px 10px;
    }
    
    .results-screen {
        padding: 15px 10px;
    }
    
    .winner-announcement {
        font-size: 2rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1023px) {
    .battle-top-row {
        grid-template-columns: 1fr auto 1fr;
        gap: 20px;
    }
    
    .battle-mc-name {
        font-size: 2.2rem;
        max-width: 300px;
    }
    
    .battle-mc-score {
        font-size: 1.5rem;
    }
    
    .battle-mc-indicator {
        width: 55px;
        height: 55px;
    }
    
    .timer-display {
        font-size: 4rem;
    }
    
    .word-container {
        width: 90%;
        height: 220px;
    }
    
    .current-word {
        font-size: 3rem;
    }
    
    .winner-announcement {
        font-size: 3rem;
    }
    
    .voting-title {
        font-size: 2.2rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .battle-mc-container.active-turn .battle-mc-indicator {
        transform: none;
        animation: none;
    }
    
    .voting-option:hover {
        transform: none;
    }
    
    .results-actions .control-btn:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .battle-mc-container.active-turn .battle-mc-name,
    .battle-mc-container.active-turn .battle-mc-score {
        color: #fff;
        text-shadow: 2px 2px 0px #000;
    }
    
    .winner-announcement {
        color: #fff;
        text-shadow: 2px 2px 0px #000;
    }
}
