/* ===== Snake Loading Overlay ===== */

.snake-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}

.snake-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close button (only visible in fun/sidebar mode) */
.snake-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.1s;
}

.snake-close:hover {
    color: var(--text-primary);
}

/* Container */
.snake-container {
    width: 320px;
    text-align: center;
}

/* Header */
.snake-header {
    margin-bottom: 20px;
}

.snake-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Loading indicator */
.snake-loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.snake-loading-dot {
    width: 4px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 2px;
    animation: snake-pulse 1.2s ease-in-out infinite;
}

.snake-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.snake-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes snake-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.snake-loading-text {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 6px;
}

/* Scoreboard */
.snake-scoreboard {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.snake-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.snake-score-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.snake-score-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Canvas */
.snake-canvas {
    display: block;
    margin: 0 auto 16px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
}

/* Status line */
.snake-status {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    min-height: 20px;
}

/* Claude quip */
.snake-quip {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
    min-height: 18px;
    margin-top: 4px;
}

/* Leaderboard */
.snake-leaderboard {
    margin-top: 16px;
    text-align: center;
}

.snake-leaderboard-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.snake-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.snake-leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-secondary, #f8f9fa);
}

.snake-leaderboard-rank {
    font-weight: 600;
    width: 20px;
    text-align: left;
    color: var(--text-secondary);
}

.snake-leaderboard-name {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snake-leaderboard-score {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 12px;
}

.snake-leaderboard-date {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: 8px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .snake-container {
        width: 280px;
    }
    .snake-canvas {
        width: 210px;
        height: 210px;
    }
    .snake-close {
        top: 16px;
        right: 16px;
    }
}
