/* ═══════════════════════════════════════════════════════════════════
   KING OF THE HILL SCREEN STYLES
   ═══════════════════════════════════════════════════════════════════ */

.koth-screen {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Connect prompts */
.koth-connect-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    text-align: center;
}

.koth-connect-prompt .connect-icon {
    font-size: 3rem;
}

/* Info bar */
.koth-info-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.koth-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.koth-info-item .info-label {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}

.koth-info-item .info-value {
    font-size: 1rem;
    font-weight: bold;
    color: var(--gold, #ffd700);
}

/* Throne area */
.koth-throne-area {
    background: linear-gradient(135deg, rgba(128, 0, 128, 0.2), rgba(255, 215, 0, 0.1));
    border: 2px solid var(--gold, #ffd700);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.throne-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #888);
}

.throne-loading .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--gold, #ffd700);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty throne */
.throne-empty {
    animation: pulse 2s ease-in-out infinite;
}

.throne-empty .throne-icon {
    font-size: 4rem;
    filter: grayscale(0.5);
    opacity: 0.7;
}

.throne-empty h3 {
    margin: 0.5rem 0 0.25rem;
    color: var(--gold, #ffd700);
}

.throne-empty p {
    margin: 0;
    color: var(--text-muted, #888);
    font-size: 0.875rem;
}

/* Occupied throne */
.throne-occupied {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.throne-occupied .king-crown {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

.king-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.king-wallet {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--gold, #ffd700);
}

.king-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted, #888);
}

.king-stats .auto-badge {
    background: rgba(128, 0, 255, 0.3);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.queue-info {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    width: 100%;
}

.queue-count {
    color: var(--text-muted, #888);
    font-size: 0.875rem;
}

/* Action area */
.koth-action-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.koth-no-deck {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
}

.koth-no-deck p {
    margin: 0 0 0.75rem;
    color: var(--warning, orange);
}

/* Queue status */
.koth-queue-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(128, 0, 255, 0.2);
    border-radius: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.koth-queue-status .queue-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* King controls (auto-defend toggle) */
.koth-king-controls {
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auto-defend-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.auto-defend-toggle input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auto-defend-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}

/* Challenger options (auto-battle toggle) */
.koth-challenger-options {
    padding: 0.75rem;
    background: rgba(128, 0, 255, 0.1);
    border: 1px solid rgba(128, 0, 255, 0.3);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.auto-battle-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.auto-battle-toggle input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auto-battle-hint {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-muted, #888);
}

/* Auto badge in throne display */
.auto-badge {
    background: rgba(128, 0, 255, 0.3);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Leaderboard section */
.koth-leaderboard-section {
    margin-top: 1.5rem;
}

.koth-leaderboard-section .section-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--gold, #ffd700);
}

.koth-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-loading,
.leaderboard-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted, #888);
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.875rem;
}

.leaderboard-row.is-me {
    background: rgba(128, 0, 255, 0.2);
    border: 1px solid rgba(128, 0, 255, 0.4);
}

.leaderboard-row .lb-rank {
    width: 2rem;
    text-align: center;
}

.leaderboard-row .lb-wallet {
    flex: 1;
    color: var(--text-muted, #ccc);
}

.leaderboard-row .lb-streak {
    color: var(--gold, #ffd700);
    font-weight: bold;
}

.leaderboard-row .lb-defenses {
    color: var(--text-muted, #888);
    font-size: 0.75rem;
}

/* Hub station positioning - KotH */
.station-koth {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.building-koth {
    position: absolute;
    bottom: 30%;
    left: 65%;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .koth-screen {
        padding: 0.75rem;
    }

    .koth-throne-area {
        padding: 1rem;
        min-height: 120px;
    }

    .throne-occupied .king-crown {
        font-size: 2.5rem;
    }

    .leaderboard-row {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
}
