/* Battle Simulator - Estilos */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.armies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.army-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 3px solid #e0e0e0;
}

.army-section.attacker {
    border-color: #e74c3c;
}

.army-section.defender {
    border-color: #3498db;
}

.army-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.troop-slot {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.troop-slot h3 {
    color: #555;
    font-size: 14px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
    font-size: 13px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: white;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #2a5298;
}

.form-group select.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.btn-simulate {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-simulate:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(231, 76, 60, 0.4);
}

.btn-simulate:active {
    transform: translateY(0);
}

.btn-simulate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.results {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 3px solid #28a745;
    display: none;
}

.results.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.winner-banner {
    background: linear-gradient(135deg, #28a745, #20803d);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.winner-banner.defender {
    background: linear-gradient(135deg, #3498db, #2874a6);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.stat-box .label {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-box .value {
    color: #333;
    font-size: 32px;
    font-weight: bold;
}

.stat-box.attacker .value {
    color: #e74c3c;
}

.stat-box.defender .value {
    color: #3498db;
}

.rounds-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.rounds-summary h3 {
    color: #333;
    margin-bottom: 15px;
}

.round-item {
    padding: 10px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.info-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.info-box p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

@media (max-width: 768px) {
    .armies {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.8em;
    }
}
