/* Capture the Base - Game Styles */

.ctb-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
    padding: 1rem;
    max-width: 1800px;
    margin: 0 auto;
    gap: 0.75rem;
}

.ctb-content {
    display: flex;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
}

.ctb-dashboard .sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.ctb-dashboard .players-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Scoreboard */
.ctb-scoreboard {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    min-height: 280px;
}

.ctb-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--card-hover);
}

.ctb-team-label {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ctb-team-blue .ctb-team-label { color: #4dabf7; }
.ctb-team-red .ctb-team-label { color: #ff6b6b; }

.ctb-team-score {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ctb-team-blue .ctb-team-score { color: #4dabf7; }
.ctb-team-red .ctb-team-score { color: #ff6b6b; }

.ctb-team-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.ctb-team-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ctb-bar-blue { background: linear-gradient(90deg, #4dabf7, #339af0); }
.ctb-bar-red { background: linear-gradient(90deg, #ff6b6b, #fa5252); }

/* Base indicator (center) */
.ctb-base-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 160px;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--card-hover);
    border: 2px solid var(--card-border);
    transition: border-color 0.3s, background 0.3s;
}

.ctb-base-indicator.base-blue {
    border-color: #4dabf7;
    background: rgba(77, 171, 247, 0.1);
}

.ctb-base-indicator.base-red {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.ctb-base-indicator.base-neutral {
    border-color: var(--card-border);
}

.ctb-base-icon {
    font-size: 3rem;
    transition: filter 0.3s;
}

.ctb-base-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ctb-base-color-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Scoring active pulse */
.ctb-team.scoring {
    animation: scorePulse 1s ease-in-out infinite;
}

@keyframes scorePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.ctb-team-blue.scoring {
    box-shadow: 0 0 20px rgba(77, 171, 247, 0.3);
}
.ctb-team-red.scoring {
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

/* Contested overlay on base */
.ctb-base-indicator.contested {
    border-color: #feca57;
    background: rgba(254, 202, 87, 0.1);
}

/* Game log */
.ctb-log-panel {
    flex: 1;
    min-height: 120px;
    padding: 1rem;
    background: var(--log-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ctb-log-panel h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.ctb-log {
    flex: 1;
    overflow-y: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.ctb-log-empty {
    color: var(--text-muted);
    font-style: italic;
}

.ctb-log-entry {
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ctb-log-entry.log-blue { color: #4dabf7; }
.ctb-log-entry.log-red { color: #ff6b6b; }
.ctb-log-entry.log-neutral { color: #feca57; }
.ctb-log-entry.log-win { color: #26de81; font-weight: 700; }

/* START button style */
.ctb-dashboard .btn-start {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    box-shadow: 0 4px 15px rgba(162, 155, 254, 0.35);
}
.ctb-dashboard .btn-start:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(162, 155, 254, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
    .ctb-content {
        flex-direction: column;
    }
    .ctb-dashboard .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: visible;
    }
    .ctb-scoreboard {
        flex-direction: column;
        padding: 1rem;
        min-height: auto;
    }
    .ctb-team-score {
        font-size: 2.5rem;
    }
}

/* Light theme overrides */
[data-theme="light"] .ctb-team-blue .ctb-team-label { color: #2b7de9; }
[data-theme="light"] .ctb-team-red .ctb-team-label { color: #e53935; }
[data-theme="light"] .ctb-team-blue .ctb-team-score { color: #2b7de9; }
[data-theme="light"] .ctb-team-red .ctb-team-score { color: #e53935; }
[data-theme="light"] .ctb-team-bar-wrap { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .ctb-log-entry { border-bottom-color: rgba(0, 0, 0, 0.05); }
[data-theme="light"] .ctb-log-entry.log-blue { color: #2b7de9; }
[data-theme="light"] .ctb-log-entry.log-red { color: #e53935; }
