/* ========== Games Hero ========== */
.games-hero {
    padding: 120px 0 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.games-hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff, #a855f7, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}
.games-hero-title .title-icon {
    font-size: 2rem;
    -webkit-text-fill-color: #00d4ff;
}
.games-hero-desc {
    color: #8888aa;
    font-size: 1.1rem;
    font-family: 'Rajdhani', sans-serif;
}

/* ========== Game Cards Grid ========== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.game-card {
    background: rgba(10, 10, 30, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 16px;
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(168,85,247,0.05));
    opacity: 0;
    transition: opacity 0.3s;
}
.game-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15), 0 0 60px rgba(168, 85, 247, 0.1);
}
.game-card:hover::before { opacity: 1; }
.game-card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.game-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: #e0e0ff;
    margin-bottom: 8px;
}
.game-card p {
    color: #7777aa;
    font-size: 0.9rem;
}

/* ========== Game Workspace ========== */
.game-workspace {
    position: relative;
    z-index: 1;
}
.workspace-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.btn-sound-toggle {
    font-size: 1rem;
    padding: 6px 12px;
}
.btn-sound-toggle:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
}
.auto-submit-hint {
    color: #6666aa;
    font-size: 0.8rem;
    margin-bottom: 12px;
}
.game-panel-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #e0e0ff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.game-panel-title i {
    color: #00d4ff;
}

/* ========== Game Layout ========== */
.game-layout {
    display: grid;
    grid-template-columns: auto 280px;
    gap: 24px;
    align-items: start;
}
.game-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-area canvas {
    background: rgba(10, 10, 30, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.08);
    max-width: 100%;
    height: auto;
    touch-action: none;
}
.game-score-display {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: #00d4ff;
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}
.lives-display {
    color: #f472b6;
    text-shadow: 0 0 12px rgba(244, 114, 182, 0.4);
}
.game-controls-hint {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #6666aa;
}
.game-controls-hint i {
    color: #a855f7;
    margin-right: 4px;
}
.game-buttons {
    margin-top: 12px;
}

/* ========== Game Over Overlay ========== */
.game-over-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 30, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}
.game-over-content {
    text-align: center;
}
.game-over-content h3 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}
.final-score {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: #00d4ff;
    margin-bottom: 20px;
}
.game-over-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========== Leaderboard ========== */
.game-leaderboard {
    background: rgba(10, 10, 30, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
}
.game-leaderboard h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    color: #a855f7;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-leaderboard h3 i { color: #f472b6; }
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.leaderboard-table th {
    color: #8888aa;
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    text-align: left;
    font-family: 'Rajdhani', sans-serif;
}
.leaderboard-table td {
    padding: 6px 8px;
    color: #ccccee;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.leaderboard-table tr:nth-child(1) td { color: #ffd700; }
.leaderboard-table tr:nth-child(2) td { color: #c0c0c0; }
.leaderboard-table tr:nth-child(3) td { color: #cd7f32; }
.leaderboard-table .empty-cell {
    text-align: center;
    color: #555588;
    padding: 16px;
}

/* ========== Auth Modal ========== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.auth-modal {
    background: rgba(15, 15, 35, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.08);
}
.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.auth-modal-close:hover { color: #f472b6; }
.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    padding-bottom: 0;
}
.auth-tab {
    background: none;
    border: none;
    color: #6666aa;
    font-size: 0.95rem;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}
.auth-tab.active {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}
.auth-tab:hover { color: #a855f7; }
.auth-field {
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    color: #8888aa;
    font-size: 0.85rem;
    margin-bottom: 6px;
}
.auth-field label i {
    color: #a855f7;
    margin-right: 4px;
    width: 16px;
}
.auth-field input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 8px;
    color: #e0e0ff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.auth-field input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}
.captcha-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.captcha-row input { flex: 1; }
.captcha-img {
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(0, 212, 255, 0.15);
}
.btn-captcha-refresh {
    background: none;
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-captcha-refresh:hover {
    background: rgba(0, 212, 255, 0.1);
}
.btn-auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
}
.btn-resend {
    width: 100%;
    margin-top: 8px;
    font-size: 0.85rem;
}
.auth-info {
    color: #8888aa;
    font-size: 0.9rem;
    margin-bottom: 16px;
    text-align: center;
}
.auth-message {
    margin-top: 12px;
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
}
.auth-message.success { color: #22d3ee; }
.auth-message.error { color: #f472b6; }

/* ========== Player Badge (Navbar) ========== */
.nav-player-area {
    display: flex;
    align-items: center;
    margin-left: 8px;
}
.btn-player-login {
    background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(168,85,247,0.15));
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}
.btn-player-login:hover {
    background: linear-gradient(135deg, rgba(0,212,255,0.25), rgba(168,85,247,0.25));
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}
.player-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 4px 12px 4px 10px;
    color: #00d4ff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}
.player-badge i { color: #a855f7; }
.btn-player-logout {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    transition: color 0.2s;
}
.btn-player-logout:hover { color: #f472b6; }

/* ========== Toast ========== */
.games-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 15, 40, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #e0e0ff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 2000;
    transition: transform 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
}
.games-toast.show {
    transform: translateX(-50%) translateY(0);
}
.games-toast.error {
    border-color: rgba(244, 114, 182, 0.5);
    color: #f472b6;
}

/* ========== Candy Crush ========== */
.candy-mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.candy-mode-btn.active {
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    border-color: transparent;
}
.candy-info-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1rem;
}
.candy-goal-display {
    color: #a855f7;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.candy-moves-display {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}
.candy-ice-display {
    color: #22d3ee;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}
.candy-rush-desc {
    color: #8888aa;
    margin-bottom: 16px;
    text-align: center;
}
.candy-rush-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.candy-rush-timer {
    color: #f472b6;
    text-shadow: 0 0 12px rgba(244, 114, 182, 0.4);
    font-size: 1.2rem;
}
.candy-rush-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.candy-rush-tab {
    background: none;
    border: none;
    color: #6666aa;
    font-size: 0.8rem;
    padding: 4px 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}
.candy-rush-tab.active {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}
.candy-rush-tab:hover { color: #a855f7; }
.candy-rush-select {
    padding: 40px 20px;
    text-align: center;
}

/* ========== Restart Level Button ========== */
.btn-restart-level {
    margin-left: auto;
    font-size: 0.8rem;
    padding: 4px 12px;
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}
.btn-restart-level:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}

/* ========== Candy Tools Bar ========== */
.candy-tools-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 8px;
}
.candy-tool-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    background: rgba(10, 10, 30, 0.6);
    color: #00d4ff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.candy-tool-btn:hover:not(:disabled) {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
    transform: scale(1.1);
}
.candy-tool-btn.active {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.3);
}
.candy-tool-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(100, 100, 130, 0.3);
    color: #555;
}
.tool-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #a855f7, #f472b6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
}

/* ========== Candy Help Modal ========== */
.btn-candy-help {
    margin-left: auto;
    padding: 6px 12px;
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.3);
    font-size: 1rem;
}
.btn-candy-help:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}
.candy-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.candy-help-modal {
    background: rgba(15, 15, 35, 0.97);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 28px 32px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.08);
}
.candy-help-modal::-webkit-scrollbar { width: 6px; }
.candy-help-modal::-webkit-scrollbar-track { background: transparent; }
.candy-help-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.2);
    border-radius: 3px;
}
.candy-help-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.candy-help-close:hover { color: #f472b6; }
.candy-help-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00d4ff, #a855f7, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.candy-help-title i {
    -webkit-text-fill-color: #00d4ff;
}
.candy-help-section {
    margin-bottom: 18px;
}
.candy-help-section h4 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.candy-help-section h4 i {
    color: #a855f7;
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}
.candy-help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.candy-help-section li {
    color: #b0b0cc;
    font-size: 0.88rem;
    padding: 4px 0 4px 22px;
    position: relative;
    line-height: 1.5;
}
.candy-help-section li::before {
    content: '▸';
    position: absolute;
    left: 6px;
    color: #a855f7;
    font-size: 0.75rem;
}
.candy-help-section li strong {
    color: #e0e0ff;
}

/* ========== Fade In ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .games-hero { padding: 100px 0 24px; }
    .games-hero-title { font-size: 1.8rem; }
    .game-layout {
        grid-template-columns: 1fr;
    }
    .game-leaderboard {
        order: -1;
    }
    .game-area canvas {
        max-width: 100%;
    }
    .game-over-overlay {
        border-radius: 12px;
    }
    .auth-modal {
        width: 95%;
        padding: 24px 20px;
    }
    .games-grid {
        grid-template-columns: 1fr;
    }
    .game-workspace {
        padding-bottom: 80px;
    }
}
@media (max-width: 480px) {
    .game-score-display { font-size: 1rem; }
    .game-controls-hint { flex-direction: column; gap: 4px; text-align: center; }
}

/* ========== Collect Progress ========== */
.candy-collect-wrap {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}
.candy-collect-item {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    padding: 4px 12px;
    color: #e0e0ff;
    font-size: 0.95rem;
}

/* ========== Level Map Button ========== */
.btn-map-level {
    font-size: 0.8rem;
    padding: 4px 10px;
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.3);
}
.btn-map-level:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

/* ========== Extra Buttons (achievement, theme) ========== */
.btn-candy-extra {
    padding: 6px 12px;
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.3);
    font-size: 1rem;
}
.btn-candy-extra:hover {
    background: rgba(244, 114, 182, 0.1);
    border-color: rgba(244, 114, 182, 0.5);
    box-shadow: 0 0 12px rgba(244, 114, 182, 0.15);
}

/* ========== Celebration Overlay ========== */
.candy-celebration {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 20, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: celeFadeIn 0.4s ease;
}
.candy-celebration.hidden { display: none; }
@keyframes celeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.celebration-content {
    text-align: center;
    position: relative;
}
.celebration-stars {
    font-size: 3.5rem;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 12px;
}
.cele-star {
    display: inline-block;
    animation: starBounce 0.5s ease both;
}
.cele-star.lit {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.7), 0 0 40px rgba(251, 191, 36, 0.3);
}
.cele-star.dim {
    color: #333355;
    text-shadow: none;
}
@keyframes starBounce {
    0% { transform: scale(0) rotate(-30deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
.celebration-text {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff, #a855f7, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.celebration-level {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    color: #8888aa;
    margin-bottom: 24px;
}
.celebration-fireworks {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}
.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkBurst 1s ease-out both;
    animation-delay: var(--delay, 0s);
}
@keyframes fireworkBurst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx, 40px), var(--ty, -40px)) scale(0); opacity: 0; }
}
.btn-next-level {
    font-size: 1.1rem;
    padding: 12px 32px;
}

/* ========== Level Map ========== */
.candy-level-map {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 20, 0.92);
    backdrop-filter: blur(6px);
    z-index: 1100;
    overflow-y: auto;
    padding: 80px 20px 40px;
    animation: celeFadeIn 0.3s ease;
}
.candy-level-map.hidden { display: none; }
.level-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto 24px;
}
.level-map-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: #e0e0ff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.level-map-header h3 i { color: #a855f7; }
.btn-close-map {
    background: none;
    border: 1px solid rgba(244, 114, 182, 0.3);
    color: #f472b6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}
.btn-close-map:hover {
    background: rgba(244, 114, 182, 0.15);
    border-color: rgba(244, 114, 182, 0.6);
}
.level-map-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}
.level-node {
    width: 100%;
    aspect-ratio: 1;
    max-width: 80px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 212, 255, 0.2);
    background: rgba(10, 10, 30, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.level-node .level-num {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e0e0ff;
}
.level-node .level-stars {
    font-size: 0.55rem;
    color: #fbbf24;
    letter-spacing: 1px;
}
.level-node .level-stars-empty {
    font-size: 0.6rem;
    color: #00d4ff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}
.level-node.cleared {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.06);
}
.level-node.cleared:hover {
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
    transform: scale(1.08);
}
.level-node.current {
    border-color: #a855f7;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4), 0 0 32px rgba(168, 85, 247, 0.15);
    animation: currentGlow 2s ease-in-out infinite;
}
@keyframes currentGlow {
    0%, 100% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 24px rgba(168, 85, 247, 0.6), 0 0 40px rgba(168, 85, 247, 0.2); }
}
.level-node.current:hover {
    transform: scale(1.08);
}
.level-node.locked {
    border-color: rgba(60, 60, 80, 0.3);
    background: rgba(20, 20, 35, 0.5);
    cursor: not-allowed;
    opacity: 0.5;
}
.level-node.locked .level-num {
    color: #444466;
    font-size: 0.9rem;
}

/* ========== Candy Generic Modal Overlay ========== */
.candy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: celeFadeIn 0.3s ease;
}
.candy-modal-overlay.hidden { display: none; }
.candy-modal {
    background: rgba(15, 15, 35, 0.97);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 28px 32px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.08);
}
.candy-modal::-webkit-scrollbar { width: 6px; }
.candy-modal::-webkit-scrollbar-track { background: transparent; }
.candy-modal::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 3px; }
.candy-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.candy-modal-close:hover { color: #f472b6; }
.candy-modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00d4ff, #a855f7, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.candy-modal-title i { -webkit-text-fill-color: #00d4ff; }

/* ========== Achievement Grid ========== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.achievement-item {
    text-align: center;
    padding: 14px 6px;
    border-radius: 12px;
    border: 1px solid rgba(60, 60, 80, 0.3);
    background: rgba(20, 20, 40, 0.5);
    transition: all 0.2s;
}
.achievement-item.unlocked {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.06);
}
.achievement-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}
.achievement-item.unlocked .achievement-icon {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}
.achievement-item:not(.unlocked) .achievement-icon {
    color: #444466;
}
.achievement-name {
    font-size: 0.75rem;
    color: #8888aa;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}
.achievement-item.unlocked .achievement-name { color: #e0e0ff; }

/* ========== Theme Grid ========== */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.theme-item {
    text-align: center;
    padding: 18px 12px;
    border-radius: 12px;
    border: 1px solid rgba(60, 60, 80, 0.3);
    background: rgba(20, 20, 40, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}
.theme-item.unlocked:hover {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.15);
}
.theme-item.active {
    border-color: #a855f7;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}
.theme-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}
.theme-preview {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}
.theme-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.theme-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #e0e0ff;
}
.theme-hint {
    font-size: 0.7rem;
    color: #6666aa;
    margin-top: 4px;
}

/* ========== Vampire Survivors ========== */
.vampire-info-bar {
    display: flex;
    gap: 20px;
    align-items: center;
}
.vampire-kills-display {
    color: #f472b6;
    text-shadow: 0 0 12px rgba(244, 114, 182, 0.4);
}
.vampire-final-kills-text {
    color: #f472b6;
    font-size: 1rem;
    margin-bottom: 12px;
}
.vampire-upgrade-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 20, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 15;
    animation: celeFadeIn 0.3s ease;
}
.vampire-upgrade-overlay.hidden { display: none; }
.upgrade-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00d4ff, #a855f7, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}
.upgrade-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 85%;
    max-width: 300px;
}
.upgrade-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.upgrade-option:hover {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 212, 255, 0.12);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.15);
    transform: scale(1.03);
}
.upgrade-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.upgrade-info {
    flex: 1;
    min-width: 0;
}
.upgrade-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #e0e0ff;
}
.upgrade-desc {
    font-size: 0.75rem;
    color: #8888aa;
}

/* ========== Vampire Stats Panel ========== */
.vs-stats-panel {
    max-width: 280px;
    width: 100%;
}
.vs-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    color: #e0e0ff;
}
.vs-summary strong {
    color: #00d4ff;
    font-size: 1.1rem;
}
.vs-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin-bottom: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}
.vs-stat {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}
.vs-label {
    color: #8888aa;
    font-size: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}
.vs-value {
    color: #e0e0ff;
    font-size: 0.8rem;
    font-family: 'Orbitron', monospace;
}
.vs-weapon-kills {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}
.vs-wk-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #ccccee;
    padding: 1px 0;
}
.vs-wk-row span:first-child {
    color: #a855f7;
}

/* ========== Responsive additions ========== */
@media (max-width: 768px) {
    .level-map-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .achievements-grid { grid-template-columns: repeat(3, 1fr); }
    .celebration-stars { font-size: 2.5rem; }
    .celebration-text { font-size: 1.5rem; }
}
@media (max-width: 480px) {
    .level-map-grid { grid-template-columns: repeat(3, 1fr); }
    .achievements-grid { grid-template-columns: repeat(3, 1fr); }
    .theme-grid { grid-template-columns: 1fr; }
}

/* ========== Vampire Co-op Mode ========== */
.vampire-mode-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.vampire-mode-btn.active {
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    border-color: transparent;
}

/* Co-op Lobby */
.coop-lobby {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}
.coop-lobby-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}
.coop-join-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.coop-code-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 8px;
    padding: 8px 14px;
    color: #e0e0ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    width: 140px;
    text-align: center;
}
.coop-code-input::placeholder {
    color: #666;
    letter-spacing: 0;
    font-size: 0.8rem;
}

/* Waiting Room */
.coop-waiting {
    background: rgba(10,10,30,0.7);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 16px;
    padding: 24px;
    margin-top: 16px;
}
.coop-room-code {
    font-family: 'Rajdhani', sans-serif;
    color: #8888aa;
    margin-bottom: 16px;
}
.coop-code-display {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 6px;
    margin-left: 8px;
}
.coop-players-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}
.coop-player-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    color: #e0e0ff;
}
.coop-player-slot i {
    font-size: 1.2rem;
}
.coop-host-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #fbbf24, #ff8c42);
    color: #0a0a1a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.coop-lobby-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

/* Co-op Game Area adjustments */
#coopGameArea .vampire-info-bar {
    gap: 16px;
}
