/* Variáveis de cores modernas */
:root {
    --red-alliance: #e63946;
    --red-bg: #ffebee;
    --blue-alliance: #1d3557;
    --blue-bg: #e3f2fd;
    --dark: #2b2d42;
    --bg-color: #f4f6f9;
    --highlight: #ffd166;
    --text-main: #333;
    --text-muted: #666;
}

/* Reset Básico para Mobile */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg-color); color: var(--text-main); padding-bottom: 30px; }

/* Modais */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); backdrop-filter: blur(3px);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
}
.modal-card {
    background: white; padding: 25px; border-radius: 20px; 
    width: 90%; max-width: 350px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.modal-card h2 { margin-bottom: 20px; font-size: 1.5rem; color: var(--dark); }

/* Inputs e Botões Gerais */
select, input, button { 
    width: 100%; padding: 14px; border-radius: 12px; border: 1px solid #ccc; 
    font-size: 16px; margin-bottom: 12px; outline: none; transition: 0.2s;
}
input:focus, select:focus { border-color: var(--blue-alliance); }

button { border: none; font-weight: bold; cursor: pointer; color: white; display: flex; justify-content: center; align-items: center; gap: 8px;}
button:active { transform: scale(0.98); }
.btn-primary { background: var(--dark); }
.btn-secondary { background: #e0e0e0; color: var(--text-main); }
.btn-cover { background: #457b9d; }
.btn-danger { background: #d62828; }
.btn-small { padding: 8px 12px; width: auto; margin: 0; border-radius: 8px; font-size: 14px; }

/* Cabeçalho */
.app-header { padding: 20px 15px 10px; text-align: center; background: white; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.app-header h1 { font-size: 1.2rem; color: var(--dark); margin-bottom: 10px; }

.info-panel { font-size: 0.85rem; color: var(--text-muted); background: var(--bg-color); padding: 10px; border-radius: 8px; }

.alert-box { padding: 10px 15px; border-radius: 10px; margin-bottom: 10px; font-size: 0.9rem; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
.cover-alert { background: #ffb703; color: #000; }

/* Controles Principais */
.app-main { padding: 15px; }
.controls-card { background: white; padding: 15px; border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 20px; }
.action-buttons { display: flex; gap: 10px; }
.action-buttons button { margin-bottom: 0; }

/* Estilo dos Cards de Partida (Substituindo a Tabela) */
.match-container { display: flex; flex-direction: column; gap: 15px; }
.match-card { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.06); border: 1px solid #eee; transition: opacity 0.3s; }
.match-card.completed { opacity: 0.5; } /* Partidas finalizadas ficam mais transparentes */

.match-header { background: var(--dark); color: white; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.match-score { font-size: 0.9rem; background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; }

.alliances { display: flex; flex-direction: column; }
.alliance { padding: 12px 15px; display: flex; justify-content: space-around; border-bottom: 1px solid #eee; }
.alliance.red { background: var(--red-bg); border-left: 5px solid var(--red-alliance); }
.alliance.blue { background: var(--blue-bg); border-left: 5px solid var(--blue-alliance); border-bottom: none; }

/* Times e Marcação do Robô */
.team { font-size: 1.1rem; font-weight: bold; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dark); padding: 5px 10px; border-radius: 8px;}
.pos-badge { font-size: 0.7rem; color: #fff; padding: 2px 6px; border-radius: 10px; background: #999; }

.alliance.red .pos-badge { background: var(--red-alliance); }
.alliance.blue .pos-badge { background: var(--blue-alliance); }

/* O ROBÔ QUE EU VOU SCOUTAR */
.my-robot { 
    background-color: var(--highlight); 
    box-shadow: 0 0 0 2px #fbc02d;
    transform: scale(1.1);
}
.my-robot .pos-badge { background: #000 !important; color: var(--highlight); }
