/* Battle Report Modern Styling */
.battle-report {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.battle-report-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.battle-outcome {
    font-size: 1.8em;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.battle-outcome.victory {
    color: #22c55e;
}

.battle-outcome.defeat {
    color: #ef4444;
}

.mission-id {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

.battle-report-content {
    padding: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card .target { color: #f97316; }
.info-card .timeline { color: #3b82f6; }
.info-card .forces { color: #92400e; }
.info-card .stats { color: #1e40af; }
.info-card .resources { color: #15803d; }

.battle-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.battle-table th {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.battle-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.battle-table tr:last-child td {
    border-bottom: none;
}

.battle-table tr:nth-child(even) {
    background: #f8fafc;
}

.unit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.unit-row:last-child {
    border-bottom: none;
}

.unit-name {
    font-weight: 500;
    color: #1e293b;
}

.unit-quantity {
    font-weight: 600;
    color: #3b82f6;
}

.power-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.power-stat {
    text-align: center;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 6px;
}

.power-stat-label {
    font-size: 0.8em;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.power-stat-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #1e293b;
}

.casualties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.casualty-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #ef4444;
}

.survivor-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #22c55e;
}

.resource-summary {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.resource-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.resource-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #15803d;
}

.resource-label {
    font-size: 0.9em;
    color: #374151;
    text-transform: capitalize;
}

.total-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #15803d;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(34, 197, 94, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .casualties-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .battle-table {
        font-size: 0.9em;
    }
    
    .battle-table th,
    .battle-table td {
        padding: 8px 10px;
    }
}

/* Animation for battle outcome */
@keyframes victoryPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.battle-outcome.victory {
    animation: victoryPulse 2s ease-in-out;
}

/* Tooltip styling */
.tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #64748b;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Battle intensity indicators */
.intensity-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 5px 0;
}

.intensity-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #f59e0b 50%, #ef4444 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}