/* CitizenGame battle bundle — merged (theme → page → enhanced → screen). Do not @import split files; they were removed. */

/* ========== battle-theme.css ========== */
/* Battle Page - 1:1 Mockup Styles */

/* Global Battle Frame */
.battle-frame {
    min-height: 100vh;
    background: #0a0e1a;
    background-image: 
        linear-gradient(rgba(30, 60, 120, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 60, 120, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, rgba(255, 200, 100, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(100, 150, 255, 0.05) 0%, transparent 50%);
    background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%;
    position: relative;
    overflow-x: hidden;
}

/* Top Header Bar */
.battle-top-bar {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    border-bottom: 1px solid rgba(255, 200, 100, 0.2);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.battle-top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.battle-top-bar-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.battle-top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.battle-player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
}

.battle-player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 0;
    border: 2px solid rgba(255, 200, 100, 0.4);
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
}

.battle-player-avatar:hover {
    border-color: rgba(255, 200, 100, 0.7);
    transform: scale(1.1);
}

.battle-player-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.battle-player-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #d4af37;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.battle-player-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.battle-vip-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s, filter 0.2s;
}

.battle-vip-icon-btn:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
}

.battle-vip-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.battle-player-name {
    cursor: pointer;
    transition: color 0.2s;
}

.battle-player-name:hover {
    color: #ffb84d;
}

.battle-country-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.battle-country-info:hover {
    background: rgba(255, 200, 100, 0.1);
}

.battle-country-name {
    transition: color 0.2s;
}

.battle-country-info:hover .battle-country-name {
    color: #ffb84d;
}

.battle-country-flag-small {
    width: 16px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    object-fit: cover;
}

.battle-flag-icon {
    width: 24px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.battle-resource-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.85rem;
}

.battle-resource-item.gold {
    color: #ffb84d;
}

.battle-resource-item.energy {
    color: #4ade80;
}

.battle-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.battle-notification-badge {
    position: relative;
}

.battle-notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Main Battle Layout */
.battle-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1rem;
    padding: 1rem;
    max-width: 1920px;
    margin: 0 auto;
}

/* Left Sidebar */
.battle-sidebar {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.15);
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.battle-sidebar-section {
    margin-bottom: 1.5rem;
}

.battle-sidebar-title {
    color: #ffb84d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 200, 100, 0.2);
}

.battle-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #a0a8b8;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.battle-nav-item:hover {
    background: rgba(255, 200, 100, 0.1);
    color: #fff;
}

.battle-nav-item.active {
    background: rgba(255, 200, 100, 0.2);
    border: 1px solid rgba(255, 200, 100, 0.4);
    color: #ffb84d;
}

.battle-nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.battle-nav-item.active .battle-nav-icon {
    opacity: 1;
}

.battle-units-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 200, 100, 0.15);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.battle-unit-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: #fff;
    font-size: 0.9rem;
}

.battle-unit-stat-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.battle-unit-icon {
    width: 16px;
    height: 16px;
}

.battle-loss-risk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ff6b6b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.battle-loss-risk-icon {
    width: 18px;
    height: 18px;
}

.battle-send-units {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 200, 100, 0.15);
    border-radius: 6px;
    padding: 0.75rem;
}

.battle-send-units-title {
    color: #ffb84d;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.battle-unit-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.battle-unit-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 4px;
    padding: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
}

.battle-unit-input:focus {
    outline: none;
    border-color: #ffb84d;
    box-shadow: 0 0 8px rgba(255, 184, 77, 0.3);
}

.battle-btn-small {
    background: rgba(255, 200, 100, 0.2);
    border: 1px solid rgba(255, 200, 100, 0.3);
    color: #ffb84d;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
}

.battle-btn-small:hover {
    background: rgba(255, 200, 100, 0.3);
    border-color: #ffb84d;
}

.battle-cooldown {
    text-align: center;
    color: #a0a8b8;
    font-size: 0.8rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 200, 100, 0.15);
}

/* Central Content Area */
.battle-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.battle-header-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.battle-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.battle-country-flag {
    width: 48px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.battle-title-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.battle-location {
    text-align: center;
    color: #a0a8b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.battle-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 200, 100, 0.15);
}

.battle-time-left {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.battle-phase {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffb84d;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.battle-phase-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 8px rgba(255, 184, 77, 0.6));
}

/* Battle Momentum Graph */
.battle-momentum-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.battle-momentum-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.battle-momentum-bar {
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.battle-momentum-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.battle-momentum-segment.poland {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.battle-momentum-segment.germany {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.battle-momentum-segment.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.battle-momentum-timeline {
    display: flex;
    justify-content: space-between;
    color: #a0a8b8;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Contribution Graphs */
.battle-contribution-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.battle-contribution-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.battle-contribution-graph {
    height: 120px;
    position: relative;
    margin-bottom: 0.5rem;
}

.battle-graph-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, currentColor 10%, currentColor 90%, transparent 100%);
}

.battle-graph-line.poland {
    color: #3b82f6;
    height: 3px;
}

.battle-graph-line.germany {
    color: #f59e0b;
    height: 3px;
}

.battle-graph-marker {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.battle-graph-marker-icon {
    width: 16px;
    height: 16px;
    color: #ffb84d;
    filter: drop-shadow(0 0 4px rgba(255, 184, 77, 0.6));
}

.battle-graph-marker-label {
    color: #ffb84d;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.battle-graph-timeline {
    display: flex;
    justify-content: space-between;
    color: #a0a8b8;
    font-size: 0.75rem;
}

/* Right Panel */
.battle-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.battle-impact-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.battle-impact-title {
    color: #ffb84d;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.battle-impact-value {
    color: #ffb84d;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 184, 77, 0.5);
}

.battle-impact-label {
    color: #a0a8b8;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.battle-impact-bonus {
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.battle-impact-fatigue {
    color: #f59e0b;
    font-size: 0.9rem;
    font-weight: 600;
}

.battle-losses-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.battle-losses-title {
    color: #ffb84d;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.battle-loss-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 200, 100, 0.1);
}

.battle-loss-item:last-child {
    border-bottom: none;
}

.battle-loss-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
}

.battle-loss-value {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.battle-tech-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.battle-tech-title {
    color: #ffb84d;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.battle-tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: #fff;
    font-size: 0.9rem;
}

.battle-tech-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.battle-deploy-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.battle-deploy-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.battle-deploy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .battle-layout {
        grid-template-columns: 240px 1fr 280px;
    }
}

@media (max-width: 992px) {
    .battle-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .battle-sidebar,
    .battle-right-panel {
        position: static;
    }
}



/* ========== battle-page.css ========== */
/* Battle Page - Enhanced Style Matching Mockup */

.battle-frame {
    min-height: 100vh;
    background: #0a0e1a;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(59, 130, 246, 0.03) 2px, rgba(59, 130, 246, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(59, 130, 246, 0.03) 2px, rgba(59, 130, 246, 0.03) 4px);
    position: relative;
    overflow-x: hidden;
}

.battle-frame::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 184, 77, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-20px); }
}

/* Battle type & role badges */
.battle-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.battle-type-badge.battle-type-territorial {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}

.battle-type-badge.battle-type-rw {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25) 0%, rgba(185, 28, 28, 0.15) 100%);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.5);
}

.battle-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.battle-role-badge.battle-role-attack { border-left: 3px solid #f59e0b; color: #fcd34d; }
.battle-role-badge.battle-role-defense { border-left: 3px solid #3b82f6; color: #93c5fd; }
.battle-role-badge.battle-role-support { border-left: 3px solid #10b981; color: #6ee7b7; }
.battle-role-badge.battle-role-reconquest { border-left: 3px solid #dc2626; color: #fca5a5; }
.battle-role-badge.battle-role-defending-occupied { border-left: 3px solid #a855f7; color: #c4b5fd; }

/* Compact badges in VP row (center with region) */
.battle-region-center .battle-type-badge {
    padding: 4px 10px;
    font-size: 10px;
}

.battle-region-center .battle-role-badge {
    padding: 3px 8px;
    font-size: 10px;
}

/* Top Header Bar */
.battle-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.battle-flag-small {
    width: 24px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.battle-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.battle-top-bar-center {
    display: flex;
    align-items: center;
    gap: 24px;
}

.battle-resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.battle-resource-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.battle-resource-item.gold {
    color: #fbbf24;
}

.battle-resource-item.energy {
    color: #10b981;
}

.battle-resource-icon {
    font-size: 14px;
}

.battle-notification-badge {
    position: relative;
    display: inline-block;
}

.battle-notification-count {
    position: absolute;
    top: -10px;
    right: -14px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    border: 2px solid #1a1f2e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.battle-utility-icon {
    color: #a0a8b8;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-utility-icon:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    transform: scale(1.1);
}

/* Main Battle Layout */
.battle-layout {
    display: flex;
    margin-top: 50px;
    min-height: calc(100vh - 50px);
    position: relative;
    z-index: 1;
}

/* Left Sidebar */
.battle-sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(21, 26, 37, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.battle-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-sidebar-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.battle-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.battle-nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #e0e7ef;
}

.battle-nav-item.active {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.15) 100%);
    border-left: 3px solid #fbbf24;
    color: #fbbf24;
    font-weight: 600;
    box-shadow: inset 0 0 15px rgba(251, 191, 36, 0.1), 0 2px 8px rgba(251, 191, 36, 0.2);
}

.battle-nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.battle-send-units-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.battle-units-display {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-unit-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e0e7ef;
    font-size: 13px;
}

.battle-unit-stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-unit-stat-value {
    color: #fbbf24;
    font-weight: 700;
    font-size: 14px;
}

.battle-loss-risk {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.battle-loss-risk-icon {
    font-size: 16px;
}

.battle-send-units {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-unit-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-unit-input-label {
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 500;
    min-width: 80px;
}

.battle-unit-input-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.battle-btn-small {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 4px;
    color: #e0e7ef;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s;
}

.battle-btn-small:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
    transform: scale(1.05);
}

.battle-unit-input {
    flex: 1;
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    color: #e0e7ef;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.battle-unit-input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    background: rgba(10, 14, 26, 0.95);
}

.battle-cooldown {
    color: #a0a8b8;
    font-size: 12px;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    margin-top: 4px;
}

/* Central Content Area */
.battle-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* Battle kind theme variants – subtle accent shift */
.battle-content.battle-kind-territorial {
    /* Default blue/amber theme already in battle-frame */
}

.battle-content.battle-kind-resistance .battle-header-compact,
.battle-content.battle-kind-resistance .battle-momentum-segment.poland {
    border-color: rgba(220, 38, 38, 0.25);
}
.battle-content.battle-kind-resistance .battle-momentum-segment.germany {
    border-color: rgba(34, 197, 94, 0.25);
}
.battle-content.battle-kind-resistance .battle-vp-display {
    border-color: rgba(220, 38, 38, 0.2);
}

.battle-header-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.85) 0%, rgba(15, 20, 25, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.battle-country-flag {
    width: 40px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.battle-title-text {
    color: #e0e7ef;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-location {
    text-align: center;
    color: #a0a8b8;
    font-size: 14px;
    margin-bottom: 16px;
}

.battle-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.battle-time-left {
    color: #e0e7ef;
    font-size: 14px;
    font-weight: 600;
}

.battle-phase {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 600;
}

.battle-phase-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Battle Momentum Card */
.battle-momentum-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.85) 0%, rgba(15, 20, 25, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-momentum-title {
    color: #e0e7ef;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.battle-momentum-bar-container {
    position: relative;
}

.battle-momentum-bar {
    height: 32px;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.battle-momentum-segment {
    height: 100%;
    transition: flex-basis 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 0;
    box-sizing: border-box;
}

.battle-momentum-segment.poland {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.battle-momentum-segment.germany {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.battle-momentum-segment.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: pulseCritical 2s ease-in-out infinite;
}

@keyframes pulseCritical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.battle-momentum-timeline {
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 11px;
    padding: 0 4px;
}

/* Contribution Graph Card */
.battle-contribution-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.85) 0%, rgba(15, 20, 25, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-contribution-title {
    color: #e0e7ef;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.battle-contribution-graph {
    height: 140px;
    position: relative;
    background: rgba(10, 14, 26, 0.5);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-graph-timeline {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 10px;
}

/* Right Panel */
.battle-right-panel {
    width: 320px;
    background: linear-gradient(180deg, rgba(21, 26, 37, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(59, 130, 246, 0.2);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.battle-impact-card,
.battle-losses-card,
.battle-tech-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.85) 0%, rgba(15, 20, 25, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-impact-title,
.battle-losses-title,
.battle-tech-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.battle-impact-value {
    color: #fbbf24;
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    letter-spacing: 0.02em;
}

.battle-impact-label {
    color: #a0a8b8;
    font-size: 12px;
    margin-bottom: 12px;
}

.battle-impact-bonus,
.battle-impact-fatigue {
    color: #e0e7ef;
    font-size: 13px;
    margin-top: 8px;
}

.battle-loss-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.battle-loss-item:last-child {
    border-bottom: none;
}

.battle-loss-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e7ef;
    font-size: 13px;
}

.battle-loss-value {
    color: #fbbf24;
    font-size: 14px;
    font-weight: 700;
}

.battle-tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e7ef;
    font-size: 13px;
    padding: 10px 0;
}

.battle-tech-icon {
    font-size: 16px;
    color: #a0a8b8;
}

.battle-deploy-btn {
    width: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: auto;
}

.battle-deploy-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.battle-deploy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error/Loading States */
.battle-error-container,
.battle-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #e0e7ef;
}

.battle-error-message {
    font-size: 16px;
    margin-bottom: 20px;
}

.battle-link {
    color: #fbbf24;
    text-decoration: none;
}

.battle-link:hover {
    text-decoration: underline;
}

.battle-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.battle-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e7ef;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.battle-btn-secondary:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}

/* Victory Bar Styles */
.victory-bar-container {
    width: 100%;
}

.victory-bar-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.victory-bar-wrapper {
    position: relative;
    width: 100%;
}

.victory-bar {
    height: 40px;
    background: rgba(10, 14, 26, 0.8);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    position: relative;
    border: 2px solid rgba(0, 242, 255, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.victory-threshold-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffcc00;
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

.victory-threshold-marker::before {
    content: '451 VP';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffcc00;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.victory-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    position: relative;
}

.victory-segment-my {
    background: linear-gradient(90deg, #00f2ff 0%, #0099cc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(0, 242, 255, 0.3);
}

.victory-segment-enemy {
    background: linear-gradient(90deg, #ff4d4d 0%, #cc0000 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 77, 77, 0.3);
}

.victory-segment-label {
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Battle Pulse Chart Styles */
.battle-pulse-chart {
    background: rgba(10, 14, 26, 0.6);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(0, 242, 255, 0.15);
}

.pulse-chart-container {
    width: 100%;
    height: 200px;
    margin-bottom: 12px;
}

.pulse-svg {
    width: 100%;
    height: 100%;
}

.pulse-line {
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px currentColor);
}

.pulse-line-my {
    animation: pulseGlow 2s ease-in-out infinite;
}

.pulse-line-enemy {
    animation: pulseGlow 2s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse-legend {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 242, 255, 0.15);
}

.pulse-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Live Feed Styles - Two Column Layout */
.live-feed-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0;
}

.live-feed-column {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents overflow */
}

.live-feed-column-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-radius: 6px 6px 0 0;
    margin-bottom: 8px;
}

.live-feed-attacker .live-feed-column-header {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.live-feed-defender .live-feed-column-header {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.live-feed-container {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 0 0 8px 8px;
    padding: 12px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    flex: 1;
}

/* 5 rows visible, rest scrollable (max 15 entries) */
.live-feed-container.live-feed-5-rows {
    max-height: 220px; /* Approximately 5 rows */
}

.feed-entry {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
    animation: fadeIn 0.3s ease-in;
}

.feed-entry:last-child {
    border-bottom: none;
}

.feed-entry-time {
    color: #a0a8b8;
    font-weight: 600;
    min-width: 60px;
    font-size: 10px;
}

.feed-entry-message {
    color: #e0e7ef;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.live-feed-empty {
    color: #6b7280;
    font-size: 11px;
    text-align: center;
    padding: 20px;
}

.live-feed-container::-webkit-scrollbar {
    width: 6px;
}

.live-feed-container::-webkit-scrollbar-track {
    background: rgba(10, 14, 26, 0.5);
    border-radius: 3px;
}

.live-feed-container::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.3);
    border-radius: 3px;
}

.live-feed-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 255, 0.5);
}

/* Responsive: Stack columns on small screens */
@media (max-width: 768px) {
    .live-feed-two-columns {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Round Timeline */
.round-timeline-container {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.round-timeline-title {
    font-size: 11px;
    margin-bottom: 12px;
    text-align: center;
    color: #a0a8b8;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.round-timeline {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.round-icon {
    flex: 1;
    height: 48px;
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    transition: all 0.3s;
    border: 2px solid;
    padding: 0 8px;
}

.round-completed {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.5);
}

.round-active {
    background: rgba(255, 204, 0, 0.2);
    border-color: #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
    animation: pulseActive 2s ease-in-out infinite;
}

.round-pending {
    background: rgba(100, 100, 100, 0.1);
    border-color: rgba(100, 100, 100, 0.3);
    opacity: 0.6;
}

@keyframes pulseActive {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.round-number {
    font-size: 14px;
    font-weight: 700;
    color: #e0e7ef;
    min-width: 20px;
}

.round-active-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 6px #ffcc00;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.round-split {
    font-size: 10px;
    color: #a0a8b8;
    font-weight: 600;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 1400px) {
    .battle-sidebar {
        width: 240px;
    }
    
    .battle-right-panel {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    .battle-layout {
        flex-direction: column;
    }
    
    .battle-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }
    
    .battle-right-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(59, 130, 246, 0.2);
    }
}

/* ========== LIVE DEPLOYMENT PANEL ========== */
.active-deployments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

/* Compact deployment panel – smaller, single column */
.battle-deployments-compact {
    max-width: 420px;
}

.battle-deployments-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 10px 12px;
}

.battle-deployments-title {
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
    margin: 0 0 8px 0;
}

.active-deployments-compact {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 6px;
}

.active-deployment-card-compact {
    padding: 10px 12px;
    border-radius: 8px;
}

.active-deployment-card-compact .deployment-progress-bar {
    height: 4px;
    margin-bottom: 8px;
}

.deployment-stats-compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 10px;
}

.deployment-stats-compact .deployment-stat-label {
    font-size: 10px;
}

.deployment-stats-compact .deployment-stat-value {
    font-size: 13px;
}

.deployment-stat-dpm .deployment-stat-value {
    color: #4ade80;
}

.deployment-stat-crit {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 1px;
}

.withdraw-btn-compact {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 11px;
}

.active-deployment-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.deployment-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 14px;
    overflow: hidden;
}

.deployment-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 3px;
    transition: width 1s linear;
}

.deployment-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.deployment-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.deployment-stat-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deployment-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #e0e7ef;
}

.deployment-stat-elapsed {
    color: #fbbf24;
}

.deployment-stat-remaining {
    color: #60a5fa;
}

.deployment-stat-general {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deployment-stat-xp {
    color: #a855f7;
}

.withdraw-btn {
    width: 100%;
    margin-top: 14px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.withdraw-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

.withdraw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== GLOBAL DEPLOYMENTS BAR (under header, 1 row per deployment, full width) ========== */
.global-deployments-bar-spacer {
    flex-shrink: 0;
    min-height: 0;
}

.global-deployments-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(15, 20, 30, 0.98) 0%, rgba(10, 14, 26, 0.98) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.global-deployments-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 16px 8px;
}

.global-deployment-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}

.global-deployment-row:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(34, 197, 94, 0.4);
}

.global-deployment-row-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.08));
    pointer-events: none;
    min-width: 2px;
}

.global-deployment-row-content {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
    flex: 1;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}

.global-deployment-battle-info {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    max-width: 240px;
}

.global-deployment-battle-label {
    font-size: 12px;
    font-weight: 600;
    color: #e0e7ef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-deployment-region {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.global-deployment-stats-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.global-deployment-stat {
    flex-shrink: 0;
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
}

.global-deployment-stat-dpm {
    color: #4ade80;
    font-weight: 600;
}

.global-deployment-stat-xp {
    color: #a855f7;
}

.global-deployment-stat-general {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.global-deployment-general-icon {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain;
    flex-shrink: 0;
}

/* General Abilities section (MY IMPACT) */
.battle-general-abilities {
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding-top: 12px;
}

.battle-general-abilities-title {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
}

.battle-general-ability-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.battle-general-ability-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.battle-general-ability-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.battle-general-ability-name {
    font-weight: 600;
    font-size: 12px;
}

.battle-general-ability-skill {
    font-size: 11px;
    color: #94a3b8;
}

.battle-general-ability-status {
    font-size: 10px;
}

.battle-general-ability-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 10px;
}

.global-deployment-withdraw-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.withdraw-btn-inline {
    flex: 0 0 auto;
    width: auto;
    min-width: fit-content;
    margin: 0;
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.withdraw-btn-inline:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
}

.withdraw-btn-inline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== New BattlePage Layout ===== */
#page-wrapper { position: relative; overflow: hidden; padding: 12px; color: #d1d5db; }
#top-bar, #momentum-bar, #momentum-labels, #rounds-strip { display: none; }

#main-grid { display: grid; gap: 12px; }
#left-col, #right-col, #battlefield, #my-impact-bar, #battle-stats, #live-feed { border-radius: 8px; }
#battlefield {
    position: relative;
    height: 280px;
    background-image:
        linear-gradient(90deg, rgba(28, 10, 9, 0.45) 0%, rgba(42, 15, 13, 0.35) 44%, rgba(13, 26, 39, 0.35) 56%, rgba(8, 14, 23, 0.45) 100%),
        url('/images/Battle_background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.pin-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 30;
    display: flex;
    gap: 6px;
    padding: 5px;
    border-radius: 8px;
    background: rgba(10, 14, 23, 0.75);
    border: 1px solid rgba(255,255,255,0.14);
    width: fit-content;
}
.pin-mode-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #ced7e4;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pin-mode-btn:hover {
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}
.pin-mode-btn.active {
    background: rgba(43, 120, 194, 0.35);
    border-color: #2b78c2;
    box-shadow: 0 0 0 1px rgba(43, 120, 194, 0.3) inset;
}
#bf-divider { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0.15) 80%, transparent); pointer-events: none; }
#bf-divider::after { content: 'VS'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #151515; border: 1px solid rgba(255,255,255,0.15); padding: 2px 5px; font-size: 8px; letter-spacing: 2px; color: #666; border-radius: 2px; }
#right-col { display: flex; flex-direction: column; min-height: 0; }
#my-impact-bar {
    margin-bottom: 8px;
    background: rgba(20, 25, 34, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.mi-dmg { display: flex; flex-direction: column; min-width: 96px; }
.mi-val { font-size: 24px; line-height: 1; font-weight: 700; color: #f0b429; }
.mi-label { font-size: 10px; color: #9aa3b2; letter-spacing: 1px; margin-top: 2px; }
.mi-share { font-size: 10px; color: #6aa7db; margin-top: 2px; }
.mi-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,0.12); }
.mi-btns { flex: 1; display: flex; gap: 8px; }
.mi-btn {
    flex: 1;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: #c8d0dc;
    padding: 7px 8px;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 600;
}
.mi-btn:hover { border-color: rgba(255,255,255,0.35); color: #fff; }
.mi-mini-slot {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: #dbeafe;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
}
.mi-mini-slot:hover:not(:disabled) { border-color: rgba(255,255,255,0.35); }
.mi-mini-slot:disabled { opacity: 0.5; cursor: not-allowed; }
.mi-mini-slot img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}
.mi-mini-count {
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}
.mi-btn.deploy-btn {
    background: linear-gradient(180deg, #2255a3 0%, #1b4481 100%);
    border-color: #2b78c2;
    color: #d2e8ff;
}
.mi-btn.deploy-btn:disabled { opacity: 0.6; cursor: not-allowed; }

#battle-stats { display: grid; gap: 8px; background: #10141c; border: 1px solid rgba(255,255,255,0.08); padding: 10px; }
.bs-header { font-size: 10px; color: #9098a6; letter-spacing: 2px; font-weight: 700; margin-bottom: 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.bs-header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }

/* Modal: statystyki zakończonej rundy */
.rsm-root {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}
.rsm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    pointer-events: auto;
    backdrop-filter: blur(4px);
}
.rsm-panel {
    position: relative;
    pointer-events: auto;
    width: min(440px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    background: linear-gradient(180deg, #141b28 0%, #0d121c 100%);
    border: 1px solid rgba(110, 231, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    padding: 16px 18px 18px;
}
.rsm-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.rsm-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #e8edf5;
    line-height: 1.3;
}
.rsm-x {
    flex-shrink: 0;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #c5cdd8;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.rsm-x:hover { background: rgba(239, 68, 68, 0.25); color: #fff; }
.rsm-sub {
    margin: 0 0 12px;
    font-size: 11px;
    color: #8a93a3;
    line-height: 1.4;
}
.rsm-loading {
    padding: 24px 8px;
    text-align: center;
    font-size: 13px;
    color: #9098a6;
}
.rsm-bs-grid { margin-bottom: 8px; }
.rsm-top-toolbar { margin-top: 4px; }
.bs-scope-switch { display: inline-flex; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; overflow: hidden; }
.bs-scope-btn {
    border: 0;
    background: rgba(255,255,255,0.03);
    color: #9aa3b2;
    font-size: 10px;
    padding: 4px 8px;
    letter-spacing: 0.6px;
}
.bs-scope-btn.active { background: rgba(43,120,194,0.35); color: #d7e7f8; }
.bs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.bs-card { background: #141922; border: 1px solid rgba(255,255,255,0.08); border-radius: 5px; padding: 8px 10px; }
.bs-nation { font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.atk-col { color: #ff8070; }
.def-col { color: #70b8ff; }
.bs-stat { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.bs-stat-label { color: #9aa3b2; }
.bs-stat-val { font-weight: 700; }
.atk-val { color: #ff8070; }
.def-val { color: #70b8ff; }

.top-dmg-toolbar { margin-top: 8px; }
.top-dmg-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #9098a6;
    margin-bottom: 5px;
}
.top-players-header { display: flex; gap: 0; border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; }
.tp-tab {
    flex: 1;
    padding: 6px;
    text-align: center;
    font-size: 9px;
    letter-spacing: 1px;
    color: #9098a6;
    background: transparent;
    border: 0;
}
.tp-tab.tp-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    min-height: 28px;
}
.tp-tab-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
}
.tp-globe-icon {
    font-size: 16px;
    line-height: 1;
}
.tp-tab-globe .tp-globe-icon { opacity: 0.85; }
.tp-tab.active.atk { background: rgba(192,57,43,0.2); color: #ff8070; border-bottom: 2px solid #e74c3c; }
.tp-tab.active.def { background: rgba(26,79,122,0.2); color: #70b8ff; border-bottom: 2px solid #2980b9; }
.tp-tab.active.world {
    background: rgba(74, 222, 128, 0.12);
    color: #86efac;
    border-bottom: 2px solid #4ade80;
}
.top-countries-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 7px;
}
.top-countries-col-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.top-players-list--nested { margin-top: 0; }
.tp-row-country .tp-country-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}
.top-players-list { display: flex; flex-direction: column; gap: 4px; margin-top: 7px; }
.tp-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 3px; background: rgba(255,255,255,0.04); }
.tp-row.tp-row-top1 {
    background: linear-gradient(90deg, rgba(240, 180, 41, 0.16), rgba(255,255,255,0.05));
    box-shadow: inset 0 0 0 1px rgba(240, 180, 41, 0.45);
}
.tp-rank { font-size: 9px; color: #8a93a3; min-width: 16px; }
.tp-rank.gold-rank { color: #ffe08a; font-weight: 800; text-shadow: 0 0 8px rgba(240, 180, 41, 0.35); }
.tp-avatar-sm { width: 18px; height: 18px; border-radius: 0; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.tp-avatar-sm-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.tp-row.atk-row .tp-avatar-sm { background: rgba(231,76,60,0.2); color: #ff8070; }
.tp-row.def-row .tp-avatar-sm { background: rgba(41,128,185,0.2); color: #70b8ff; }
.tp-pname { flex: 1; font-size: 10px; }
.tp-row.atk-row .tp-pname { color: #ffb0a8; }
.tp-row.def-row .tp-pname { color: #a8d4ff; }
.tp-pdmg { font-size: 10px; color: #f0b429; font-weight: 700; }

#live-feed {
    margin-top: 8px;
    background: #0f131b;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 10px 4px;
    flex: 1;
    min-height: 220px;
    max-height: 360px;
    overflow-y: auto;
}
.lf-header {
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 9px;
    color: #9098a6;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lf-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: blink 1.5s ease-in-out infinite; }
.lf-entry { font-size: 10px; display: flex; align-items: baseline; gap: 6px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.lf-time { color: #6b7280; min-width: 62px; font-size: 9px; }
.lf-text { color: #b7c0cf; flex: 1; }
.lf-player { font-weight: 700; margin-right: 4px; }
.lf-player.atk { color: #ff8070; }
.lf-player.def { color: #70b8ff; }
.lf-action { color: #b7c0cf; }

.pin { position: absolute; transform: translate(-50%, -100%); cursor: pointer; transition: transform 0.15s; z-index: 5; }
.pin:hover, .pin:focus { transform: translate(-50%, -100%) scale(1.08); z-index: 20; }
.pin-card { background: rgba(26,26,26,0.92); border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); min-width: 72px; position: relative; }
.pin-card.compact { min-width: 84px; }
.pin.atk .pin-card { border-color: rgba(231,76,60,0.4); background: rgba(28,9,9,0.92); }
.pin.def .pin-card { border-color: rgba(41,128,185,0.4); background: rgba(8,13,30,0.92); }
.pin.elite .pin-card { border-width: 1.5px; border-color: rgba(240,180,41,0.55); }
.pin-head { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.pin-avatar { width: 22px; height: 22px; border-radius: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: bold; flex-shrink: 0; background: rgba(255,255,255,0.08); overflow: hidden; }
.pin-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.pin-name { font-size: 9px; font-weight: bold; white-space: nowrap; overflow: hidden; max-width: 58px; text-overflow: ellipsis; }
.pin-stats { display: grid; grid-template-columns: 1fr 1fr; }
.pin-stat { text-align: center; padding: 3px 6px; }
.pin-stat-val { font-size: 10px; font-weight: bold; line-height: 1; }
.pin-stat-label { font-size: 7px; color: #666; letter-spacing: 0.5px; }
.pin-details-popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: 110px;
    background: rgba(12, 16, 24, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    z-index: 35;
}
.pin-tail { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.pin.atk .pin-tail { border-top: 7px solid rgba(231,76,60,0.6); }
.pin.def .pin-tail { border-top: 7px solid rgba(41,128,185,0.6); }
.star-badge { position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; background: #f0b429; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 7px; color: #412402; font-weight: bold; border: 1px solid #0d0d0d; }

#bottom-bar { display: none; }
#player-sheet { position: absolute; bottom: 0; left: 0; right: 0; background: #141414; border-top: 2px solid rgba(255,255,255,0.15); border-radius: 12px 12px 0 0; padding-bottom: 80px; z-index: 200; transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1); display: none; }
#player-sheet.open { transform: translateY(0); }
.ps-handle { width: 36px; height: 3px; background: #333; border-radius: 2px; margin: 10px auto 12px; }
.ps-close { position: absolute; right: 8px; top: 8px; background: transparent; border: 0; color: #d1d5db; }
.ps-header { display: flex; gap: 8px; align-items: center; padding: 0 12px 8px; }
.ps-avatar { width: 32px; height: 32px; border-radius: 0; background: #1f2937; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.ps-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.ps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px; }
.ps-stat { text-align: center; }
.ps-stat-label { font-size: 10px; color: #9ca3af; }
.ps-stat-val.gold { color: #fbbf24; }

.dmg-pop { position: absolute; font-size: 11px; font-weight: bold; font-family: 'Courier New', monospace; pointer-events: none; transform: translateX(-50%); animation: float-dmg 1.1s ease-out forwards; z-index: 250; white-space: nowrap; }
.dmg-pop.attacker { color: #ff8070; }
.dmg-pop.defender { color: #70b8ff; }
@keyframes float-dmg { 0% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px); } }
.explosion { position: absolute; border-radius: 50%; pointer-events: none; z-index: 240; transform: translate(-50%, -50%); animation: expl 0.45s ease-out forwards; }
@keyframes expl { 0% { width: 4px; height: 4px; opacity: 1; background: #fcd34d; } 60% { width: 22px; height: 22px; opacity: 0.7; background: #f0b429; } 100% { width: 36px; height: 36px; opacity: 0; background: #c0392b; } }

@media (min-width: 768px) {
    #main-grid { grid-template-columns: 1fr 380px; }
    #bottom-bar { display: none; }
    #my-impact-bar { display: flex; }
}

@media (max-width: 767px) {
    #page-wrapper {
        overflow-x: clip;
        padding: 8px;
        padding-bottom: calc(var(--bottomnav-h) + var(--safe-bot) + 80px);
    }

    #main-grid { display: flex; flex-direction: column; gap: 8px; }
    #left-col { display: contents; }
    #right-col { display: contents; }

    #my-impact-bar {
        display: none !important;
    }

    #battlefield {
        order: 2;
        height: 200px;
        border-radius: 8px;
    }

    .battle-mobile-panel-tabs {
        order: 4;
        display: flex;
        gap: 0;
        background: #10141c;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }

    .battle-mobile-panel-tab {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 0;
        background: transparent;
        color: #9098a6;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 1px;
        padding: 10px 4px;
        cursor: pointer;
        border-bottom: 2px solid transparent;
    }

    .battle-mobile-panel-tab.active {
        color: #d7e7f8;
        background: rgba(43, 120, 194, 0.12);
        border-bottom-color: #3b82f6;
    }

    .battle-mobile-panel-tab-icon {
        font-size: 11px;
        line-height: 1;
    }

    .battle-mobile-panel-tab-icon--live {
        color: #4ade80;
        font-size: 8px;
    }

    #battle-stats {
        order: 5;
        border-radius: 0 0 8px 8px;
        margin-top: -1px;
    }

    #live-feed {
        order: 6;
        margin-top: 0;
        min-height: 180px;
        max-height: 280px;
        border-radius: 8px;
    }

    .battle-mobile-tab-stats .battle-panel-topdmg-core,
    .battle-mobile-tab-stats #live-feed {
        display: none !important;
    }

    .battle-mobile-tab-topdmg .battle-panel-stats-core,
    .battle-mobile-tab-topdmg #live-feed {
        display: none !important;
    }

    .battle-mobile-tab-topdmg #battle-stats {
        border-radius: 0 0 8px 8px;
    }

    .battle-mobile-tab-feed .battle-panel-stats-core,
    .battle-mobile-tab-feed .battle-panel-topdmg-core {
        display: none !important;
    }

    .battle-mobile-tab-feed #battle-stats {
        display: none !important;
    }

    .battle-mobile-tab-feed #live-feed {
        display: block !important;
        border-radius: 0 0 8px 8px;
        margin-top: -1px;
    }

    .battle-mobile-tab-feed .battle-mobile-panel-tabs {
        border-radius: 8px 8px 0 0;
    }

    #bottom-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(var(--bottomnav-h) + var(--safe-bot));
        z-index: 35;
        background: linear-gradient(180deg, #141b28 0%, #0d121c 100%);
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        margin-top: 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    }

    .bb-stats {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        flex-shrink: 0;
    }

    .bb-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }

    .bb-weapon-slot {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.06);
        color: #dbeafe;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        padding: 3px;
        flex-shrink: 0;
    }

    .bb-weapon-slot:hover:not(:disabled) {
        border-color: rgba(255, 255, 255, 0.35);
    }

    .bb-weapon-slot:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    .bb-weapon-slot img {
        width: 22px;
        height: 22px;
        object-fit: contain;
    }

    .bb-weapon-count {
        font-size: 9px;
        line-height: 1;
        font-weight: 700;
    }

    .bb-stat {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.5px;
        color: #9098a6;
        white-space: nowrap;
    }

    .bb-stat strong {
        color: #f0b429;
        font-size: 13px;
        font-weight: 800;
    }

    .bb-deploy-btn {
        width: auto !important;
        flex: 1;
        min-width: 88px;
        max-width: 120px;
        padding: 10px 12px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .bb-deploy-chevron {
        font-size: 16px;
        line-height: 1;
        font-weight: 400;
    }

    #player-sheet {
        display: block;
        padding-bottom: calc(var(--bottomnav-h) + var(--safe-bot) + 60px);
    }

    #live-feed.battle-panel-feed-core {
        padding-bottom: 8px;
    }

    .pin-card { min-width: 60px; }

    /* Compact header */
    .battle-header-compact {
        order: 1;
        padding: 10px 10px 8px;
        gap: 10px;
        margin-bottom: 0;
        overflow: visible;
    }

    .battle-header-row-1 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        min-height: auto;
        overflow: visible;
    }

    .battle-header-left,
    .battle-header-right {
        min-width: 0;
        flex: 1 1 0;
        max-width: 48%;
    }

    .battle-header-left {
        justify-content: flex-start;
    }

    .battle-header-right {
        justify-content: flex-end;
    }

    .battle-header-country-link {
        gap: 5px;
        min-width: 0;
        max-width: 100%;
    }

    .battle-header-country-link .country-link-flag {
        width: 22px;
        height: 15px;
        flex-shrink: 0;
    }

    .battle-header-country-link .country-link-name {
        font-size: 11px;
        font-weight: 700;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .battle-momentum-mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .battle-momentum-bar-mobile {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .battle-momentum-mobile-pct {
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
        min-width: 38px;
        text-align: center;
        flex-shrink: 0;
    }

    .battle-momentum-mobile-pct-atk {
        color: #60a5fa;
        text-align: left;
    }

    .battle-momentum-mobile-pct-def {
        color: #fbbf24;
        text-align: right;
    }

    .battle-momentum-mobile .battle-momentum-bar-compact {
        position: relative;
        height: 28px;
        min-width: 0;
        width: 100%;
        border-radius: 999px;
        border: 1px solid rgba(96, 165, 250, 0.45);
        box-shadow:
            0 0 16px rgba(59, 130, 246, 0.22),
            inset 0 2px 6px rgba(0, 0, 0, 0.45);
        overflow: hidden;
        background: rgba(8, 12, 20, 0.95);
    }

    .battle-momentum-mobile .battle-momentum-segment {
        min-width: 2px;
    }

    .battle-header-mobile-status {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .battle-location-row {
        text-align: center;
        color: #a0a8b8;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.2;
    }

    .battle-status-bar {
        display: grid;
        grid-template-columns: minmax(52px, auto) 1fr minmax(52px, auto);
        align-items: center;
        gap: 8px;
    }

    .battle-vp-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
    }

    .battle-vp-pill-atk {
        justify-self: start;
    }

    .battle-vp-pill-def {
        justify-self: end;
    }

    .battle-vp-pill-label {
        color: #9098a6;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    .battle-vp-pill-value {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 28px;
        height: 28px;
        padding: 0 8px;
        border-radius: 999px;
        background: rgba(240, 180, 41, 0.14);
        border: 1px solid rgba(240, 180, 41, 0.45);
        color: #fbbf24;
        font-size: 14px;
        font-weight: 800;
        line-height: 1;
        box-shadow: 0 0 10px rgba(240, 180, 41, 0.2);
    }

    .battle-timer-pill {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
        min-width: 0;
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(10, 14, 23, 0.9);
        border: 1px solid rgba(59, 130, 246, 0.35);
        color: #94a3b8;
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
    }

    .battle-timer-pill-countdown {
        color: #60a5fa;
        font-weight: 700;
        font-size: 11px;
        letter-spacing: 0.03em;
    }

    .battle-header-row-3.battle-status-strip {
        overflow: visible;
        padding: 0;
        margin: 0;
        gap: 6px;
        display: flex;
        flex-direction: column;
    }

    .battle-status-strip-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0 2px;
    }

    .battle-status-strip-title {
        color: #8ea0b8;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.14em;
    }

    .battle-status-strip-hint {
        color: #5f6d82;
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 0.06em;
    }

    #battle-round-status-bar.round-vp-container,
    .round-vp-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 8px;
        padding: 8px;
        width: 100%;
        background: rgba(8, 12, 20, 0.72);
        border: 1px solid rgba(59, 130, 246, 0.28);
        border-radius: 10px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .round-vp-container::-webkit-scrollbar {
        display: none;
    }

    .round-vp-rectangle {
        flex: 0 0 64px !important;
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        height: 72px;
        min-height: 72px;
        padding: 6px 4px;
        gap: 4px;
        overflow: hidden;
        flex-shrink: 0;
        box-sizing: border-box;
        scroll-snap-align: center;
        border-radius: 8px;
    }

    .round-vp-header {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 3px;
        width: 100%;
        min-height: 32px;
    }

    .round-vp-number {
        font-size: 11px;
        font-weight: 800;
        line-height: 1.1;
    }

    .round-vp-bonus-chip-label {
        display: none;
    }

    .round-vp-bonus-chip {
        display: none;
    }

    .round-vp-bonus-icon--mobile {
        width: 18px;
        height: 18px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .round-vp-split {
        font-size: 10px;
        width: 100%;
        white-space: nowrap;
        font-weight: 700;
    }

    .round-active-indicator-small {
        position: absolute;
        top: 5px;
        right: 5px;
    }

    .round-vp-rectangle.round-active {
        border-color: #ffcc00;
        box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.35), 0 0 14px rgba(255, 204, 0, 0.28);
        transform: none;
    }

    .round-vp-rectangle.round-selected {
        transform: none;
    }

    /* Stats cards */
    .bs-grid {
        gap: 6px;
    }

    .bs-card {
        padding: 6px 8px;
        min-width: 0;
    }

    .bs-nation {
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bs-stat {
        font-size: 10px;
    }

    .top-countries-split {
        grid-template-columns: 1fr;
    }
}


/* ========== battle-enhanced.css ========== */
/* Enhanced Battle Page CSS - Matching Mockup Design */

/* Global Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* App Main Container - Applied to all pages */
.app-main-container {
    min-height: 100vh;
    background: #0a0e1a;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(59, 130, 246, 0.03) 2px, rgba(59, 130, 246, 0.03) 4px), repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(59, 130, 246, 0.03) 2px, rgba(59, 130, 246, 0.03) 4px), url("/images/battle-background.webp");
    background-size: auto, auto, cover;
    background-position: 0 0, 0 0, center center;
    background-repeat: repeat, repeat, no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.app-bg-overlay {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* =========================================
   NEW LAYOUT LOGIC (DRAWER / OVERLAY)
   ========================================= */

/* 1. Sidebar Wrapper - Container that slides in */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px; /* Fixed width of the open menu */
    background: #0f1419;
    z-index: 20000; /* Highest z-index to be above TopBar (10000) */
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.7);
    border-right: 1px solid rgba(59, 130, 246, 0.3);
    /* Animation logic */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .sidebar-wrapper.open {
        transform: translateX(0); /* Visible */
    }

/* 2. Sidebar Overlay - Dark background */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 19000; /* Below wrapper, above content */
    opacity: 0;
    pointer-events: none; /* Clicks pass through when hidden */
    transition: opacity 0.3s ease;
}

    .sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto; /* Blocks clicks on game */
    }

/* 3. Main Content Area - Always full width */
.main-content-area {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 50px; /* Space for Top Bar */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* =========================================
   TOP NAVIGATION BAR
   ========================================= */
.battle-top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important; /* CHANGED: Always 0, spans full width */
    right: 0 !important;
    height: 50px;
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 10000 !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.battle-top-bar-left,
.battle-top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.battle-top-bar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
    max-width: calc(100vw - 600px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .battle-top-bar-center::-webkit-scrollbar {
        display: none;
    }

/* Hamburger Menu Button */
.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    padding: 0;
    width: 40px;
    height: 32px;
    margin-right: 12px;
    cursor: pointer;
    color: #e0e6ef;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .sidebar-toggle-btn:hover {
        background: rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 0.4);
        color: #60a5fa;
    }

.hamburger-icon {
    display: block;
    line-height: 1;
}

/* =========================================
   SIDEBAR CONTENT (Inside Wrapper)
   ========================================= */
.battle-sidebar {
    width: 100%; /* Fills the wrapper */
    height: 100%;
    /* Use glassmorphism gradient matching the theme */
    background: linear-gradient(180deg, rgba(21, 26, 37, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    /* Remove fixed positioning and borders as wrapper handles them */
    border: none;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.battle-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.battle-sidebar-title {
    color: #60a5fa; /* Adjusted color for better visibility */
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    user-select: none;
}

.battle-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
    text-decoration: none !important;
}

    .battle-nav-item:hover {
        background: rgba(59, 130, 246, 0.15);
        color: #e0e7ef;
        transform: translateX(4px);
        border-color: rgba(59, 130, 246, 0.3);
    }

    .battle-nav-item.active {
        background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.12) 100%);
        border-left: 4px solid #fbbf24;
        color: #fbbf24;
        font-weight: 700;
        box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.15), 0 4px 12px rgba(251, 191, 36, 0.25);
    }

.battle-nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.battle-nav-text {
    display: block !important; /* Ensure text is always visible in the drawer */
    opacity: 1 !important;
}

/* =========================================
   GENERAL UI ELEMENTS (Flags, Resources, etc.)
   ========================================= */

.battle-flag-small {
    width: 28px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

    .battle-flag-small.poland {
        background: linear-gradient(to bottom, #dc143c 0%, #dc143c 50%, #fff 50%, #fff 100%);
    }

.battle-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.battle-resource-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
    cursor: default;
    white-space: nowrap;
    flex-shrink: 0;
}

    .battle-resource-item.gold {
        color: #fbbf24;
        border: 1px solid rgba(251, 191, 36, 0.2);
    }

    .battle-resource-item.energy {
        color: #10b981;
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

.battle-resource-icon {
    font-size: 14px;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.battle-notification-badge {
    position: relative;
    display: inline-block;
}

.battle-notification-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    border: 2px solid #1a1f2e;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.battle-utility-icon {
    color: #a0a8b8;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .battle-utility-icon:hover {
        color: #fbbf24;
        background: rgba(251, 191, 36, 0.15);
        transform: scale(1.15);
    }

/* Send Units Section */
.battle-send-units-title {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.battle-units-display {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.60) 0%, rgba(10, 14, 26, 0.60) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.battle-unit-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e0e7ef;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

    .battle-unit-stat:last-child {
        border-bottom: none;
    }

.battle-unit-stat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.battle-unit-stat-value {
    color: #fbbf24;
    font-weight: 800;
    font-size: 16px;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.battle-loss-risk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: riskPulse 3s ease-in-out infinite;
}

@keyframes riskPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.battle-loss-risk-icon {
    font-size: 18px;
    animation: warningBounce 2s ease-in-out infinite;
}

@keyframes warningBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.battle-send-units {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.60) 0%, rgba(10, 14, 26, 0.60) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.battle-unit-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.battle-unit-input-label {
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 600;
    min-width: 85px;
}

.battle-unit-input-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.battle-btn-small {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    color: #e0e7ef;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

    .battle-btn-small:hover {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
        border-color: #fbbf24;
        color: #fbbf24;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    }

    .battle-btn-small:active {
        transform: scale(0.95);
    }

.battle-unit-input {
    flex: 1;
    background: rgba(10, 14, 26, 0.70);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    color: #e0e7ef;
    padding: 10px 14px;
    font-size: 14px;
    text-align: center;
    font-weight: 700;
    transition: all 0.2s;
}

    .battle-unit-input:focus {
        outline: none;
        border-color: #fbbf24;
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
        background: rgba(10, 14, 26, 1);
    }

    .battle-unit-input::-webkit-inner-spin-button,
    .battle-unit-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.battle-cooldown {
    color: #a0a8b8;
    font-size: 12px;
    text-align: center;
    padding-top: 14px;
    border-top: 1px solid rgba(59, 130, 246, 0.25);
    margin-top: 8px;
    font-weight: 600;
}

/* Central Content Area */
.battle-content {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced from 16px */
    width: 100%;
}

/* =========================================
   COMPACT HEADER (3-Row Layout)
   ========================================= */
.battle-header-compact {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.70) 0%, rgba(15, 20, 25, 0.70) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible; /* Ensure all rows are visible */
    position: relative; /* Ensure proper positioning context */
    z-index: 1; /* Keep above other elements */
}

/* Row 1: Flags + Names + Dominance Bar */
.battle-header-row-1 {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    flex-shrink: 0;
    overflow: hidden;
}

.battle-header-unified {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    margin-bottom: 6px;
}

.battle-header-left,
.battle-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 120px;
}

.battle-flag-compact {
    width: 24px; /* Reduced from 36px */
    height: 18px; /* Reduced from 26px */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.battle-country-name-compact {
    color: #e0e7ef;
    font-size: 13px; /* Reduced from 28px */
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.battle-momentum-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.battle-momentum-pcts {
    display: none;
}

.battle-momentum-bar-compact {
    flex: 1;
    height: 24px; /* Reduced from 36px */
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.8) 0%, rgba(15, 20, 30, 0.8) 100%);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative;
}

.battle-momentum-percentage-compact {
    color: #ffffff;
    font-size: 10px; /* Reduced from 12px */
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 5;
    position: relative;
    margin: 0 4px;
}

/* Row 2: Left (VP + timer 1) | Center (region) | Right (timer 2 + VP) */
.battle-header-row-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 4px 0;
}

.battle-header-row-2-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.battle-header-row-2-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.battle-vp-display {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.battle-vp-display.battle-vp-attacker {
    justify-content: flex-start;
}

.battle-vp-display.battle-vp-defender {
    justify-content: flex-end;
}

.battle-vp-label {
    color: #a0a8b8;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-vp-value {
    color: #fbbf24;
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.battle-region-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.battle-region-center .battle-type-badge,
.battle-region-center .battle-role-badge {
    flex-shrink: 0;
}

.battle-location-compact {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Battle timer items (inline in row 2) */
.battle-timer-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    background: rgba(15, 20, 25, 0.5);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
    white-space: nowrap;
}

.battle-timer-item strong {
    color: #60a5fa;
    font-weight: 600;
}

/* Row 3: Round VP Rectangles */
.battle-header-row-3 {
    display: flex;
    align-items: center;
    min-height: 24px;
    height: auto;
    padding: 2px 0;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.round-vp-container {
    display: flex;
    gap: 4px;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.round-vp-rectangle {
    flex: 1;
    min-width: 0;
    height: auto;
    min-height: 42px;
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.round-vp-rectangle:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.round-vp-rectangle.round-completed {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.3);
    cursor: pointer;
}

.round-vp-rectangle.round-completed:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}

.round-vp-rectangle.round-selected {
    background: rgba(240, 180, 41, 0.18);
    border-color: rgba(240, 180, 41, 0.75);
    box-shadow: 0 0 10px rgba(240, 180, 41, 0.35);
}

.round-vp-rectangle.round-active {
    background: rgba(255, 204, 0, 0.2);
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
    cursor: default;
}

.round-vp-rectangle.round-pending {
    background: rgba(100, 100, 100, 0.1);
    border-color: rgba(100, 100, 100, 0.2);
    opacity: 0.5;
    cursor: default;
}

.round-vp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}

.round-vp-number {
    color: #e0e7ef;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.round-vp-bonus-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    padding: 2px 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 200, 100, 0.35);
    background: rgba(0, 0, 0, 0.28);
}

.round-vp-bonus-chip-label {
    font-size: 8px;
    line-height: 1;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
}

.round-vp-bonus-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
}

.round-active-indicator-small {
    width: 4px;
    height: 4px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 4px #ffcc00;
    animation: blink 1s ease-in-out infinite;
}

.round-vp-split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.round-vp-attacker {
    color: #3b82f6;
}

.round-vp-separator {
    color: #6b7280;
    margin: 0 2px;
}

.round-vp-defender {
    color: #f59e0b;
}

/* Round Modal */
.round-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.round-modal-content {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.round-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.round-modal-title {
    color: #e0e7ef;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0;
}

.round-modal-close {
    background: transparent;
    border: none;
    color: #a0a8b8;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.round-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.round-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.round-modal-vp-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.round-modal-vp-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.round-modal-vp-country {
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.round-modal-vp-value {
    color: #fbbf24;
    font-size: 32px;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.round-modal-vp-separator {
    color: #6b7280;
    font-size: 18px;
    font-weight: 700;
}

.round-modal-info {
    color: #a0a8b8;
    font-size: 12px;
    line-height: 1.6;
}

.round-modal-info p {
    margin: 0 0 8px 0;
}

.round-modal-info p:last-child {
    margin-bottom: 0;
}

.round-modal-content-wide {
    max-width: 560px;
}

.round-modal-loading {
    color: #a0a8b8;
    text-align: center;
    padding: 24px;
    margin: 0;
}

/* Round report sections */
.round-report-section {
    padding: 12px 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.round-report-section:last-child {
    border-bottom: none;
}

.round-report-section-title {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px 0;
}

.round-report-damage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: rgba(10, 14, 26, 0.5);
    border-radius: 10px;
}

.round-report-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.round-report-country {
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 600;
}

.round-report-dmg {
    font-size: 20px;
    font-weight: 800;
}

.round-report-attacker .round-report-dmg { color: #60a5fa; }
.round-report-defender .round-report-dmg { color: #f59e0b; }

.round-report-pct {
    font-size: 12px;
    color: #94a3b8;
}

.round-report-vs {
    color: #6b7280;
    font-weight: 700;
}

.round-report-vp-row {
    margin-top: 8px;
    text-align: center;
    color: #a0a8b8;
    font-size: 12px;
}

.round-report-bonus {
    margin: 0;
    padding: 8px 12px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-weight: 700;
}

.round-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.round-report-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(10, 14, 26, 0.4);
    border-radius: 8px;
    margin-bottom: 6px;
}

.round-report-list-item:last-child {
    margin-bottom: 0;
}

.round-report-rank {
    color: #6b7280;
    font-weight: 800;
    min-width: 24px;
}

.round-report-name {
    flex: 1;
    color: #e0e7ef;
    font-weight: 600;
}

.round-report-value.attacker { color: #60a5fa; }
.round-report-value.defender { color: #f59e0b; }
.round-report-value {
    font-weight: 800;
}

.round-report-empty {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

/* =========================================
   SEGMENTED ROUND TIMELINE
   ========================================= */
.round-timeline-segmented {
    display: flex;
    gap: 2px;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.round-segment {
    flex: 1;
    min-width: 0;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: rgba(15, 20, 25, 0.6);
    color: #a0a8b8;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    padding: 0 4px;
}

.round-segment:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #e0e7ef;
}

.round-segment.round-completed {
    background: rgba(0, 242, 255, 0.15);
    color: #00f2ff;
    border: 1px solid rgba(0, 242, 255, 0.4);
}

.round-segment.round-active {
    background: rgba(255, 204, 0, 0.25);
    color: #ffcc00;
    border: 1px solid #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.round-segment.round-pending {
    background: rgba(100, 100, 100, 0.1);
    color: #6b7280;
    opacity: 0.6;
}

.round-segment-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.round-active-dot {
    width: 4px;
    height: 4px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 4px #ffcc00;
    animation: blink 1s ease-in-out infinite;
}

/* =========================================
   BATTLE CONTENT GRID (2x2 Layout + Deploy Overlay Option C)
   ========================================= */
.battle-content-grid-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
}

.battle-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(min-content, 1fr) minmax(min-content, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    min-height: 400px;
}

.battle-grid-item {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Collapsed: item shrinks to header row so the row height shrinks and content below is visible */
.battle-grid-item.battle-grid-item-collapsed {
    align-self: start;
    min-height: 0;
}

.battle-grid-item.battle-grid-item-collapsed .battle-contribution-card {
    height: auto;
}

/* 1. My Impact (top-left) */
.battle-grid-impact {
    grid-row: 1;
    grid-column: 1;
}

/* 2. Battle Statistics (top-right) */
.battle-grid-statistics {
    grid-row: 1;
    grid-column: 2;
}

/* 3. Live Feed (bottom-left) */
.battle-grid-livefeed {
    grid-row: 2;
    grid-column: 1;
}

/* 4. Battle Pulse (bottom-right) */
.battle-grid-pulse {
    grid-row: 2;
    grid-column: 2;
}

/* My Impact panel - stats & actions */
.battle-impact-stats {
    padding: 12px 0;
    text-align: center;
}

.battle-impact-damage-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
}

.battle-impact-damage-label {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.battle-impact-percent {
    font-size: 11px;
    color: #60a5fa;
    margin-top: 4px;
}

.battle-impact-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.battle-impact-action-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
}

.battle-impact-action-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
}

.battle-impact-action-btn.disabled,
.battle-impact-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #6b7280;
    background: rgba(107, 114, 128, 0.2);
}

/* Deploy button in My Impact panel */
.battle-impact-deploy {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.battle-deploy-btn-impact {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.battle-deploy-btn-impact:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.battle-deploy-btn-impact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.battle-impact-cooldown {
    margin-top: 8px;
    font-size: 11px;
    color: #fbbf24;
    font-weight: 600;
    text-align: center;
}

.battle-data-card-compact {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.70) 0%, rgba(15, 20, 25, 0.70) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 8px; /* Reduced from 16px */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.battle-collapsible-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    margin-bottom: 4px;
}

.battle-data-title-compact {
    color: #e0e7ef;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.battle-collapsible-icon-compact {
    color: #6b7280;
    font-size: 10px;
    transition: transform 0.2s;
}

.battle-collapsible-body-compact {
    margin-top: 6px;
}

/* =========================================
   INLINE METRICS (Your Impact)
   ========================================= */
.battle-impact-metrics-inline {
    display: flex;
    gap: 8px;
    padding: 6px 0;
}

.battle-metric-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: rgba(10, 14, 26, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.battle-metric-icon {
    font-size: 14px;
    line-height: 1;
}

.battle-metric-label {
    color: #a0a8b8;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-metric-value {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(251, 191, 36, 0.3);
}

/* Ensure compact layout fits in 300-350px height target */
.battle-content > .battle-header-compact {
    height: auto;
    min-height: 90px; /* Adjusted for 3 rows: 32px + 28px + ~24px (compact R1-R6) + gaps */
    overflow: visible; /* Allow all rows to be visible */
}

/* Grid items should have consistent heights */
.battle-content-grid .battle-contribution-card,
.battle-content-grid .battle-impact-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.battle-content-grid .battle-collapsible-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Additional compact spacing */
.battle-deploy-compact {
    gap: 8px; /* Reduced from 14px */
}

.battle-deploy-unit-row {
    padding: 6px; /* Reduced from 10px */
}

.battle-main-row {
    display: flex;
    gap: 8px; /* Reduced from 20px */
    align-items: flex-start;
}

.battle-left-panel {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced from 16px */
    flex: 1;
}

/* Legacy header - hidden when using compact */
.battle-header-card {
    display: none;
}

.battle-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.battle-country-flag {
    width: 36px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

.battle-title-text {
    color: #e0e7ef;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.battle-location {
    text-align: center;
    color: #a0a8b8;
    font-size: 12px;
    margin-bottom: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.battle-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(59, 130, 246, 0.25);
    margin-top: 6px;
}

.battle-time-left {
    color: #e0e7ef;
    font-size: 14px;
    font-weight: 700;
}

.battle-phase {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.battle-phase-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
    animation: phasePulse 2s ease-in-out infinite;
}

@keyframes phasePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.15) rotate(5deg);
    }
}

/* Battle Momentum Card */
.battle-momentum-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.70) 0%, rgba(15, 20, 25, 0.70) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.battle-momentum-title {
    color: #e0e7ef;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
}

.battle-momentum-bar-container {
    position: relative;
}

.battle-momentum-bar {
    height: 36px;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.8) 0%, rgba(15, 20, 30, 0.8) 100%);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    margin-bottom: 14px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.battle-momentum-segment {
    height: 100%;
    display: flex;
    align-items: center;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

    .battle-momentum-segment.poland {
        background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
        justify-content: flex-start;
    }

    .battle-momentum-segment.germany {
        background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
        justify-content: flex-end;
    }

.battle-momentum-percentage {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 5;
    position: relative;
    margin: 0 8px; /* Moved padding here as margin */
}

.battle-momentum-timeline {
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 10px;
    padding: 0 4px;
    font-weight: 600;
}

/* Contribution Graph Card */
.battle-contribution-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.70) 0%, rgba(15, 20, 25, 0.70) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 8px; /* Reduced from 16px */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 8px; /* Reduced gap */
}

.battle-contribution-title {
    color: #e0e7ef;
    font-size: 11px; /* Reduced from 13px */
    font-weight: 700;
    margin-bottom: 6px; /* Reduced from 12px */
}

.battle-contribution-graph {
    height: 100px;
    max-height: 100px;
    position: relative;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.7) 0%, rgba(15, 20, 30, 0.7) 100%);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

    .battle-contribution-graph canvas {
        max-height: 100%;
        width: 100% !important;
        height: 100% !important;
    }

.battle-graph-timeline {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
}

/* Right Panel */
.battle-right-panel {
    width: 350px;
    min-width: 350px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(21, 26, 37, 0.75) 0%, rgba(15, 20, 25, 0.75) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 16px;
    padding: 12px; /* Reduced from 20px */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced from 16px */
    overflow: visible;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
}

.battle-impact-card,
.battle-losses-card,
.battle-tech-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.70) 0%, rgba(15, 20, 25, 0.70) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 8px; /* Reduced from 16px */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 8px; /* Reduced gap */
}

.battle-impact-title,
.battle-losses-title,
.battle-tech-title {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.battle-impact-value {
    color: #fbbf24;
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 4px;
    text-shadow: 0 4px 16px rgba(251, 191, 36, 0.5);
    letter-spacing: 0.02em;
}

.battle-impact-label {
    color: #a0a8b8;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.battle-impact-bonus,
.battle-impact-fatigue {
    color: #e0e7ef;
    font-size: 11px;
    margin-top: 6px;
    font-weight: 500;
}

.battle-loss-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

    .battle-loss-item:last-child {
        border-bottom: none;
    }

.battle-loss-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 600;
}

.battle-loss-value {
    color: #fbbf24;
    font-size: 15px;
    font-weight: 800;
}

.battle-tech-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e7ef;
    font-size: 12px;
    padding: 8px 0;
    font-weight: 500;
}

.battle-tech-icon {
    font-size: 18px;
    color: #a0a8b8;
}

.battle-deploy-btn {
    width: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    margin-top: 12px;
}

    .battle-deploy-btn:hover:not(:disabled) {
        background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
        transform: translateY(-3px);
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }

    .battle-deploy-btn:active:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    .battle-deploy-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        filter: grayscale(0.3);
    }

/* Compact Deploy Component */
.battle-deploy-compact {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.battle-deploy-unit-row {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.60) 0%, rgba(10, 14, 26, 0.60) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.battle-deploy-unit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e0e7ef;
    font-size: 12px;
    font-weight: 600;
}

.battle-deploy-slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-deploy-slider {
    width: 100%;
    height: 6px;
    background: rgba(10, 14, 26, 0.8);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

    .battle-deploy-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
        transition: all 0.2s;
    }

        .battle-deploy-slider::-webkit-slider-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
        }

    .battle-deploy-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
        transition: all 0.2s;
    }

        .battle-deploy-slider::-moz-range-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
        }

.battle-deploy-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-unit-input-slider {
    flex: 1;
    background: rgba(10, 14, 26, 0.70);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    color: #e0e7ef;
    padding: 6px 10px;
    font-size: 12px;
    text-align: center;
    font-weight: 700;
    transition: all 0.2s;
    width: 80px;
}

    .battle-unit-input-slider:focus {
        outline: none;
        border-color: #fbbf24;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
        background: rgba(10, 14, 26, 1);
    }

    .battle-unit-input-slider::-webkit-inner-spin-button,
    .battle-unit-input-slider::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.battle-btn-max {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    color: #60a5fa;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

    .battle-btn-max:hover {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.3) 100%);
        border-color: rgba(59, 130, 246, 0.7);
        color: #93c5fd;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    }

    .battle-btn-max:active {
        transform: translateY(0);
    }

.battle-loss-risk-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 6px;
    color: #ef4444;
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}

.battle-deploy-btn-compact {
    width: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    margin-top: 4px;
}

    .battle-deploy-btn-compact:hover:not(:disabled) {
        background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }

    .battle-deploy-btn-compact:active:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 3px 12px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    .battle-deploy-btn-compact:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        filter: grayscale(0.3);
    }

.battle-cooldown-compact {
    color: #a0a8b8;
    font-size: 11px;
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(59, 130, 246, 0.25);
    margin-top: 4px;
    font-weight: 600;
}

/* Error/Loading States */
.battle-error-container,
.battle-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #e0e7ef;
    background: #0a0e1a;
}

.battle-error-message {
    font-size: 18px;
    margin-bottom: 24px;
    font-weight: 600;
}

.battle-btn-secondary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #e0e7ef;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

    .battle-btn-secondary:hover {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.18) 100%);
        border-color: #fbbf24;
        color: #fbbf24;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
    }

.battle-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
.battle-sidebar::-webkit-scrollbar,
.battle-content::-webkit-scrollbar {
    width: 10px;
}

.battle-sidebar::-webkit-scrollbar-track,
.battle-content::-webkit-scrollbar-track {
    background: rgba(15, 20, 35, 0.5);
    border-radius: 5px;
}

.battle-sidebar::-webkit-scrollbar-thumb,
.battle-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 5px;
    border: 2px solid rgba(15, 20, 35, 0.5);
}

    .battle-sidebar::-webkit-scrollbar-thumb:hover,
    .battle-content::-webkit-scrollbar-thumb:hover {
        background: rgba(251, 191, 36, 0.6);
    }

/* Responsive Design */
@media (max-width: 1600px) {
    /* Adjusted for new layout - drawer style doesn't need width changes */
    .battle-right-panel {
        width: 320px;
    }
}

/* Compact layout adjustments for desktop */
@media (min-width: 992px) {
    .battle-data-grid-unified {
        max-height: 180px; /* Limit height to ensure compactness */
    }
    
    .battle-header-compact {
        min-height: 90px; /* Ensure header fits all 3 rows (compact R1-R6) */
        overflow: visible; /* Allow all content to be visible */
    }
}

/* Stack grid on smaller screens */
@media (max-width: 1200px) {
    .battle-content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }
    
    .battle-grid-impact,
    .battle-grid-statistics,
    .battle-grid-livefeed,
    .battle-grid-pulse {
        grid-row: auto;
        grid-column: 1;
    }

}

@media (max-width: 1400px) {
    .battle-right-panel {
        width: 300px;
    }

    .battle-title-text {
        font-size: 24px;
    }
}

@media (max-width: 1200px) {
    .battle-layout {
        flex-direction: column;
    }

    .battle-right-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(59, 130, 246, 0.25);
    }
}

/* Sidebar Toggle - REMOVED OLD LOGIC, USING DRAWER LOGIC ABOVE */

/* Hamburger Menu Button */
.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    margin-right: 12px;
    cursor: pointer;
    color: #e0e6ef;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 40px;
    height: 40px;
}

    .sidebar-toggle-btn:hover {
        background: rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 0.4);
        color: #60a5fa;
    }

.hamburger-icon {
    display: block;
    line-height: 1;
}

/* Collapsible Components */
.battle-collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

    .battle-collapsible-header:hover {
        opacity: 0.8;
    }

.battle-collapsible-icon {
    color: #6b7280;
    font-size: 12px;
    transition: transform 0.2s;
}

.battle-collapsible-header .battle-contribution-title,
.battle-collapsible-header .battle-impact-title,
.battle-collapsible-header .battle-losses-title,
.battle-collapsible-header .battle-tech-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.battle-presidential-card {
    margin-top: 16px;
    border: 2px solid #f59e0b;
}

.battle-collapsible-body {
    margin-top: 8px; /* Reduced from 16px */
}

/* Compact pulse chart container */
.battle-collapsible-body-compact .pulse-chart-container {
    height: 120px !important; /* Reduced from 200px */
    margin-bottom: 4px;
}

/* Battle Statistics Tabs */
.battle-stats-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.battle-stat-tab {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

    .battle-stat-tab:hover {
        color: #a0a8b8;
    }

    .battle-stat-tab.active {
        color: #fbbf24;
        border-bottom-color: #fbbf24;
    }

/* Top Lists */
.battle-top-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.battle-top-list-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.battle-top-list-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.battle-top-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
}

    .battle-top-list-item:hover {
        background: rgba(0, 0, 0, 0.3);
    }

.battle-top-rank {
    color: #fbbf24;
    font-weight: 800;
    font-size: 11px;
    min-width: 20px;
}

.battle-top-name {
    flex: 1;
    color: #e0e7ef;
    font-weight: 500;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-top-value {
    color: #fbbf24;
    font-weight: 700;
    font-size: 11px;
}

/* Battles Page Container */
.battles-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 24px 24px 24px;
}

.battles-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.battles-page-title {
    color: #e0e7ef;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
}

.battles-page-actions {
    display: flex;
    gap: 12px;
}

.battle-create-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.battle-create-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .battle-create-form-row {
        grid-template-columns: 1fr;
    }
}

.battle-create-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-create-form-label {
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-create-form-select {
    background: rgba(10, 14, 26, 0.70);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: #e0e7ef;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

    .battle-create-form-select:focus {
        outline: none;
        border-color: #fbbf24;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
        background: rgba(10, 14, 26, 1);
    }

.battle-create-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Battle List Styles */
.battle-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.battle-list-empty-message {
    color: #a0a8b8;
    font-size: 16px;
    margin-bottom: 20px;
}

.battle-list-section {
    margin-bottom: 32px;
}

.battle-list-section-title {
    color: #e0e7ef;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-list-item {
    background: var(--cg-surface-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cg-surface-border);
    border-radius: var(--cg-surface-radius);
    padding: 12px 16px;
    box-shadow: var(--cg-surface-shadow);
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
    width: 100%;
}

    .battle-list-item:hover {
        transform: translateY(-2px);
        border-color: var(--cg-surface-border-hover);
        box-shadow: var(--cg-surface-shadow-hover);
    }

.battle-list-item-row {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.battle-list-item-flags-section {
    display: flex;
    align-items: center;
    min-width: 200px;
    flex-shrink: 0;
}

.battle-list-item-title-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e7ef;
    font-size: 14px;
    font-weight: 700;
}

.battle-list-country-with-flag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-country-flag-small {
    width: 28px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.battle-list-flag-img {
    width: 24px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.battle-list-country-name {
    color: #e0e7ef;
    white-space: nowrap;
}

.battle-list-separator {
    color: #6b7280;
    font-weight: 500;
    font-size: 12px;
    margin: 0 4px;
}

.battle-list-item-region-section {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 500;
    min-width: 120px;
    flex-shrink: 0;
}

.battle-list-region-icon {
    font-size: 14px;
}

.battle-list-item-stat-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    flex: 1;
}

.battle-list-stat-label {
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-list-stat-label-small {
    color: #6b7280;
    font-size: 9px;
    font-weight: 500;
}

.battle-list-stat-value {
    color: #fbbf24;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.battle-list-item-status-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 140px;
    flex-shrink: 0;
}

.battle-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

    .battle-status-badge.active {
        background: rgba(34, 197, 94, 0.2);
        border: 1px solid rgba(34, 197, 94, 0.4);
        color: #4ade80;
    }

    .battle-status-badge.ended {
        background: rgba(107, 114, 128, 0.2);
        border: 1px solid rgba(107, 114, 128, 0.4);
        color: #9ca3af;
    }

.battle-list-time {
    color: #6b7280;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

/* Buildings Page Styles */
.buildings-page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 80px 24px 24px 24px;
}

.buildings-page-header {
    margin-bottom: 32px;
}

.buildings-page-title {
    color: #e0e7ef;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buildings List (Row Style) */
.buildings-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.building-row {
    background: var(--cg-surface-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cg-surface-border);
    border-radius: var(--cg-surface-radius);
    padding: 16px;
    box-shadow: var(--cg-surface-shadow);
    transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
    width: 100%;
    position: relative;
}

    .building-row:hover {
        transform: translateY(-2px);
        border-color: var(--cg-surface-border-hover);
        box-shadow: var(--cg-surface-shadow-hover);
    }

    .building-row.building-not-owned {
        opacity: 0.7;
    }

.building-row-content {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.building-row-image {
    position: relative;
    width: 160px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.8) 0%, rgba(15, 20, 30, 0.8) 100%);
    border: 1px solid var(--cg-surface-border);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.building-row:hover .building-row-image {
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* Dynamic Background Glows */
.building-row-image.building-glow-green::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-red::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-blue::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-purple::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-gold::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-orange::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-brown::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(180, 83, 9, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-black::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(30, 30, 30, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-image.building-glow-gray::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 114, 128, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.building-row-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transform: scale(1.0);
    transition: transform 0.4s ease, filter 0.3s ease;
    position: relative;
    z-index: 1;
    filter: brightness(1);
}

.building-row:hover .building-row-img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.building-level-plaque {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.95) 0%, rgba(101, 50, 14, 0.95) 100%);
    border: 2px solid rgba(251, 191, 36, 0.6);
    border-radius: 8px;
    padding: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(251, 191, 36, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

.building-level-plaque-inner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.95) 0%, rgba(245, 158, 11, 0.95) 100%);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(139, 69, 19, 0.3);
}

.building-row-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.building-row-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.building-row-name {
    color: #e0e7ef;
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.building-row-description {
    color: #a0a8b8;
    font-size: 13px;
    margin: 0;
    font-weight: 500;
}

.building-row-stats-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.building-info-actions-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
}

    .building-info-actions-row .building-row-production {
        flex: 1;
        margin: 0;
    }

    .building-info-actions-row .building-collection-timer {
        flex: 1;
        margin: 0;
    }

    .building-info-actions-row .building-action-btn {
        flex: 0 0 auto;
        min-width: 140px;
    }

        .building-info-actions-row .building-action-btn.building-btn-collect {
            min-width: 200px;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 4px;
        }

.building-training-actions-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
}

    .building-training-actions-row .building-action-btn {
        flex: 1;
        min-width: 140px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
    }

.building-btn-train-amount {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.building-btn-train-icon {
    font-size: 12px;
}

.building-btn-train-text {
    font-size: 12px;
    letter-spacing: 0.03em;
}

.building-action-btn.building-btn-train-8h {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 50%, rgba(217, 119, 6, 0.2) 100%);
    border-top-color: rgba(252, 211, 77, 0.4);
    border-left-color: rgba(252, 211, 77, 0.3);
    border-right-color: rgba(217, 119, 6, 0.5);
    border-bottom-color: rgba(217, 119, 6, 0.6);
    color: #fbbf24;
}

    .building-action-btn.building-btn-train-8h:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.25) 50%, rgba(217, 119, 6, 0.3) 100%);
        border-top-color: rgba(252, 211, 77, 0.5);
        border-left-color: rgba(252, 211, 77, 0.4);
        color: #fcd34d;
        box-shadow: inset 0 1px 3px rgba(252, 211, 77, 0.3), inset 0 -1px 3px rgba(217, 119, 6, 0.4), 0 6px 20px rgba(251, 191, 36, 0.4);
    }

.building-action-btn.building-btn-train-24h {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 50%, rgba(29, 78, 216, 0.2) 100%);
    border-top-color: rgba(96, 165, 250, 0.4);
    border-left-color: rgba(96, 165, 250, 0.3);
    border-right-color: rgba(29, 78, 216, 0.5);
    border-bottom-color: rgba(29, 78, 216, 0.6);
    color: #60a5fa;
}

    .building-action-btn.building-btn-train-24h:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.25) 50%, rgba(29, 78, 216, 0.3) 100%);
        border-top-color: rgba(96, 165, 250, 0.5);
        border-left-color: rgba(96, 165, 250, 0.4);
        color: #93c5fd;
        box-shadow: inset 0 1px 3px rgba(96, 165, 250, 0.3), inset 0 -1px 3px rgba(29, 78, 216, 0.4), 0 6px 20px rgba(59, 130, 246, 0.4);
    }

.building-info-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.building-actions-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
}

.building-row-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.building-row-stat-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.building-row-status {
    display: flex;
    align-items: center;
}

.building-row-production {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a0a8b8;
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(10, 14, 26, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.building-collection-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 6px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.building-collection-timer-icon {
    font-size: 14px;
}

.building-collection-timer-text {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.building-collection-efficiency {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid currentColor;
}

/* Green state: 0-1 hour */
.building-collection-timer.collection-state-green {
    color: #34d399;
    background: rgba(34, 211, 153, 0.15);
    border-color: rgba(34, 211, 153, 0.4);
    box-shadow: 0 0 8px rgba(34, 211, 153, 0.2);
}

/* Gray state: 1-4 hours */
.building-collection-timer.collection-state-gray {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.15);
    border-color: rgba(156, 163, 175, 0.4);
    box-shadow: 0 0 8px rgba(156, 163, 175, 0.2);
}

/* Yellow state: 4-8 hours */
.building-collection-timer.collection-state-yellow {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

/* Orange state: 8-12 hours (50% efficiency) */
.building-collection-timer.collection-state-orange {
    color: #f97316;
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.2);
}

/* Black state: 12+ hours (busy) */
.building-collection-timer.collection-state-black {
    color: #1f2937;
    background: rgba(31, 41, 55, 0.4);
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    animation: pulse-busty 2s ease-in-out infinite;
}

@keyframes pulse-busty {
    0%, 100% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    }
}

.building-resource-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.building-row-upgrade-info,
.building-row-purchase-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0a8b8;
    font-size: 12px;
}

.building-construction-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.building-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.building-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.building-progress-text {
    color: #fbbf24;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.building-stat-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.building-stat-value {
    color: #fbbf24;
    font-weight: 700;
    font-size: 12px;
}

.building-row-max-level {
    color: #fbbf24;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.building-row-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
    flex-shrink: 0;
}

.building-action-btn {
    background: linear-gradient(135deg, rgba(200, 200, 200, 0.15) 0%, rgba(150, 150, 150, 0.1) 50%, rgba(100, 100, 100, 0.15) 100%);
    border: 2px solid;
    border-top-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.2);
    border-right-color: rgba(0, 0, 0, 0.4);
    border-bottom-color: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    color: #e0e7ef;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), inset 0 -1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 120px;
}

    .building-action-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(220, 220, 220, 0.2) 0%, rgba(170, 170, 170, 0.15) 50%, rgba(120, 120, 120, 0.2) 100%);
        border-top-color: rgba(255, 255, 255, 0.4);
        border-left-color: rgba(255, 255, 255, 0.3);
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3), inset 0 -1px 3px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    .building-action-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .building-action-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
        transform: none;
        filter: grayscale(0.8);
        background: linear-gradient(135deg, rgba(100, 100, 100, 0.1) 0%, rgba(80, 80, 80, 0.08) 50%, rgba(60, 60, 60, 0.1) 100%) !important;
        border-top-color: rgba(100, 100, 100, 0.2) !important;
        border-left-color: rgba(100, 100, 100, 0.15) !important;
        border-right-color: rgba(60, 60, 60, 0.3) !important;
        border-bottom-color: rgba(60, 60, 60, 0.4) !important;
        color: #6b7280 !important;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 -1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    .building-action-btn.building-btn-collect {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.4) 0%, rgba(22, 163, 74, 0.3) 100%);
        border-color: rgba(34, 197, 94, 0.6);
        color: #4ade80;
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    }

        .building-action-btn.building-btn-collect:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.6) 0%, rgba(22, 163, 74, 0.5) 100%);
            border-color: rgba(34, 197, 94, 0.8);
            color: #86efac;
            box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
        }

    .building-action-btn.building-btn-upgrade {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.4) 0%, rgba(245, 158, 11, 0.3) 100%);
        border-color: rgba(251, 191, 36, 0.6);
        color: #fbbf24;
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    }

        .building-action-btn.building-btn-upgrade:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.6) 0%, rgba(245, 158, 11, 0.5) 100%);
            border-color: rgba(251, 191, 36, 0.8);
            color: #fcd34d;
            box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
        }

    .building-action-btn.building-btn-research {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.2) 100%);
        border-color: rgba(139, 92, 246, 0.5);
        color: #a78bfa;
    }

        .building-action-btn.building-btn-research:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(124, 58, 237, 0.3) 100%);
            border-color: rgba(139, 92, 246, 0.7);
            color: #c4b5fd;
            box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
        }

    .building-action-btn.building-btn-hq {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
        border-color: rgba(251, 191, 36, 0.5);
        color: #fbbf24;
    }

        .building-action-btn.building-btn-hq:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.4) 0%, rgba(245, 158, 11, 0.3) 100%);
            border-color: rgba(251, 191, 36, 0.7);
            color: #fcd34d;
            box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
        }

    .building-action-btn.building-btn-purchase {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.2) 100%);
        border-color: rgba(34, 197, 94, 0.5);
        color: #4ade80;
    }

    .building-action-btn.building-btn-purchase {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.15) 50%, rgba(16, 122, 56, 0.2) 100%);
        border-top-color: rgba(86, 239, 172, 0.4);
        border-left-color: rgba(86, 239, 172, 0.3);
        border-right-color: rgba(16, 122, 56, 0.5);
        border-bottom-color: rgba(16, 122, 56, 0.6);
        color: #4ade80;
    }

        .building-action-btn.building-btn-purchase:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.25) 50%, rgba(16, 122, 56, 0.3) 100%);
            border-top-color: rgba(86, 239, 172, 0.5);
            border-left-color: rgba(86, 239, 172, 0.4);
            color: #86efac;
            box-shadow: inset 0 1px 3px rgba(86, 239, 172, 0.3), inset 0 -1px 3px rgba(16, 122, 56, 0.4), 0 6px 20px rgba(34, 197, 94, 0.4);
        }

.building-training-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.building-training-summary {
    font-size: 0.7rem;
    color: #22c55e;
    font-weight: 600;
}

.building-btn-cost {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.building-btn-cost-icon {
    font-size: 12px;
}

.building-btn-cost-text {
    font-size: 10px;
    letter-spacing: 0.03em;
}

.building-btn-collect-label {
    font-size: 11px;
}

.building-btn-collect-amount {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.building-btn-collect-amount-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.building-btn-collect-icon {
    font-size: 12px;
}

.building-btn-collect-text {
    font-size: 11px;
    letter-spacing: 0.03em;
    color: #86efac;
}

.building-max-level-badge {
    text-align: center;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.1) 50%, rgba(217, 119, 6, 0.15) 100%);
    border-radius: 8px;
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-top-color: rgba(252, 211, 77, 0.5);
    border-left-color: rgba(252, 211, 77, 0.4);
    border-right-color: rgba(217, 119, 6, 0.5);
    border-bottom-color: rgba(217, 119, 6, 0.6);
    box-shadow: inset 0 1px 2px rgba(252, 211, 77, 0.2), inset 0 -1px 2px rgba(217, 119, 6, 0.3), 0 4px 12px rgba(251, 191, 36, 0.3);
}

.building-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

    .building-status-badge.active {
        background: rgba(34, 197, 94, 0.2);
        border: 1px solid rgba(34, 197, 94, 0.4);
        color: #4ade80;
    }

    .building-status-badge.construction {
        background: rgba(251, 191, 36, 0.2);
        border: 1px solid rgba(251, 191, 36, 0.4);
        color: #fbbf24;
    }

    .building-status-badge.inactive {
        background: rgba(107, 114, 128, 0.2);
        border: 1px solid rgba(107, 114, 128, 0.4);
        color: #9ca3af;
    }

    .building-status-badge.not-owned {
        background: rgba(239, 68, 68, 0.2);
        border: 1px solid rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }

.building-production {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0a8b8;
    font-size: 12px;
}

.building-production-label {
    color: #6b7280;
    font-weight: 600;
}

.building-production-value {
    color: #fbbf24;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.building-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.building-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    color: #60a5fa;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .building-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.3) 100%);
        border-color: rgba(59, 130, 246, 0.7);
        color: #93c5fd;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .building-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.building-btn-collect {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.2) 100%);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

    .building-btn-collect:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.4) 0%, rgba(22, 163, 74, 0.3) 100%);
        border-color: rgba(34, 197, 94, 0.7);
        color: #86efac;
    }

.building-btn-research {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    color: #a78bfa;
}

    .building-btn-research:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(124, 58, 237, 0.3) 100%);
        border-color: rgba(139, 92, 246, 0.7);
        color: #c4b5fd;
    }

.building-btn-hq {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-color: rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

    .building-btn-hq:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.4) 0%, rgba(245, 158, 11, 0.3) 100%);
        border-color: rgba(251, 191, 36, 0.7);
        color: #fcd34d;
    }

.building-btn-upgrade {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.building-btn-purchase {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.2) 100%);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

    .building-btn-purchase:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.4) 0%, rgba(22, 163, 74, 0.3) 100%);
        border-color: rgba(34, 197, 94, 0.7);
        color: #86efac;
    }

.building-upgrade-cost,
.building-purchase-cost {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(10, 14, 26, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.building-cost-label {
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.building-cost-value {
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
}

.building-max-level {
    text-align: center;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

@media (max-width: 768px) {
    .battle-top-bar {
        padding: 0 8px !important; /* By³o 16px */
        height: 56px; /* Lekko ni¿szy pasek */
    }

    .battle-top-bar-center {
        gap: 4px; /* By³o 8px - kluczowa zmiana */
        padding: 0 2px;
        justify-content: center; /* Wyœrodkuj */
        flex-wrap: nowrap; /* Nie zawijaj do nowej linii */
        overflow-x: auto; /* Pozwól przewijaæ palcem jeœli jest ich 6+ */
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, transparent, black 10px, black 90%, transparent); /* £adne zanikanie po bokach */
    }

    /* 3. Kompaktowe kafelki surowców */
    .battle-resource-item {
        font-size: 10px; /* Mniejsza czcionka (by³o 11/12px) */
        padding: 2px 6px; /* Bardziej p³askie (by³o 3px 8px) */
        gap: 4px; /* Ikona bli¿ej liczby */
        min-width: auto; /* Niech zajmuje tyle ile trzeba */
        height: 24px; /* Sta³a, ma³a wysokoœæ */
    }

    .battle-resource-icon {
        font-size: 12px; /* Mniejsza ikona */
    }

    .battle-layout {
        margin-top: 56px;
    }

    .battle-title {
        flex-direction: column;
        gap: 12px;
    }

    .battle-title-text {
        font-size: 20px;
        text-align: center;
    }

    .battle-top-list {
        grid-template-columns: 1fr;
    }

    .battle-list-item-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .battle-list-item-flags-section {
        min-width: 100%;
        order: 1;
    }

    .battle-list-item-region-section {
        min-width: auto;
        order: 2;
    }

    .battle-list-item-stat-section {
        min-width: calc(50% - 6px);
        order: 3;
    }

    .battle-list-item-status-section {
        min-width: 100%;
        order: 4;
        align-items: flex-start;
    }

    .battle-list-item-title-text {
        font-size: 12px;
    }

    /* =========================================================
       BATTLES (MOBILE "COMPACT WAR ROOM" LIST)
       - Used by Battles.razor mobile view (d-md-none)
       ========================================================= */
    .mobile-battle-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-bottom: 20px;
    }

    .mobile-battle-row {
        background: var(--cg-surface-bg);
        border: 1px solid var(--cg-surface-border);
        border-radius: var(--r-md);
        padding: 8px 10px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        position: relative;
        overflow: hidden;
        cursor: pointer;
        transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
        min-height: 64px;
        box-shadow: var(--cg-surface-shadow);
    }

    .mobile-battle-row:active {
        transform: translateY(-1px);
        border-color: var(--cg-surface-border-hover);
        box-shadow: var(--cg-surface-shadow-hover);
    }

    .battle-row-header {
        display: flex;
        justify-content: space-between;
        font-size: 10px;
        color: #a0a8b8;
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    .battle-timer.urgent {
        color: #ef4444;
        animation: pulse 1s infinite;
    }

    .battle-vs-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .side {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .side.attacker {
        justify-content: flex-start;
    }

    .side.defender {
        justify-content: flex-end;
        text-align: right;
    }

    .battle-flag-medium {
        width: 28px;
        height: 20px;
        border-radius: 3px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        object-fit: cover;
        flex-shrink: 0;
    }

    .side-info {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        min-width: 0;
    }

    .country-code {
        font-size: 11px;
        font-weight: 700;
        color: #e0e7ef;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .side.attacker .country-code {
        color: #fecaca; /* attacker tint */
    }

    .side.defender .country-code {
        color: #bfdbfe; /* defender tint */
    }

    .damage-val {
        font-size: 10px;
        color: #fbbf24;
        font-weight: 700;
    }

    .vs-badge {
        font-size: 10px;
        font-weight: 900;
        color: #60a5fa;
        background: rgba(59, 130, 246, 0.1);
        padding: 2px 6px;
        border-radius: 4px;
        margin: 0 8px;
        flex: 0 0 auto;
    }

    .battle-progress-bar {
        height: 4px;
        width: 100%;
        background: #1a1f2e;
        border-radius: 2px;
        display: flex;
        overflow: hidden;
        margin-top: 2px;
    }

    .progress-segment {
        height: 100%;
    }

    .progress-segment.attacker {
        background: #ef4444;
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
    }

    .progress-segment.defender {
        background: #3b82f6;
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }

    .building-row-content {
        flex-wrap: wrap;
        gap: 16px;
    }

    .building-row-image {
        width: 100%;
        height: 200px;
    }

    .building-row-details {
        min-width: 100%;
    }

    .building-row-actions {
        min-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .buildings-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Building Info Button */
.building-info-btn {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    font-size: 16px;
}

    .building-info-btn:hover {
        background: rgba(59, 130, 246, 0.25);
        border-color: rgba(59, 130, 246, 0.5);
        transform: scale(1.05);
    }

    .building-info-btn:active {
        transform: scale(0.95);
    }

/* Building Info Modal */
.building-modal-overlay {
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 1050;
}

.building-modal-dialog {
    max-width: 800px;
    margin: 2rem auto;
}

.building-modal-content {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}

.building-modal-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3) !important;
    padding: 1.25rem 1.5rem !important;
}

.building-modal-title {
    color: #3b82f6 !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    margin: 0 !important;
}

.building-modal-subtitle {
    text-transform: none;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: normal;
    color: #94a3b8;
}

.building-info-work-token-lead {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0 0 1rem 0;
}

.building-info-work-token-lead code {
    font-size: 0.9em;
    color: #7dd3fc;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.building-info-link {
    color: #38bdf8;
    text-decoration: underline;
}

.building-info-work-token-current {
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    padding: 0.65rem 0.85rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    color: #e0e7ef;
}

.building-modal-close {
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .building-modal-close:hover {
        opacity: 1;
    }

.building-modal-body {
    padding: 1.5rem !important;
    color: #e0e7ef;
}

.building-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

    .building-info-table thead {
        background: rgba(59, 130, 246, 0.15);
        border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    }

    .building-info-table th {
        padding: 12px 16px;
        text-align: left;
        color: #3b82f6;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 0.05em;
    }

    .building-info-table td {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: #e0e7ef;
    }

    .building-info-table tbody tr:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    .building-info-table tbody tr:last-child td {
        border-bottom: none;
    }

.building-info-level {
    font-weight: 700;
    color: #3b82f6;
    font-size: 16px;
}

.building-info-production {
    color: #10b981;
    font-weight: 600;
}

.building-info-cost {
    color: #f59e0b;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .building-modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }

    .building-info-table {
        font-size: 12px;
    }

        .building-info-table th,
        .building-info-table td {
            padding: 8px 12px;
        }
}

/* =========================================================
   BUILDINGS (MOBILE-FIRST CARD LAYOUT)
   - Desktop keeps .building-row
   - Mobile (<=768px) shows .building-mobile-card
   ========================================================= */
.building-mobile-card { display: none; } /* Hidden on desktop */

@media (max-width: 768px) {
    .building-row { display: none !important; } /* Hide table rows */
    
    .building-mobile-card {
        display: flex; flex-direction: column;
        background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
        border: 1px solid rgba(59, 130, 246, 0.3);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        position: relative;
    }
    
    /* Color Variants */
    .building-mobile-card.border-green { border-left: 4px solid #4ade80; }
    .building-mobile-card.border-gray { border-left: 4px solid #9ca3af; }
    .building-mobile-card.border-brown { border-left: 4px solid #a16207; }
    .building-mobile-card.border-black { border-left: 4px solid #1e293b; }
    .building-mobile-card.border-blue { border-left: 4px solid #3b82f6; }

    /* Inner Layout */
    .building-card-top { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; }
    .building-card-image-wrapper { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; position: relative; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.15); }
    .building-card-img { width: 100%; height: 100%; object-fit: cover; }
    .building-card-level { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); color: #fbbf24; font-size: 9px; font-weight: 800; text-align: center; padding: 2px 0; letter-spacing: 0.08em; }
    
    .building-card-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
    .building-card-title { font-size: 16px; font-weight: 800; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .building-card-icon { margin-left: 6px; font-size: 14px; opacity: 0.95; }
    .building-card-production { font-size: 12px; font-weight: 600; }
    .building-card-status { font-size: 11px; font-weight: 700; color: #a0a8b8; }
    .building-card-status .status-active { color: #4ade80; }
    .building-card-status .status-busy { color: #ef4444; }
    .building-card-status .status-inactive { color: #9ca3af; }
    .building-card-status .status-not-owned { color: #ef4444; }

    .building-info-btn-small { width: 28px; height: 28px; background: rgba(255,255,255,0.05); border-radius: 50%; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #e0e7ef; cursor: pointer; flex-shrink: 0; }
    .building-info-btn-small:active { transform: scale(0.95); }

    /* Progress Bars */
    .building-card-progress-section { background: rgba(0,0,0,0.2); border-radius: 6px; padding: 8px; margin-bottom: 12px; }
    .building-progress-label { display: flex; justify-content: space-between; font-size: 10px; color: #a0a8b8; margin-bottom: 4px; font-weight: 600; gap: 10px; }
    .building-progress-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
    .building-progress-fill { height: 100%; transition: width 0.3s; background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%); }
    
    .fill-green { background: #4ade80 !important; box-shadow: 0 0 8px #4ade80; }
    .fill-gray { background: #9ca3af !important; }
    .fill-brown { background: #a16207 !important; }
    .fill-blue { background: #3b82f6 !important; }

    /* Actions */
    .building-card-actions { display: flex; gap: 8px; }
    .building-btn-action { flex: 1; border: none; border-radius: 6px; padding: 10px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
    .building-btn-action:active { transform: scale(0.98); }
    .building-btn-action:disabled { opacity: 0.45; cursor: not-allowed; }
    
    .building-btn-action.upgrade { background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%); border: 1px solid rgba(251, 191, 36, 0.4); }
    .building-btn-action.upgrade .btn-label { color: #fbbf24; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
    .building-btn-action.upgrade .btn-cost { color: #e0e7ef; font-size: 11px; font-weight: 800; }
    
    .building-btn-action.collect { background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.15) 100%); border: 1px solid rgba(34, 197, 94, 0.5); }
    .building-btn-action.collect .btn-label { color: #4ade80; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
    .building-btn-action.collect .btn-value { color: #fff; font-size: 13px; font-weight: 900; }

    .building-btn-action.purchase { background: linear-gradient(135deg, rgba(34, 197, 94, 0.20) 0%, rgba(22, 163, 74, 0.12) 100%); border: 1px solid rgba(34, 197, 94, 0.45); }
    .building-btn-action.purchase .btn-label { color: #4ade80; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
    .building-btn-action.purchase .btn-cost { color: #e0e7ef; font-size: 11px; font-weight: 800; }
    
    .text-green { color: #4ade80; } .text-gray { color: #9ca3af; } .text-brown { color: #d97706; } .text-blue { color: #60a5fa; }
}

/* =========================================================
   MAIN LAYOUT PC OVERRIDES
   ========================================================= */
.layout-pc {
    display: flex;
    min-height: 100vh;
}

.layout-pc .sidebar-wrapper {
    width: 300px;
    transform: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 20000;
}

.layout-pc.sidebar-collapsed .sidebar-wrapper {
    transform: translateX(-100%);
}

.layout-pc .sidebar-overlay {
    display: none;
}

.layout-pc .main-content-pc {
    margin-left: 300px !important;
    width: calc(100% - 300px) !important;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.layout-pc.sidebar-collapsed .main-content-pc {
    margin-left: 0 !important;
    width: 100% !important;
}

.layout-pc .top-bar-pc {
    left: 300px !important;
    width: calc(100% - 300px) !important;
}

.layout-pc.sidebar-collapsed .top-bar-pc {
    left: 0 !important;
    width: 100% !important;
}

.layout-pc .main-content-below-bars {
    flex: 1;
    padding: 12px 32px 28px;
    overflow-y: auto;
    margin-top: 50px;
}

.game-logo-chip {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(7, 12, 20, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.2);
    cursor: pointer;
}

.game-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.player-power-chip {
    color: #facc15;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
}

.battle-resource-item.local-currency {
    border-color: rgba(96, 165, 250, 0.35);
}

.top-menu-label {
    margin-right: 6px;
    margin-bottom: 0;
    font-size: 10px;
}

@media (max-width: 1199px) {
    .layout-pc .sidebar-wrapper {
        width: 300px;
        transform: translateX(-100%);
    }

    .layout-pc.sidebar-expanded .sidebar-wrapper {
        transform: translateX(0);
    }

    .layout-pc .main-content-pc,
    .layout-pc.sidebar-collapsed .main-content-pc {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .layout-pc .top-bar-pc,
    .layout-pc.sidebar-collapsed .top-bar-pc {
        left: 0 !important;
        width: 100% !important;
    }

    .layout-pc .sidebar-overlay {
        display: block;
    }

    .game-logo-img {
        height: 22px;
    }
}

/* =========================================================
   SIDEBAR LOOK - REFERENCE STYLE
   ========================================================= */
.sidebar-brand-card {
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(67, 20, 7, 0.85) 0%, rgba(18, 28, 41, 0.9) 100%);
    padding: 3px 6px;
    width: fit-content;
    margin: 0 auto;
    text-align: center;
    cursor: pointer;
}

.sidebar-brand-logo {
    color: #f8d08a;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.sidebar-brand-logo-image {
    width: auto;
    max-width: 100%;
    max-height: 56px;
    height: auto;
    display: block;
    border-radius: 6px;
}

.sidebar-profile-card {
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.82) 0%, rgba(17, 24, 39, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-avatar-box {
    width: 84px;
    height: 84px;
    border-radius: 0;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.sidebar-avatar-img,
.sidebar-avatar-placeholder {
    width: 100%;
    height: 100%;
}

.sidebar-avatar-img {
    object-fit: cover;
}

.sidebar-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 30px;
    color: #e5e7eb;
}

.sidebar-player-name {
    color: #f3f4f6;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 2px;
}

.sidebar-player-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #d1d5db;
    font-size: 12px;
    margin-bottom: 10px;
}

.sidebar-country-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.sidebar-level-row {
    display: flex;
    justify-content: space-between;
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sidebar-level-track {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
    margin-bottom: 10px;
}

.sidebar-level-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.sidebar-resource-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-resource-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #e5e7eb;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.7);
    padding: 7px 10px;
}

.sidebar-resource-row.gold {
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.sidebar-resource-row.influence {
    border-color: rgba(167, 139, 250, 0.45);
    color: #ddd6fe;
}

.sidebar-resource-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sidebar-resource-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-menu-section {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 10px;
}

.sidebar-menu-section .battle-nav-item {
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.28);
    padding: 12px 8px;
}

.sidebar-menu-section .battle-nav-item:hover {
    transform: none;
    background: rgba(37, 99, 235, 0.2);
}

.sidebar-menu-section .battle-nav-item.active {
    border-left: 0;
    border-bottom-color: rgba(147, 197, 253, 0.5);
    box-shadow: none;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.4) 0%, rgba(59, 130, 246, 0.2) 100%);
    color: #dbeafe;
}

.sidebar-menu-section .battle-nav-item--icon-only {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

.sidebar-menu-section button.battle-nav-item {
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sidebar-menu-section button.battle-nav-item--icon-only {
    text-align: center;
}

.sidebar-nav-tree {
    display: flex;
    flex-direction: column;
}

.sidebar-menu-section .sidebar-nav-tree > .sidebar-nav-tree-toggle {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-nav-tree-toggle .sidebar-nav-tree-chevron {
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-left: auto;
    margin-right: 2px;
    flex-shrink: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    opacity: 0.75;
}

.sidebar-nav-tree-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.battle-nav-icon .sidebar-nav-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.sidebar-nav-tree-toggle--open .sidebar-nav-tree-chevron {
    transform: rotate(45deg);
    margin-top: -2px;
}

.sidebar-nav-tree-children {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.42);
    box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.25);
}

.sidebar-menu-section .battle-nav-item--tree-child {
    padding-left: 18px;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-menu-section .battle-nav-item--tree-child:last-child {
    border-bottom: none;
}

.battle-nav-icon--with-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-nav-icon-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.85);
}

.research-nav-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.5);
    background: rgba(16, 185, 129, 0.14);
    color: #86efac;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.research-nav-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
    flex: 0 0 auto;
}

/* Starter tutorial: docked below main sidebar menu (separator + missions) */
.sidebar-tutorial-dock {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 200, 100, 0.22);
}

.sidebar-tutorial-dock > .battle-sidebar-title:first-child {
    margin-top: 0;
}

.sidebar-tutorial-dock-muted {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.95);
    margin: 0;
}

.sidebar-tutorial-dock-retry {
    margin-top: 8px;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(30, 58, 138, 0.35);
    color: #e2e8f0;
    cursor: pointer;
}

.sidebar-tutorial-dock-retry:hover {
    border-color: rgba(147, 197, 253, 0.65);
    color: #f8fafc;
}

/* Sidebar: active missions (starter tutorial) — 3×2 grid + modal */
.sidebar-missions-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sidebar-missions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.sidebar-missions-grid--tiles {
    /* 3×3 grid for 8 mission icons — matches narrow sidebar width */
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sidebar-mission-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-height: 76px;
    padding: 6px 6px 28px;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button.sidebar-mission-tile {
    font: inherit;
    color: inherit;
    width: 100%;
}

.sidebar-mission-tile--icon-only {
    min-height: 0;
    padding: 8px;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.sidebar-mission-tile-icon-full {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.35);
    display: block;
}

.sidebar-mission-tile-ready-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.85);
    border: 2px solid rgba(15, 23, 42, 0.92);
    pointer-events: none;
}

.sidebar-mission-tile-head {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    width: 100%;
}

.sidebar-mission-tile-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.35);
}

.sidebar-mission-tile-head-text {
    flex: 1;
    min-width: 0;
}

.sidebar-mission-tile:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(96, 165, 250, 0.45);
}

.sidebar-mission-tile--locked {
    opacity: 0.72;
}

.sidebar-mission-tile--active {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.sidebar-mission-tile--ready {
    border-color: rgba(34, 197, 94, 0.65);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.sidebar-mission-tile-num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.sidebar-mission-tile-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    color: #e2e8f0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-mission-tile-status {
    font-size: 10px;
    color: rgba(148, 163, 184, 0.9);
}

.sidebar-mission-claim-btn {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 4px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.55);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.45));
    color: #ecfdf5;
    cursor: pointer;
}

.sidebar-mission-claim-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}

.sidebar-mission-claim-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sidebar-mission-claim-btn--inline {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 6px 10px;
    font-size: 11px;
}

.sidebar-mission-detail-lead {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(203, 213, 225, 0.95);
    margin: 0 0 14px;
}

.sidebar-mission-detail-block {
    margin-bottom: 12px;
}

.sidebar-mission-detail-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 6px;
}

.sidebar-mission-detail-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(226, 232, 240, 0.92);
}

.sidebar-mission-detail-list li {
    margin-bottom: 4px;
}

.sidebar-mission-detail-rewards {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(250, 204, 21, 0.95);
}

.sidebar-mission-detail-status {
    font-size: 11px;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.95);
    margin: 0 0 12px;
}

.sidebar-mission-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sidebar-missions-show-all-btn {
    margin-top: 8px;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
    cursor: pointer;
}

.sidebar-missions-show-all-btn:hover {
    border-color: rgba(96, 165, 250, 0.5);
    color: #e2e8f0;
}

.sidebar-missions-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-missions-modal-list--compact {
    max-height: min(48vh, 360px);
}

.sidebar-missions-modal-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(51, 65, 85, 0.55);
    background: rgba(15, 23, 42, 0.5);
}

.sidebar-missions-modal-row-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.35);
}

.sidebar-missions-modal-row-main {
    flex: 1 1 160px;
    min-width: 0;
}

.sidebar-missions-modal-row-title {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.sidebar-missions-modal-row-desc {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 4px;
}

.sidebar-missions-modal-row-status {
    font-size: 11px;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.95);
}

.sidebar-missions-modal-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    align-self: center;
}

.sidebar-missions-modal-open-page {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.25);
    color: #dbeafe;
    cursor: pointer;
}

.sidebar-missions-modal-open-page:hover {
    background: rgba(37, 99, 235, 0.4);
}


/* ========== battle-screen.css ========== */
/* Battle Screen - War Room Dashboard - Military Dark Theme */

.battle-screen-container {
    min-height: 100vh;
    background: #1a1a1a;
    color: #e0e7ef;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading & Error States */
.battle-screen-loading,
.battle-screen-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #e0e7ef;
}

.battle-screen-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00f2ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.battle-screen-error-message {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ff4d4d;
}

.battle-screen-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e7ef;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.battle-screen-btn-secondary:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: #00f2ff;
    color: #00f2ff;
}

/* Header: Victory Bar */
.battle-screen-header {
    margin-bottom: 24px;
}

.victory-bar-container {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.victory-bar-title {
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    text-align: center;
}

.victory-bar-wrapper {
    position: relative;
    width: 100%;
}

.victory-bar {
    height: 60px;
    background: rgba(10, 14, 26, 0.8);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    position: relative;
    border: 2px solid rgba(0, 242, 255, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.victory-threshold-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffcc00;
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

.victory-threshold-marker::before {
    content: '451 VP';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffcc00;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.victory-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    position: relative;
}

.victory-segment-my {
    background: linear-gradient(90deg, #00f2ff 0%, #0099cc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(0, 242, 255, 0.3);
}

.victory-segment-enemy {
    background: linear-gradient(90deg, #ff4d4d 0%, #cc0000 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 77, 77, 0.3);
}

.victory-segment-label {
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.victory-bar-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 242, 255, 0.2);
}

.victory-stat {
    display: flex;
    gap: 8px;
    align-items: center;
}

.victory-stat-label {
    color: #a0a8b8;
    font-size: 13px;
}

.victory-stat-value {
    color: #00f2ff;
    font-size: 16px;
    font-weight: 700;
}

.trophy-indicator {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trophy-mine {
    background: rgba(255, 204, 0, 0.2);
    border: 1px solid #ffcc00;
    color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}

.trophy-enemy {
    background: rgba(255, 77, 77, 0.2);
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.4);
}

/* Mobile tab bar (War Room) */
.battle-mobile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px;
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.98) 0%, rgba(15, 20, 25, 0.98) 100%);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 10px;
    position: sticky;
    top: 0;
    z-index: 25;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.battle-mobile-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(10, 14, 26, 0.6);
    color: #a0a8b8;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.battle-mobile-tab.active {
    background: rgba(0, 242, 255, 0.18);
    border-color: rgba(0, 242, 255, 0.55);
    color: #00f2ff;
}

/* Main Grid Layout */
.battle-screen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.battle-screen-left,
.battle-screen-center,
.battle-screen-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section Titles */
.battle-section-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
}

/* Card Styles */
.battle-pulse-card,
.battle-forecast-card,
.round-timeline-card,
.command-deck-card,
.leaderboard-card,
.live-feed-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.85) 0%, rgba(15, 20, 25, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Battle Pulse Chart */
.battle-pulse-chart {
    background: rgba(10, 14, 26, 0.6);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(0, 242, 255, 0.15);
}

.pulse-chart-container {
    width: 100%;
    height: 200px;
    margin-bottom: 12px;
}

.pulse-svg {
    width: 100%;
    height: 100%;
}

.pulse-line {
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px currentColor);
}

.pulse-line-my {
    animation: pulseGlow 2s ease-in-out infinite;
}

.pulse-line-enemy {
    animation: pulseGlow 2s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse-legend {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 242, 255, 0.15);
}

.pulse-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e7ef;
    font-size: 12px;
}

.pulse-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    box-shadow: 0 0 8px currentColor;
}

/* Battle Forecast */
.forecast-content {
    background: rgba(10, 14, 26, 0.6);
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #00f2ff;
    color: #e0e7ef;
    font-size: 14px;
    line-height: 1.6;
    min-height: 80px;
    display: flex;
    align-items: center;
}

/* Round Timeline */
.round-timeline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.round-icon {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
    border: 2px solid;
}

.round-completed {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.5);
}

.round-active {
    background: rgba(255, 204, 0, 0.2);
    border-color: #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
    animation: pulseActive 2s ease-in-out infinite;
}

.round-pending {
    background: rgba(100, 100, 100, 0.1);
    border-color: rgba(100, 100, 100, 0.3);
    opacity: 0.6;
}

@keyframes pulseActive {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.round-number {
    font-size: 18px;
    font-weight: 700;
    color: #e0e7ef;
    margin-bottom: 4px;
}

.round-active-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffcc00;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.round-split {
    font-size: 10px;
    color: #a0a8b8;
    font-weight: 600;
}

/* Command Deck */
.attack-button {
    width: 100%;
    background: linear-gradient(180deg, #00f2ff 0%, #0099cc 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.attack-button:hover:not(:disabled):not(.cooldown) {
    background: linear-gradient(180deg, #00ccff 0%, #0088bb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.attack-button:active:not(:disabled):not(.cooldown) {
    transform: translateY(0);
}

.attack-button.cooldown,
.attack-button:disabled {
    background: linear-gradient(180deg, #666 0%, #444 100%);
    opacity: 0.7;
    cursor: not-allowed;
}

.skills-section {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.skill-slot {
    flex: 1;
    aspect-ratio: 1;
    background: rgba(10, 14, 26, 0.8);
    border: 2px solid rgba(0, 242, 255, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
}

.skill-slot:hover {
    border-color: #00f2ff;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.skill-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.skill-cooldown {
    font-size: 11px;
    color: #a0a8b8;
    font-weight: 600;
    text-align: center;
}

/* Leaderboard */
.leaderboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.leaderboard-column {
    display: flex;
    flex-direction: column;
}

.leaderboard-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.leaderboard-item:hover {
    background: rgba(0, 242, 255, 0.1);
    transform: translateX(4px);
}

.leaderboard-rank {
    color: #ffcc00;
    font-weight: 700;
    font-size: 12px;
    min-width: 30px;
}

.leaderboard-name {
    flex: 1;
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-damage {
    color: #00f2ff;
    font-size: 12px;
    font-weight: 700;
}

/* Live Feed */
.live-feed-container {
    background: rgba(10, 14, 26, 0.6);
    border-radius: 8px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(0, 242, 255, 0.15);
}

.feed-entry {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-entry:last-child {
    border-bottom: none;
}

.feed-time {
    color: #a0a8b8;
    font-weight: 600;
    min-width: 70px;
}

.feed-message {
    color: #e0e7ef;
    flex: 1;
}

/* Scrollbar Styling */
.live-feed-container::-webkit-scrollbar {
    width: 6px;
}

.live-feed-container::-webkit-scrollbar-track {
    background: rgba(10, 14, 26, 0.5);
    border-radius: 3px;
}

.live-feed-container::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.3);
    border-radius: 3px;
}

.live-feed-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .battle-screen-grid {
        grid-template-columns: 1fr;
    }

    .battle-screen-left,
    .battle-screen-center,
    .battle-screen-right {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .battle-screen-container {
        padding: 12px;
    }
    
    .victory-bar {
        height: 40px;
    }
    
    .round-timeline {
        flex-wrap: wrap;
    }
    
    .round-icon {
        min-width: 80px;
    }
    
    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-section {
        flex-direction: column;
    }
    
    .skill-slot {
        aspect-ratio: 3/1;
    }
}

/* Round win reward icons (War Room) */
.battle-round-bonuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin: 0.35rem 0 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 200, 100, 0.12);
    border-radius: 8px;
}

.battle-round-bonus-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 4.5rem;
}

.battle-round-bonus-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    line-height: 1.15;
}

.battle-round-bonus-icon {
    display: block;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
}

.battle-round-bonus-pill--mine .battle-round-bonus-icon {
    box-shadow: 0 0 0 2px rgba(100, 200, 255, 0.65);
}

.battle-round-bonus-pill--enemy .battle-round-bonus-icon {
    box-shadow: 0 0 0 2px rgba(255, 130, 100, 0.7);
}

/* Battle header (classic /battle/{id}) round reward strip */
.battle-header-round-bonuses {
    margin: 0.5rem 0 0.8rem;
    padding: 0.45rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 200, 100, 0.16);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
}

.battle-header-round-bonuses-title {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.25rem;
}

.battle-round-bonus-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-right: 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-round-bonus-legend-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    opacity: 0.65;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.32);
}

.battle-round-bonus-legend-img--current {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(255, 200, 100, 0.7);
}

/* Mobile momentum bar — keep at end of file (cascade safety) */
@media (max-width: 767.98px) {
    .battle-momentum-mobile {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        margin: 2px 0 4px;
    }

    .battle-momentum-mobile .battle-momentum-segment.poland {
        background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    }

    .battle-momentum-mobile .battle-momentum-segment.germany {
        background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    }
}

@media (min-width: 768px) {
    .battle-momentum-mobile {
        display: none !important;
    }
}

