/* Outpost Defense UI Styles */

/* Override screen centering for scrollable content */
#outpost-defense.screen.active {
    display: block !important;
    overflow-y: auto !important;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Wrapper needs padding for fixed footer */
.outpost-defense-wrapper {
    padding-bottom: 80px;
}

/* Main Container */
#outpost-defense-container {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    color: var(--text-primary);
    min-height: 100%;
}

/* Header */
.outpost-defense-header {
    text-align: center;
    margin-bottom: 2rem;
}

.outpost-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--text-accent);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(0, 191, 255, 0.8));
}

.challenge-tier-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Main Content Layout */
.outpost-defense-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* New Horizontal Status Bar Layout */
.left-column-teams,
.right-column-waves {
    flex: 1;
}

.status-dashboard-horizontal {
    width: 100%;
    margin-bottom: 2rem;
}

.status-grid-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.status-item-horizontal {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    text-align: center;
}

.status-item-horizontal .status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.status-item-horizontal .status-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-accent);
    font-weight: bold;
}

.countdown-item {
    flex: 1.5;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1) 0%, rgba(65, 105, 225, 0.1) 100%);
    border: 2px solid var(--player-primary);
}

.countdown-item .countdown-timer {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.8rem;
    color: var(--player-primary);
    font-weight: bold;
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.6);
}

/* Card Styling */
.card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border: 2px solid rgba(0, 191, 255, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--text-accent);
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 191, 255, 0.3);
    padding-bottom: 0.5rem;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: normal;
    font-family: 'Exo 2', sans-serif;
}

.subsection-title {
    font-family: 'Electrolize', sans-serif;
    font-size: 1.1rem;
    color: var(--player-accent);
    margin-bottom: 0.75rem;
}

/* Status Dashboard */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    text-align: center;
}

.status-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.status-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.8rem;
    color: var(--text-accent);
    font-weight: bold;
}

/* Countdown Timer */
.countdown-section {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1) 0%, rgba(65, 105, 225, 0.1) 100%);
    border: 2px solid var(--player-primary);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.countdown-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.countdown-timer {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2.5rem;
    color: var(--player-primary);
    font-weight: bold;
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.6);
}

.scheduler-status-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    letter-spacing: 0.08em;
}

.scheduler-status-text.processing {
    color: #00ff88;
}

.scheduler-status-text.idle {
    color: #ffaa00;
}

.scheduler-status-text.error {
    color: #ff5c5c;
}

/* Available Ships */
.available-ships-section {
    margin-bottom: 1.5rem;
}

.available-ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.ship-card {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.15) 0%, rgba(65, 105, 225, 0.15) 100%);
    border: 2px solid rgba(0, 191, 255, 0.4);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ship-card:hover {
    border-color: var(--player-primary);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
    transform: translateY(-2px);
}

.ship-card.assigned {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
}

.ship-card.assigned:hover {
    transform: none;
    box-shadow: none;
}

.ship-name {
    font-weight: bold;
    color: var(--text-accent);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.ship-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ship-level {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 191, 255, 0.3);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Teams Grid */
.teams-section {
    margin-bottom: 1.5rem;
}

.teams-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-row {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 191, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.team-label {
    font-family: 'Electrolize', sans-serif;
    font-size: 1rem;
    color: var(--player-accent);
    font-weight: bold;
}

.team-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.team-status.complete {
    color: #00ff88;
}

.team-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.team-slot {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed rgba(0, 191, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.team-slot.empty {
    cursor: pointer;
}

.team-slot.empty:hover {
    border-color: var(--player-primary);
    background: rgba(0, 191, 255, 0.1);
}

.team-slot.filled {
    border-style: solid;
    border-color: rgba(0, 191, 255, 0.6);
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2) 0%, rgba(65, 105, 225, 0.2) 100%);
}

.slot-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    text-align: center;
}

.slot-ship-name {
    font-weight: bold;
    color: var(--text-accent);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    text-align: center;
}

.slot-ship-level {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.remove-ship-btn {
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 69, 0, 0.3);
    border: 1px solid rgba(255, 69, 0, 0.6);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.remove-ship-btn:hover {
    background: rgba(255, 69, 0, 0.5);
    border-color: #ff4500;
}

/* Team Actions */
.team-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Electrolize', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--player-primary) 0%, var(--player-secondary) 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.5);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.locked-indicator {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 200, 100, 0.2) 100%);
    border: 2px solid #00ff88;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: #00ff88;
    font-weight: bold;
    font-size: 1rem;
}

.info-message {
    background: rgba(255, 170, 0, 0.1);
    border: 2px solid rgba(255, 170, 0, 0.5);
    color: #ffaa00;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

/* Wave Preview */
.waves-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.wave-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.wave-item.upcoming {
    border-color: rgba(255, 255, 255, 0.3);
}

.wave-item.current {
    border-color: var(--player-primary);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
    background: rgba(0, 191, 255, 0.1);
}

.wave-item.survived {
    border-color: rgba(0, 255, 136, 0.6);
    background: rgba(0, 255, 136, 0.1);
}

.wave-item.defeated {
    border-color: rgba(255, 69, 0, 0.6);
    background: rgba(255, 69, 0, 0.1);
    opacity: 0.7;
}

.wave-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.wave-title {
    font-family: 'Electrolize', sans-serif;
    font-size: 1.1rem;
    color: var(--text-accent);
    font-weight: bold;
}

.wave-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.wave-status-badge.upcoming {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.wave-status-badge.current {
    background: var(--player-primary);
    color: white;
}

.wave-status-badge.survived {
    background: #00ff88;
    color: #0a0e27;
}

.wave-status-badge.defeated {
    background: #ff4500;
    color: white;
}

.wave-enemies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.enemy-card {
    background: rgba(255, 69, 0, 0.1);
    border: 1px solid rgba(255, 69, 0, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
}

.enemy-name {
    font-weight: bold;
    color: var(--enemy-accent);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.enemy-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.enemy-level,
.enemy-agents,
.enemy-pilot {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Wave Test Buttons */
.wave-test-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 191, 255, 0.2);
}

.test-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.btn-test-team {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2) 0%, rgba(65, 105, 225, 0.2) 100%);
    border: 2px solid var(--player-primary);
    color: var(--text-accent);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'Electrolize', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-test-team:hover {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.3) 0%, rgba(65, 105, 225, 0.3) 100%);
    border-color: var(--player-accent);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
    transform: translateY(-2px);
}

/* Replay Button */
.wave-replay-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.btn-replay-wave {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(75, 0, 130, 0.2) 100%);
    border: 2px solid rgba(138, 43, 226, 0.6);
    color: #bb86fc;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Electrolize', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-replay-wave:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(75, 0, 130, 0.3) 100%);
    border-color: #bb86fc;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
    transform: translateY(-2px);
}

/* Unavailable replay button */
.btn-replay-unavailable {
    background: rgba(100, 100, 100, 0.2);
    border: 2px solid rgba(100, 100, 100, 0.4);
    color: #888;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Electrolize', sans-serif;
    font-size: 0.9rem;
    cursor: not-allowed;
    opacity: 0.6;
}

.battle-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Navigation */
.navigation-buttons {
    text-align: center;
}

/* Scrollbar Styling */
.available-ships-grid::-webkit-scrollbar,
.waves-list::-webkit-scrollbar {
    width: 8px;
}

.available-ships-grid::-webkit-scrollbar-track,
.waves-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.available-ships-grid::-webkit-scrollbar-thumb,
.waves-list::-webkit-scrollbar-thumb {
    background: rgba(0, 191, 255, 0.5);
    border-radius: 4px;
}

.available-ships-grid::-webkit-scrollbar-thumb:hover,
.waves-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 191, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .outpost-defense-content {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .status-grid-horizontal {
        flex-wrap: wrap;
    }
    
    .status-item-horizontal {
        flex: 1 1 calc(33.333% - 1rem);
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .outpost-defense-content {
        padding: 1rem;
    }
    
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .status-grid-horizontal {
        flex-direction: column;
    }
    
    .status-item-horizontal {
        width: 100%;
    }
    
    .team-slots {
        grid-template-columns: 1fr;
    }
    
    .available-ships-grid {
        grid-template-columns: 1fr;
    }
    
    .dev-buttons {
        flex-direction: column;
    }
}

/* Battle Status - Active Team Display */
.status-banner.active-team {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(53, 122, 189, 0.2) 100%);
    border-left: 4px solid var(--text-accent);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
}

.active-team-ships {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-ship-status {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.team-ship-status:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.team-ship-status.ship-dead {
    opacity: 0.5;
    border-color: rgba(255, 68, 68, 0.5);
}

.ship-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ship-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-accent);
}

.death-badge {
    background: rgba(255, 68, 68, 0.3);
    color: #ff4444;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 68, 68, 0.5);
}

.ship-hp-bar,
.ship-shield-bar {
    position: relative;
    margin-bottom: 0.5rem;
}

.hp-bar-bg,
.shield-bar-bg {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hp-bar-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 12px;
}

.shield-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.8), rgba(0, 191, 255, 0.5));
    transition: width 0.3s ease;
    border-radius: 12px;
}

.hp-text,
.shield-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 4px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    white-space: nowrap;
}

/* Leaderboard Styles */
.leaderboard-section {
    margin-top: 1rem;
}

.leaderboard-list {
    padding: 0;
}

.leaderboard-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
    transform: translateX(4px);
}

.leaderboard-entry.current-player {
    border-color: rgba(255, 170, 0, 0.6);
    background: rgba(255, 170, 0, 0.1);
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
    color: var(--text-accent);
}

.leaderboard-player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.player-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-accent);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-badge.ready {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.5);
}

.status-badge.not-ready {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.5);
}

.you-badge {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.3), rgba(255, 170, 0, 0.2));
    color: #ffaa00;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid rgba(255, 170, 0, 0.5);
}

.player-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.player-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    .leaderboard-entry {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .leaderboard-rank {
        font-size: 1.2rem;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Full Leaderboard Screen Styles */
#outpost-leaderboard.screen.active {
    display: block !important;
    overflow-y: auto !important;
}

.outpost-leaderboard-header {
    text-align: center;
    margin-bottom: 1rem;
}

.leaderboard-main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    color: var(--text-accent);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.leaderboard-main-title .title-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.leaderboard-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.leaderboard-event-banner {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
}

.event-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.event-info-item {
    text-align: center;
}

.info-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-accent);
}

.leaderboard-main-content {
    padding: 2rem;
    min-height: 400px;
}

.leaderboard-grid-full {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-entry-full {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.leaderboard-entry-full:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
    transform: translateX(8px);
}

.leaderboard-entry-full.rank-gold {
    border-color: rgba(255, 215, 0, 0.6);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(0, 0, 0, 0.3));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.leaderboard-entry-full.rank-silver {
    border-color: rgba(192, 192, 192, 0.6);
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), rgba(0, 0, 0, 0.3));
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}

.leaderboard-entry-full.rank-bronze {
    border-color: rgba(205, 127, 50, 0.6);
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), rgba(0, 0, 0, 0.3));
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.leaderboard-entry-full.current-player {
    border-color: rgba(255, 170, 0, 0.8);
    background: rgba(255, 170, 0, 0.15);
    box-shadow: 0 0 25px rgba(255, 170, 0, 0.4);
}

.leaderboard-rank-full {
    font-size: 2.5rem;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
    color: var(--text-accent);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.leaderboard-player-info-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-name-row-full {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.player-name-full {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-accent);
}

.player-stats-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-item-full {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item-full.highlight {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.1);
}

.stat-item-full .stat-icon {
    font-size: 1.5rem;
}

.stat-item-full .stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item-full .stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
}

@media (max-width: 1200px) {
    .event-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .player-stats-full {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .leaderboard-main-title {
        font-size: 2rem;
    }
    
    .event-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .leaderboard-entry-full {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .leaderboard-rank-full {
        font-size: 2rem;
    }
    
    .player-stats-full {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

/* ============================================
   WAVE REWARD CLAIM SYSTEM
   ============================================ */

/* Claim All Container */
.claim-all-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
}

.btn-claim-all {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #1a1a2e;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    animation: claim-pulse 2s infinite;
}

.btn-claim-all:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

@keyframes claim-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(255, 215, 0, 0.6); }
}

/* Individual Claim Button */
.btn-claim-reward {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    animation: claim-glow 1.5s infinite;
}

.btn-claim-reward:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

@keyframes claim-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(74, 222, 128, 0.3); }
    50% { box-shadow: 0 0 15px rgba(74, 222, 128, 0.6); }
}

/* Reward Preview */
.reward-preview {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #ffd700;
}

/* Claim Summary Modal */
.claim-summary-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    text-align: center;
}

.claim-summary-modal h2 {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.claim-count {
    color: #a0a0a0;
    margin-bottom: 1.5rem;
}

.claim-totals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.claim-total-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.claim-icon {
    font-size: 1.5rem;
}

.claim-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
}

.claim-label {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.pilot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-left: 3.5rem;
}

.pilot-name {
    background: rgba(0, 191, 255, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #00bfff;
}

.claim-runs-summary {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.run-summary {
    color: #a0a0a0;
    margin: 0.4rem 0;
    font-size: 0.9rem;
}

.btn-close-modal {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
}

/* Modal Overlay - Scoped to outpost defense only */
.outpost-defense-wrapper .modal-overlay,
#outpost-defense .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Battle History Claim Buttons */
.battle-record {
    grid-template-columns: auto 1fr auto auto !important;
}

.battle-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.battle-record .btn-claim-reward {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: claim-glow 1.5s infinite;
}

.battle-record .btn-claim-reward:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.battle-record .reward-preview {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #ffd700;
    text-align: center;
}

/* =============================================
   TRANSMISSION INTRO OVERLAY STYLES
   ============================================= */

/* Full screen overlay for transmission intro */
.transmission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 15000;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.transmission-overlay.visible {
    opacity: 1;
}

/* Incoming Transmission Banner - Blinking */
.transmission-banner {
    background: linear-gradient(135deg, #00cc44 0%, #00ff55 50%, #00cc44 100%);
    color: #000;
    padding: 15px 60px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 85, 0.6),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: transmission-pulse 0.8s ease-in-out infinite alternate;
    text-shadow: 0 0 10px rgba(0, 50, 0, 0.5);
}

@keyframes transmission-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 255, 85, 0.6),
                    inset 0 0 20px rgba(255, 255, 255, 0.2);
    }
    100% {
        transform: scale(1.02);
        box-shadow: 0 0 50px rgba(0, 255, 85, 0.9),
                    inset 0 0 30px rgba(255, 255, 255, 0.3);
    }
}

/* Banner Style Variants */
.transmission-banner-green {
    background: linear-gradient(135deg, #00cc44 0%, #00ff55 50%, #00cc44 100%);
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 85, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 50, 0, 0.5);
    animation: transmission-pulse-green 0.8s ease-in-out infinite alternate;
}

@keyframes transmission-pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 30px rgba(0, 255, 85, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2); }
    100% { transform: scale(1.02); box-shadow: 0 0 50px rgba(0, 255, 85, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.3); }
}

.transmission-banner-red {
    background: linear-gradient(135deg, #cc2200 0%, #ff4433 50%, #cc2200 100%);
    color: #fff;
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(50, 0, 0, 0.8);
    animation: transmission-pulse-red 0.8s ease-in-out infinite alternate;
}

@keyframes transmission-pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 50, 50, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2); }
    100% { transform: scale(1.02); box-shadow: 0 0 50px rgba(255, 50, 50, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.3); }
}

.transmission-banner-blue {
    background: linear-gradient(135deg, #0066cc 0%, #00aaff 50%, #0066cc 100%);
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 30, 80, 0.8);
    animation: transmission-pulse-blue 0.8s ease-in-out infinite alternate;
}

@keyframes transmission-pulse-blue {
    0% { transform: scale(1); box-shadow: 0 0 30px rgba(0, 150, 255, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2); }
    100% { transform: scale(1.02); box-shadow: 0 0 50px rgba(0, 150, 255, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.3); }
}

.transmission-banner-gold {
    background: linear-gradient(135deg, #cc9900 0%, #ffcc00 50%, #cc9900 100%);
    color: #000;
    box-shadow: 0 0 30px rgba(255, 200, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 10px rgba(80, 60, 0, 0.5);
    animation: transmission-pulse-gold 0.8s ease-in-out infinite alternate;
}

@keyframes transmission-pulse-gold {
    0% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 200, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.3); }
    100% { transform: scale(1.02); box-shadow: 0 0 50px rgba(255, 200, 0, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.4); }
}

/* Communications Officer Image Container */
.transmission-officer-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.transmission-officer-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 191, 255, 0.5));
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.transmission-officer-image.visible {
    opacity: 1;
    transform: scale(1);
}

/* Message Box - The black area for typewriter text */
.transmission-message-box {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    min-height: 140px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(0, 191, 255, 0.4);
    border-radius: 8px;
    padding: 20px 25px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8),
                inset 0 0 30px rgba(0, 20, 40, 0.5);
}

.transmission-message-text {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #00ffcc;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
    min-height: 80px;
}

.transmission-message-text .commander-name,
.transmission-message-text .outpost-name,
.transmission-message-text .officer-name {
    color: #ffcc00;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.transmission-message-text .mission-label {
    color: #ff6b6b;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.transmission-message-text .highlight {
    color: #00ff88;
    font-weight: bold;
}

/* Typing cursor effect */
.typing-cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: #00ffcc;
    margin-left: 2px;
    animation: cursor-blink 0.7s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Continue Button */
.transmission-continue-btn {
    position: absolute;
    bottom: 12px;
    right: 15px;
    background: linear-gradient(135deg, #0088cc 0%, #00aaff 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 136, 204, 0.4);
}

.transmission-continue-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.transmission-continue-btn:hover {
    background: linear-gradient(135deg, #00aaff 0%, #00ccff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.6);
}

.transmission-continue-btn:active {
    transform: translateY(0);
}

/* End Transmission signature */
.transmission-signature {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 191, 255, 0.2);
}

/* Static/glitch effect overlay (optional enhancement) */
.transmission-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0.3;
}

/* Skip button (top right) */
.transmission-skip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transmission-skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Button Row Container */
.transmission-button-row {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
}

/* Override continue button positioning when in button row */
.transmission-button-row .transmission-continue-btn {
    position: relative;
    bottom: auto;
    right: auto;
}

/* Later Button */
.transmission-later-btn {
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    color: #aaa;
    border: none;
    padding: 6px 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.transmission-later-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.transmission-later-btn:hover {
    background: linear-gradient(135deg, #5a5a5a 0%, #4a4a4a 100%);
    color: #ccc;
    transform: translateY(-2px);
}

.transmission-later-btn:active {
    transform: translateY(0);
}

/* Next Message Button */
.transmission-next-msg-btn {
    background: linear-gradient(135deg, #00aa55 0%, #00cc66 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    border-radius: 4px;
    cursor: pointer;
    opacity: 1;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 170, 85, 0.4);
}

.transmission-next-msg-btn:hover {
    background: linear-gradient(135deg, #00cc66 0%, #00dd77 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 102, 0.6);
}

.transmission-next-msg-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .transmission-banner {
        font-size: 1.2rem;
        padding: 12px 30px;
    }
    
    .transmission-officer-container {
        max-width: 95%;
    }
    
    .transmission-message-box {
        width: 90%;
        padding: 15px 18px;
    }
    
    .transmission-message-text {
        font-size: 0.9rem;
    }
}

/* =============================================
   COMMAND COMMUNICATIONS BUTTON STYLES
   ============================================= */

/* COMMS Button - Normal State */
#comms-btn {
    position: relative;
    background: linear-gradient(135deg, #2a3a4a 0%, #1a2a3a 100%);
    border: 2px solid #4a5a6a;
    color: #8899aa;
    transition: all 0.3s ease;
}

#comms-btn:hover {
    background: linear-gradient(135deg, #3a4a5a 0%, #2a3a4a 100%);
    border-color: #6a7a8a;
    color: #aabbcc;
}

/* COMMS Button - Has Messages State */
#comms-btn.has-messages {
    background: linear-gradient(135deg, #1a4a2a 0%, #0a3a1a 100%);
    border-color: #00ff55;
    color: #00ff88;
    animation: comms-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 85, 0.3);
    /* Extra right padding to prevent badge overlap with button text */
    padding-right: 2rem;
}

#comms-btn.has-messages:hover {
    background: linear-gradient(135deg, #2a5a3a 0%, #1a4a2a 100%);
    box-shadow: 0 0 25px rgba(0, 255, 85, 0.5);
}

@keyframes comms-pulse {
    0%, 100% {
        border-color: #00ff55;
        box-shadow: 0 0 15px rgba(0, 255, 85, 0.3);
    }
    50% {
        border-color: #88ffaa;
        box-shadow: 0 0 25px rgba(0, 255, 85, 0.6);
    }
}

/* COMMS Badge */
.comms-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ff4444 0%, #cc2222 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
    animation: badge-bounce 0.5s ease;
}

@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Envelope icon styling */
#comms-btn .comms-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Message count indicator in transmission */
.transmission-message-count {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 150, 255, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.6);
    border-radius: 12px;
    padding: 4px 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: #88ccff;
    letter-spacing: 0.05em;
}

/* =============================================
   FLOATING NEW MESSAGE INDICATOR
   ============================================= */

.comms-floating-indicator {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1a4a2a 0%, #0a3a1a 100%);
    border: 2px solid #00ff55;
    color: #00ff88;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 85, 0.4);
    animation: comms-float-pulse 2s ease-in-out infinite;
}

.comms-floating-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.comms-floating-indicator:hover {
    background: linear-gradient(135deg, #2a5a3a 0%, #1a4a2a 100%);
    box-shadow: 0 0 30px rgba(0, 255, 85, 0.6);
    transform: translateX(-50%) translateY(-2px);
}

.comms-floating-indicator.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.comms-float-icon {
    margin-right: 8px;
}

@keyframes comms-float-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 85, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 85, 0.6);
    }
}

/* ==========================================
   REDUCED MOTION ACCESSIBILITY
   Respects user preference for reduced motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    /* Disable pulsing/blinking animations */
    .comms-floating-indicator,
    #comms-btn.has-messages,
    .comms-badge,
    .transmission-banner {
        animation: none !important;
    }
    
    /* Keep static visual indicators instead */
    .comms-floating-indicator {
        box-shadow: 0 0 20px rgba(0, 255, 85, 0.5);
    }
    
    #comms-btn.has-messages {
        box-shadow: 0 0 20px rgba(0, 255, 85, 0.4);
    }
    
    .transmission-banner {
        box-shadow: 0 0 20px rgba(0, 255, 85, 0.4);
    }
}