/* Battle Report Modal - Dark military/sci-fi, victory green, celebratory */
.battle-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
}

.battle-report-overlay.show {
    opacity: 1;
    visibility: visible;
}

.battle-report-content {
    font-family: var(--font-ui);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.97) 0%, rgba(8, 12, 24, 0.99) 50%);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.75),
        0 0 56px rgba(34, 197, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 520px;
    max-height: 95vh;
    max-height: 95dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: battleReportSlideIn 0.35s ease-out;
}

@keyframes battleReportSlideIn {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Header: BATTLE REPORT + close --- */
.battle-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-bottom: 1px solid rgba(34, 197, 94, 0.35);
    flex-shrink: 0;
}

.battle-report-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    color: #86efac;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-ui);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5), 0 0 40px rgba(34, 197, 94, 0.25);
}

.battle-report-close {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.battle-report-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* --- Hero: VICTORY! / DEFEAT --- */
.battle-report-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    position: relative;
    overflow: hidden;
}

.battle-report-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.battle-report-hero-text-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.battle-report-hero-title {
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: var(--font-ui);
    position: relative;
    z-index: 1;
}

.battle-report-hero-title.victory {
    color: #4ade80;
    text-shadow: 0 0 24px rgba(34, 197, 94, 0.8), 0 0 48px rgba(34, 197, 94, 0.4);
}

.battle-report-hero-title.defeat {
    color: #f87171;
    text-shadow: 0 0 24px rgba(248, 113, 113, 0.5), 0 0 48px rgba(248, 113, 113, 0.25);
}

.battle-report-hero-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.battle-report-hero-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.5));
    position: relative;
    z-index: 1;
}

.battle-report-hero-icon-right {
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.5));
}

/* --- Section block --- */
.battle-report-section {
    padding: 0 1rem 1rem;
    flex-shrink: 0;
}

.battle-report-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.35rem;
    font-family: var(--font-ui);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.battle-report-section-icon {
    font-size: 0.9rem;
    opacity: 0.9;
}

.battle-report-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.08) 50%, transparent 100%);
    margin-bottom: 0.6rem;
}

/* --- Summary: Units Remaining / Units Lost --- */
.battle-report-summary-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.battle-report-summary-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    flex: 1;
}

.battle-report-summary-remaining {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.battle-report-summary-remaining .battle-report-summary-value {
    color: #4ade80;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.battle-report-summary-lost {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.battle-report-summary-lost .battle-report-summary-value {
    color: #f87171;
    font-weight: 700;
}

.battle-report-summary-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.battle-report-summary-value {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.battle-report-resources-gained {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
}

.battle-report-resources-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.battle-report-resources-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
}

/* --- Deployment report: Damage Dealt + Time in battle --- */
.battle-report-deployment-summary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.battle-report-deployment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
}

.battle-report-deployment-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.battle-report-deployment-value {
    font-size: 1rem;
    font-weight: 700;
    color: #93c5fd;
    font-variant-numeric: tabular-nums;
}

/* --- Your Forces list --- */
.battle-report-forces-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.battle-report-force-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 8px;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.battle-report-force-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.battle-report-force-deployed,
.battle-report-force-remaining {
    color: #e2e8f0;
    font-weight: 600;
}

.battle-report-force-arrow {
    color: #64748b;
    font-size: 0.9rem;
}

.battle-report-force-lost {
    margin-left: auto;
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 600;
}

.battle-report-force-row-general {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(88, 28, 135, 0.15);
}

.battle-report-force-general-img {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.battle-report-force-general-icon {
    font-size: 1.1rem;
}

.battle-report-force-general-name {
    color: #e9d5ff;
    font-weight: 600;
}

.battle-report-force-xp {
    margin-left: auto;
    color: #4ade80;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- Rewards list --- */
.battle-report-rewards-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.battle-report-reward-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #a7f3d0;
}

.battle-report-reward-icon {
    font-size: 1rem;
    color: #86efac;
}

.battle-report-reward-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

/* --- Footer: GO TO MAP (glowing blue) + CLOSE --- */
.battle-report-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.battle-report-btn-primary {
    flex: 1;
    max-width: 220px;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    color: #0f172a;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 4px 14px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.battle-report-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.6), 0 6px 20px rgba(59, 130, 246, 0.4);
}

.battle-report-btn-primary:active {
    transform: translateY(0);
}

.battle-report-btn-secondary {
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #94a3b8;
    transition: all 0.2s;
}

.battle-report-btn-secondary:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: #94a3b8;
    color: #e2e8f0;
}

/* Scrollable body when content overflows */
.battle-report-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 0.5rem;
}

@media (max-width: 520px) {
    .battle-report-content {
        max-width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }

    .battle-report-hero-title {
        font-size: 1.35rem;
    }

    .battle-report-btn-primary {
        max-width: none;
    }
}
