/* ============================================
   BROADCAST CARD - IMAGEM DE FUNDO
   ============================================ */

/* Card principal */
.broadcast-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
    min-height: 280px;
}

/* Imagem de fundo do card */
.card-map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.card-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.3);
    transform: scale(1.1);
    transition: transform var(--transition-normal);
}

.broadcast-card:hover .card-map img {
    transform: scale(1.2);
}

/* Overlay escuro para contraste */
.card-map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.9));
    z-index: 1;
}

/* Conteúdo do card (fica sobre a imagem) */
.card-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Nome do mapa sobre a imagem */
.map-name-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: bold;
    color: var(--text-primary);
    backdrop-filter: blur(5px);
    z-index: 3;
}

/* Live badge */
.live-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-red);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: bold;
    color: white;
    z-index: 3;
    animation: pulse 1.5s infinite;
}

/* Phase badge - versão unificada */
.phase-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 3;
}

.phase-warmup {
    background: #ff9800;
    color: #000;
    animation: pulse 1s infinite;
}

.phase-live {
    background: #e62424;
    color: white;
}

.phase-intermission {
    background: #2196f3;
    color: white;
}

.phase-gameover {
    background: #4caf50;
    color: white;
}

/* Match scoreboard - CORRIGIDO */
.match-scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team1 {
    justify-content: flex-start;
}

.team2 {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.team-score {
    font-size: 28px;
    font-weight: bold;
    font-family: monospace;
    color: var(--primary-red);
    min-width: 40px;
    text-align: center;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.team-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flag {
    font-size: 18px;
}

.vs {
    text-align: center;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vs span:first-child {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: bold;
}

.round {
    background: var(--primary-red);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: bold;
}

/* Round timer */
.round-timer {
    text-align: center;
    font-size: 12px;
    color: var(--primary-red);
    font-family: monospace;
    margin: 5px 0;
    background: rgba(230, 36, 36, 0.15);
    padding: 6px;
    border-radius: var(--radius-sm);
}

/* Match stats */
.match-stats {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    font-size: 12px;
    color: var(--text-secondary);
    margin: 10px 0;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.match-stats span {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Top frag */
.top-frag {
    background: linear-gradient(135deg, rgba(230, 36, 36, 0.15), rgba(230, 36, 36, 0.05));
    border-left: 3px solid #ff9800;
    padding: 6px 10px;
    margin: 8px 0;
    font-size: 11px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

/* Card buttons */
.card-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.copy-cmd-btn {
    flex: 1;
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.copy-cmd-btn:hover {
    background: var(--primary-red-dark);
    transform: translateY(-1px);
}

/* ============================================
   RESPONSIVIDADE CORRIGIDA
   ============================================ */

/* Mobile landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .game-canvas {
        height: 250px;
    }
    
    .modal-body {
        padding: 10px;
    }
}

/* Telas muito pequenas - APENAS AJUSTES, não mover os estilos do card */
@media (max-width: 480px) {
    .match-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .sync-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .team-score {
        font-size: 18px;
    }
    
    .team-name {
        max-width: 60px;
        font-size: 11px;
    }
    
    .card-info {
        padding: 15px;
        min-height: 250px;
    }
}

/* ============================================
   CORREÇÕES PARA O CARD - IMAGEM DE FUNDO
   ============================================ */

/* Garantir que o card tenha posição relativa */
.broadcast-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #1a1a1a !important;
    min-height: 320px !important;
}

/* Imagem de fundo */
.broadcast-card .card-map {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
}

.broadcast-card .card-map img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: blur(1px) brightness(0.55) !important;
}

/* Overlay escuro para contraste do texto */
.broadcast-card .card-map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.8));
    z-index: 1;
}

/* Conteúdo do card - fica sobre a imagem */
.broadcast-card .card-info {
    position: relative !important;
    z-index: 2 !important;
    padding: 20px !important;
    min-height: 320px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: transparent !important;
}

/* Badges */
.live-badge {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 3 !important;
    background: #e62424 !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    color: white !important;
    animation: pulse 1.5s infinite;
}

.phase-badge {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 3 !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    text-transform: uppercase;
}

.map-name-overlay {
    position: absolute !important;
    top: 15px !important;
    right: 80px !important;
    z-index: 3 !important;
    background: rgba(0,0,0,0.7) !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    backdrop-filter: blur(5px);
}

/* Placar */
.match-scoreboard {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin-bottom: 15px !important;
    backdrop-filter: blur(5px);
}

.team {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.team1 {
    justify-content: flex-start !important;
}

.team2 {
    justify-content: flex-end !important;
}

.team-score {
    font-size: 28px !important;
    font-weight: bold !important;
    font-family: monospace !important;
    color: #e62424 !important;
    min-width: 50px !important;
    text-align: center !important;
}

.team-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.team-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.flag {
    font-size: 18px !important;
}

.vs {
    text-align: center !important;
    padding: 0 20px !important;
}

.vs span:first-child {
    color: #888 !important;
    font-size: 12px !important;
}

.round {
    background: #e62424 !important;
    color: white !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    margin-top: 4px !important;
    display: inline-block !important;
}

/* Stats */
.match-stats {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    margin: 10px 0 !important;
    font-size: 12px !important;
    color: #aaa !important;
    flex-wrap: wrap !important;
}

/* Top frag */
.top-frag {
    background: linear-gradient(135deg, rgba(230,36,36,0.15), rgba(230,36,36,0.05)) !important;
    border-left: 3px solid #ff9800 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    margin: 8px 0 !important;
    font-size: 11px !important;
    color: #ccc !important;
}

/* Botão */
.card-buttons {
    margin-top: 12px !important;
}

.copy-cmd-btn {
    width: 100% !important;
    background: #e62424 !important;
    color: white !important;
    border: none !important;
    padding: 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.copy-cmd-btn:hover {
    background: #b01b1b !important;
    transform: translateY(-1px) !important;
}

/* Round timer */
.round-timer {
    text-align: center !important;
    background: rgba(230,36,36,0.15) !important;
    padding: 6px !important;
    border-radius: 6px !important;
    font-family: monospace !important;
    font-size: 12px !important;
    color: #e62424 !important;
    margin: 5px 0 !important;
}