:root {
    /* These variables will be set by the theme system */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-white: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --border-light: #dadce0;
    --border-transparent: rgba(255, 255, 255, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --achievement-gold: rgba(255, 215, 0, 0.9);
    --achievement-gold-border: rgba(255, 215, 0, 0.3);
    --blur-light: 5px;
    --blur-medium: 10px;
    --blur-heavy: 20px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fix for mobile Safari */
:root {
    height: -webkit-fill-available;
}

html {
    height: -webkit-fill-available;
}

body {
    background: var(--primary-gradient);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    /* mobile viewport bug fix */
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    /* Add safe area insets */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Login Container */
.login-container {
    position: absolute;
    top: 40px;
    right: 20px;
    z-index: 1005;
    display: flex;
    flex-direction: column;
}

.login-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Desktop layout */
@media (min-width: 769px) {
    .login-row {
        flex-direction: row;
        align-items: flex-end;
    }
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.settings-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: var(--transition-fast);
    margin: 0 auto;
    margin-top: 10px;
}

.settings-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

.settings-btn:active {
    transform: translateY(0);
}

.settings-icon {
    width: 20px;
    height: 20px;
}

/* Login Button */
.login-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: var(--transition-fast);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Mobile Login Container */
@media (max-width: 768px) {
    .login-container {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: auto;
        background: rgba(0, 0, 0, 0.85);
        padding: 16px;
        border-radius: 16px;
        z-index: 1001;
        backdrop-filter: blur(var(--blur-medium));
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        width: auto;
        min-width: 280px;
        max-width: 90%;
        z-index: 1005;
        transition: all 0.3s ease;
    }

    /* Miniaturized state */
    .login-container.miniaturized {
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 60px;
        min-width: 60px;
        max-width: 60px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        overflow: hidden;
    }

    

    .login-container.miniaturized .login-row {
        display: none;
    }

    .login-container.miniaturized .mobile-privacy-link {
        display: none;
    }

    /* Miniaturize button */
    .miniaturize-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 20px;
        height: 20px;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        transition: all 0.2s ease;
        z-index: 10;
    }

    .miniaturize-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        color: rgba(255, 255, 255, 1);
        transform: scale(1.1);
    }

    .miniaturize-btn:active {
        transform: scale(0.95);
    }

    /* Hide miniaturize button when miniaturized */
    .login-container.miniaturized .miniaturize-btn {
        display: none;
    }

    /* Expand button (shown when miniaturized) */
    .expand-btn {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        display: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.8);
        font-size: 16px;
        transition: all 0.2s ease;
        z-index: 10;
    }

    .expand-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        color: rgba(255, 255, 255, 1);
        transform: translate(-50%, -50%) scale(1.1);
    }

    .expand-btn:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

    /* Show expand button when miniaturized */
    .login-container.miniaturized .expand-btn {
        display: flex;
    }

    /* Miniaturized state for logged-in container - stays bottom center on mobile */
    .login-container.logged-in.miniaturized {
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        top: auto;
        width: 60px;
        height: 60px;
        min-width: 60px;
        max-width: 60px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        overflow: hidden;
    }

    .login-container.logged-in.miniaturized .logout-btn,
    .login-container.logged-in.miniaturized .trophy-btn {
        display: none;
    }

    .login-container.logged-in.miniaturized .miniaturize-btn {
        display: none;
    }

    /* Adjust hotbar and W key position when login is miniaturized */
    .login-container.miniaturized ~ .hotbar,
    .login-container.logged-in.miniaturized ~ .hotbar {
        bottom: 100px;
        transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .login-container.miniaturized ~ .key-container,
    .login-container.logged-in.miniaturized ~ .key-container {
        margin-bottom: 95px;
        transition: margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

    .login-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .mobile-close-btn {
        position: fixed;
        top: 20px !important;
        right: 20px !important;
        background: rgba(0, 0, 0, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 50%;
        width: 40px !important;
        height: 40px !important;
        color: white !important;
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 1010;
        transition: var(--transition-fast);
        opacity: 0;
        transform: scale(0.8);
        padding: 0 !important;
        margin: 0 !important;
    }

    .mobile-close-btn svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        stroke-width: 2;
        transition: var(--transition-fast);
    }

    .mobile-close-btn.show {
        display: flex !important;
        opacity: 1;
        transform: scale(1);
        z-index: 100010;
    }

    .mobile-close-btn:hover {
        background: rgba(0, 0, 0, 0.6) !important;
    }

    .mobile-close-btn:active {
        transform: scale(0.95);
    }

    .mobile-close-btn:active svg {
        transform: scale(0.9);
    }

/* Mobile Login Button - Smaller and cleaner */
@media (max-width: 768px) {
    .login-btn {
        padding: 10px 24px;
        font-size: 12px;
        gap: 8px;
        border-radius: 20px;
    }
    

}

/* Hide miniaturize button on desktop */
@media (min-width: 769px) {
    .miniaturize-btn {
        display: none !important;
    }
}

.login-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.login-btn:active {
    transform: translateY(1px);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

/* Logged in container - vertical stack on desktop, horizontal on mobile */
.login-container.logged-in {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    z-index: 1005;
    width: fit-content;
    background: rgba(0, 0, 0, 0.85);
    padding: 16px;
    border-radius: 16px;
    backdrop-filter: blur(var(--blur-medium));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Mobile override for logged-in container */
@media (max-width: 768px) {
    .login-container.logged-in {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: auto;
        display: flex;
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: center;
        z-index: 1005;
        width: fit-content;
        background: rgba(0, 0, 0, 0.85);
        padding: 16px;
        border-radius: 16px;
        backdrop-filter: blur(var(--blur-medium));
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.logout-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.power-icon {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}

.logout-btn:hover .power-icon {
    transform: scale(1.1);
}

.trophy-btn {
    background: rgba(255, 215, 0, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.trophy-btn:hover {
    background: rgba(255, 215, 0, 1);
    color: #222;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.trophy-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.trophy-icon {
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
}

.trophy-btn:hover .trophy-icon {
    transform: scale(1.1);
}

/* Leaderboard Overlay */
.leaderboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.leaderboard-overlay.show {
    opacity: 1;
    visibility: visible;
}

.leaderboard-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
}

.leaderboard-overlay.show .leaderboard-content {
    transform: scale(1) translateY(0);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-start);
}

.leaderboard-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.leaderboard-subtitle {
    color: #666;
    font-size: 14px;
}

.leaderboard-stats {
    display: grid;
    gap: 12px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
    border-radius: 12px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stat-date {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.stat-clicks {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
}

.stat-card.today {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.stat-card.today:hover {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.2));
}

.today-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.8);
    color: #333;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Privacy Policy Link - Mobile version */
.mobile-privacy-link {
    display: none;
}

/* Footer styles */
footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1001; /* Above hotbar */
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .mobile-privacy-link {
        display: block;
        text-align: center;
    }
    
    footer {
        display: none;
    }
    
    /* Body overflow adjustment for mobile */
    body {
        overflow: hidden;
        height: 100vh;
    }
    
    /* Mobile Leaderboard Overlay */
    .leaderboard-overlay {
        padding: 10px !important;
        z-index: 10003 !important;
    }
    
    .leaderboard-content {
        max-width: 90vw !important;
        max-height: 80vh !important;
        padding: 20px !important;
    }
    
    .stats-container {
        gap: 10px !important;
    }
    
    .stat-card {
        padding: 12px !important;
        min-width: auto !important;
    }
}

.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-style: italic;
}

.stat-card.error {
    background: linear-gradient(145deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.stat-card.error .stat-clicks {
    color: #dc3545;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: var(--transition-fast);
    z-index: 1010;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .close-btn {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 40px;
        height: 40px;
        color: white;
        font-size: 24px;
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .close-btn:hover {
        background: rgba(0, 0, 0, 0.6);
        color: white;
    }

    .close-btn:active {
        transform: scale(0.95);
    }

    /* Adjust modal padding to not overlap with close button */
    .leaderboard-content {
        padding-top: 20px;
    }
}

/* Counter Container */
.counter-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    pointer-events: none;
    width: auto;
}

/* Counter Display */
.counter-display {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    padding: 15px 25px;
    text-align: center;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(0,0,0,0.1);
    min-width: 200px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
}

/* Counter Elements */
.counter-label {
    color: #666666;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.counter-value {
    color: #333333;
    font-size: 36px;
    font-weight: bold;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 8px 0;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    line-height: 1;
}

.counter-subtitle {
    color: #999999;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

/* Progress Bar Container */
.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1002;
    overflow: hidden;
}

/* Progress Bar */
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        #ff3d00,
        #ff9100,
        #ffea00,
        #c6ff00,
        #00e5ff,
        #2979ff,
        #651fff,
        #d500f9
    );
    background-size: 200% 100%;
    animation: gradientMove 2s linear infinite;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes gradientMove {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* Progress Bar Shimmer Effect */
.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
    transform: translateX(-100%);
}

/* Progress Bar Glow Point */
.progress-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 30px rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    filter: blur(1px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .progress-container {
        height: 6px; /* Slightly smaller on mobile */
    }
    
    .progress-bar {
        background-size: 200% 100%; /* Ensure gradient size is maintained */
        animation: gradientMove 1.5s linear infinite; /* Slightly faster animation */
    }
    
    .progress-bar::after {
        width: 8px; /* Smaller glow point */
        height: 8px;
    }
}

/* Z-index Hierarchy */
.key-container {
    z-index: 2;
}

.hotbar {
    z-index: 1000;
}

.leaderboard-overlay {
    z-index: 1003;
}

.power-up-notification,
.achievement-notification {
    z-index: 1004;
}

.login-container {
    z-index: 1005;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .counter-container {
        top: 60px;
    }
    
    .counter-display {
        padding: 12px 18px;
        min-width: 160px;
        border-radius: 12px;
    }
    
    .counter-value {
        font-size: 28px;
    }
}

/* Animations */
@keyframes iosUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); color: #007aff; }
    100% { transform: scale(1); }
}

@keyframes goalReached {
    0% { 
        background: linear-gradient(90deg, #667eea, #764ba2);
        box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
    }
    50% { 
        background: linear-gradient(90deg, #ff6b6b, #feca57);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
        transform: scaleY(1.2);
    }
    100% { 
        background: linear-gradient(90deg, #667eea, #764ba2);
        box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
        transform: scaleY(1);
    }
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    margin: 80px 0;
    min-height: 60vh;
}

@media (max-width: 768px) {
    .game-container {
        margin: 115px 0 80px 0;
        gap: 15px;
    }
}

.key-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    position: relative;
    z-index: 2;
    width: 100%;
}

.w-key {
    width: clamp(12rem, 30vw, 20rem);
    height: clamp(12rem, 30vw, 20rem);
    position: relative;
    cursor: pointer;
    user-select: none;
    transform-style: preserve-3d;
    transition: var(--transition-fast);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: clamp(2px, 0.2vw, 4px) solid var(--border-light);
    border-radius: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 
        0 clamp(1rem, 3vw, 1.5rem) clamp(2rem, 5vw, 3rem) var(--shadow-heavy),
        inset 0 clamp(0.25rem, 1vw, 0.5rem) clamp(0.5rem, 1vw, 0.75rem) rgba(255,255,255,0.9),
        inset 0 clamp(-0.25rem, -1vw, -0.5rem) clamp(0.5rem, 1vw, 0.75rem) var(--shadow-medium),
        inset clamp(0.25rem, 1vw, 0.5rem) 0 0 rgba(255,255,255,0.8),
        inset clamp(-0.25rem, -1vw, -0.5rem) 0 0 var(--shadow-medium),
        inset 0 clamp(0.25rem, 1vw, 0.5rem) 0 rgba(255,255,255,0.8),
        inset 0 clamp(-0.25rem, -1vw, -0.5rem) 0 var(--shadow-medium);
}

/* Mobile W Key - Smaller size */
@media (max-width: 768px) {
    .w-key {
        width: clamp(12rem, 40vw, 18rem);
        height: clamp(12rem, 40vw, 18rem);
    }
}

/* The letter W */
.w-key span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: 0 clamp(1px, 0.1vw, 2px) clamp(2px, 0.2vw, 4px) var(--shadow-medium);
    pointer-events: none;
    z-index: 10;
    transition: var(--transition-fast);
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
}

.w-key .website-text {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0.3;
    font-family: 'Arial', sans-serif;
    pointer-events: none;
    z-index: 10;
    transition: var(--transition-fast);
    white-space: nowrap;
}

/* Hover effect - key lifts up (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .w-key:hover {
        transform: translateY(-12px) rotateX(12deg);
        box-shadow: 
            0 32px 64px var(--shadow-heavy),
            inset 0 6px 12px rgba(255,255,255,0.9),
            inset 0 -6px 12px var(--shadow-medium),
            inset 6px 0 0 rgba(255,255,255,0.8),
            inset -6px 0 0 var(--shadow-medium),
            inset 0 6px 0 rgba(255,255,255,0.8),
            inset 0 -6px 0 var(--shadow-medium);
    }
}

/* Pressed state - key goes down */
.w-key.pressed {
    transform: translateY(8px) rotateX(-5deg);
    background: linear-gradient(145deg, var(--bg-secondary), color-mix(in srgb, var(--bg-secondary) 85%, black));
    box-shadow: 
        0 8px 16px var(--shadow-medium),
        inset 0 8px 16px var(--shadow-medium),
        inset 0 -4px 8px rgba(255,255,255,0.1),
        inset 5px 0 0 var(--shadow-heavy),
        inset -5px 0 0 rgba(255,255,255,0.1),
        inset 0 5px 0 var(--shadow-heavy),
        inset 0 -5px 0 rgba(255,255,255,0.1);
}

.w-key.pressed span {
    transform: translate(-50%, -50%) translateY(4px);
    text-shadow: 0 0 3px var(--shadow-medium);
} 

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    border-radius: 15px;
    padding: 15px 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
}

.achievement-notification.show {
    bottom: 30px;
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-emoji {
    font-size: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: achievementEmoji 0.6s ease;
}

.achievement-text {
    flex: 1;
}

.achievement-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.achievement-description {
    font-size: 14px;
    color: #666;
    white-space: pre-line;
}

/* Achievements Tab in Leaderboard */
.leaderboard-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0 4px 4px 4px;
}

.tab-button {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-fast);
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-start);
    transform: scaleX(0);
    transition: var(--transition-fast);
}

.tab-button.active {
    color: var(--text-primary);
    font-weight: 600;
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-button:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.achievements-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.achievement-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card.locked {
    filter: grayscale(1);
    opacity: 0.7;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.achievement-card .achievement-emoji {
    font-size: 32px;
    margin-bottom: 10px;
}

.achievement-card .achievement-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.achievement-card .achievement-description {
    font-size: 12px;
}

.achievement-requirement {
    font-size: 11px;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* Achievement Animation */
@keyframes achievementEmoji {
    0% { transform: scale(0) rotate(-180deg); }
    60% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Adjustments for Achievements */
@media (max-width: 768px) {
    .achievement-notification {
        min-width: 280px;
        padding: 12px 20px;
    }

    .achievement-emoji {
        font-size: 32px;
    }

    .achievement-title {
        font-size: 16px;
    }

    .achievement-description {
        font-size: 12px;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }
} 

/* Power-up Notification */
.power-up-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.9));
    border-radius: 15px;
    padding: 15px 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    color: white;
}

.power-up-notification.show {
    bottom: 100px;
}

.power-up-content {
    text-align: center;
}

.power-up-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.power-up-message {
    font-size: 14px;
    opacity: 0.9;
}

/* Power-up Visual Effects */
.w-key.double-w {
    animation: doubleWPulse 1s infinite;
    border-color: #667eea;
}

.w-key.auto-w {
    animation: autoWPulse 0.33s infinite;
    border-color: #764ba2;
}

@keyframes doubleWPulse {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.05);
        box-shadow: 
            0 20px 40px rgba(102, 126, 234, 0.6),
            inset 0 6px 12px rgba(255,255,255,0.9),
            inset 0 -6px 12px rgba(0,0,0,0.2);
    }
    100% { transform: scale(1); }
}

@keyframes autoWPulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

/* Mobile Adjustments for Power-ups */
@media (max-width: 768px) {
    .power-up-notification {
        min-width: 280px;
        padding: 12px 20px;
        bottom: -60px;
    }

    .power-up-notification.show {
        bottom: 80px;
    }

    .power-up-title {
        font-size: 18px;
    }

    .power-up-message {
        font-size: 12px;
    }
} 

/* Hotbar */
.hotbar {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.hotbar-slot {
    width: 80px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* Hotbar slot hover effects (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .hotbar-slot:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }
    
    .hotbar-slot.locked:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.1);
    }
}

.hotbar-slot:active {
    transform: translateY(0);
}

.hotbar-slot.locked {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed;
}

.hotbar-icon {
    font-size: 24px;
    transition: all 0.2s ease;
}

.hotbar-icon.locked {
    opacity: 0.3;
    filter: grayscale(1);
}

.hotbar-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    pointer-events: none;
}

.hotbar-key {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    pointer-events: none;
}

.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    pointer-events: none;
    border-radius: 8px;
}

.cooldown-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        rgba(102, 126, 234, 0.5) var(--progress),
        rgba(0, 0, 0, 0.7) var(--progress)
    );
    border-radius: 50%;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(102, 126, 234, 0.3);
}

.cooldown-overlay::after {
    content: attr(data-time);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 
        0 0 4px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.5);
}

/* Mobile adjustments for cooldown */
@media (max-width: 768px) {
    .cooldown-overlay::before {
        width: 36px;
        height: 36px;
    }

    .cooldown-overlay::after {
        font-size: 14px;
    }
}

.unlock-requirement {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1001;
}

/* Unlock requirement hover effects (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .hotbar-slot:hover .unlock-requirement {
        opacity: 1;
    }
    
    .hotbar-slot:not(:hover) .unlock-requirement {
        opacity: 0;
    }
}

/* Mobile tooltip for locked powerups */
@media (max-width: 768px) {
    .hotbar-slot.locked:active .unlock-requirement {
        opacity: 1;
    }
}

/* Mobile Adjustments for Hotbar */
@media (max-width: 768px) {
    .hotbar {
        padding: 8px;
        gap: 8px;
    }

    .hotbar-slot {
        width: 70px;
        height: 55px;
        /* Prevent stuck active states on mobile */
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .hotbar-icon {
        font-size: 20px;
    }

    .hotbar-label {
        font-size: 9px;
    }

    .unlock-requirement {
        top: -18px;
        font-size: 9px;
    }
    
    /* Force reset of active states after touch */
    .hotbar-slot:active {
        transform: scale(0.95);
        opacity: 0.8;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }
    
    .hotbar-slot:not(:active) {
        transform: scale(1);
        opacity: 1;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }
    
    /* Handle double-tap issues */
    .hotbar-slot:focus {
        outline: none;
    }
}

/* Update Power-up Notification Position */
.power-up-notification.show {
    bottom: 40px;
}

@media (max-width: 768px) {
    .power-up-notification.show {
        bottom: 90px;
    }
} 

/* Mobile Adjustments for W Key */
@media (max-width: 768px) {
    .key-container {
        padding: 20px;
        position: relative;
        z-index: 999;
    }

    .w-key {
        width: 180px;
        height: 180px;
        /* Prevent stuck active states on mobile */
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .w-key span {
        font-size: clamp(6rem, 16vw, 10rem);
    }
    
    /* Force reset of active states after touch */
    .w-key:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .w-key:not(:active) {
        transform: scale(1);
        transition: transform 0.1s ease;
    }
    
    /* Handle double-tap issues */
    .w-key:focus {
        outline: none;
    }
} 

/* Falling Keycap Animation */
.falling-keycap {
    position: fixed;
    top: -50px; /* Start above the screen */
    width: 50px;
    height: 50px;
    pointer-events: none;
    user-select: none;
    z-index: 1; /* Behind the W key */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    will-change: transform;
}

.falling-keycap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    clip-path: polygon(15% 0%, 85% 0%, 100% 15%, 100% 85%, 85% 100%, 15% 100%, 0% 85%, 0% 15%);
    border-radius: 3px;
    box-shadow: 
        0 2px 4px var(--shadow-medium),
        inset 0 1px 2px rgba(255,255,255,0.9),
        inset 0 -1px 2px var(--shadow-light);
}

.falling-keycap::after {
    content: 'W';
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    -webkit-text-stroke: 1px var(--text-primary);
    text-shadow: 0 0 2px var(--shadow-light);
}

@keyframes fallAndSpin {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) translateX(var(--drift)) rotate(var(--spin)) scale(0.7);
        opacity: 0.3;
    }
} 

/* Progress Info */
.progress-info {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.progress-current {
    color: #fff;
}

.progress-separator {
    opacity: 0.7;
}

.progress-goal {
    color: rgba(255, 255, 255, 0.7);
}

.progress-percentage {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .progress-info {
        padding: 6px 12px;
    }
    
    .progress-stats {
        font-size: 12px;
        gap: 4px;
    }
    
    .progress-percentage {
        font-size: 10px;
    }
} 

.leaderboard-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 40, 0.95);
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-modal h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.stats-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(40, 40, 50, 0.5);
    border-radius: 12px;
}

.nav-button {
    background: rgba(60, 60, 70, 0.5);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nav-button:hover:not(:disabled) {
    background: rgba(80, 80, 90, 0.7);
    transform: translateY(-1px);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(40, 40, 50, 0.3);
}

.current-month {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.daily-stat {
    background: rgba(40, 40, 50, 0.3);
    margin: 8px 0;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.daily-stat:hover {
    background: rgba(50, 50, 60, 0.4);
    transform: translateX(2px);
}

.daily-stat .date {
    color: #fff;
    font-size: 16px;
}

.daily-stat .clicks {
    color: #64B5F6;
    font-weight: 500;
    font-size: 16px;
}

.daily-stat.today {
    background: rgba(100, 181, 246, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.stats-tab {
    padding: 8px 16px;
    background: rgba(40, 40, 50, 0.3);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.stats-tab.active {
    background: rgba(100, 181, 246, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.stats-tab:hover:not(.active) {
    background: rgba(50, 50, 60, 0.4);
}

/* Ensure leaderboard is above logout menu */
#logoutMenu {
    z-index: 999;
} 

/* Theme preview styles */
.theme-preview {
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-primary);
}

.theme-preview svg {
    display: block;
    width: 100%;
    height: 100%;
}

.theme-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.theme-card.active {
    border-color: var(--primary-start);
    box-shadow: 0 0 0 2px var(--primary-end);
}

.theme-name {
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
    font-weight: 500;
}

@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 4px;
    }

    .theme-preview {
        height: 50px;
        border-radius: 6px;
    }

    .theme-card {
        padding: 8px;
    }

    .theme-name {
        font-size: 12px;
        margin-top: 4px;
    }
} 

/* Celebratory Icons */
.celebration-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1006;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
    width: 120px;
}

.celebration-icon {
    font-size: 24px;
    opacity: 0;
    transform: scale(0) translateY(0);
    animation: balloonFloat 3s ease-out forwards;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    position: relative;
    left: 0;
}

.celebration-icon:nth-child(1) { animation-delay: 0.1s; }
.celebration-icon:nth-child(2) { animation-delay: 0.2s; }
.celebration-icon:nth-child(3) { animation-delay: 0.3s; }
.celebration-icon:nth-child(4) { animation-delay: 0.4s; }
.celebration-icon:nth-child(5) { animation-delay: 0.5s; }
.celebration-icon:nth-child(6) { animation-delay: 0.6s; }
.celebration-icon:nth-child(7) { animation-delay: 0.7s; }
.celebration-icon:nth-child(8) { animation-delay: 0.8s; }
.celebration-icon:nth-child(9) { animation-delay: 0.9s; }

@keyframes balloonFloat {
    0% {
        opacity: 0;
        transform: scale(0) translateY(0);
    }
    20% {
        opacity: 1;
        transform: scale(1.2) translateY(0);
    }
    40% {
        opacity: 1;
        transform: scale(1) translateY(-20px);
    }
    60% {
        opacity: 1;
        transform: scale(1) translateY(-40px);
    }
    80% {
        opacity: 1;
        transform: scale(1) translateY(-60px);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-80px);
    }
}

/* Add gentle swaying animation */
.celebration-icon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: currentColor;
    opacity: 0.6;
    animation: balloonString 2s ease-in-out infinite;
}

@keyframes balloonString {
    0%, 100% {
        transform: translateX(-50%) rotate(-2deg);
    }
    50% {
        transform: translateX(-50%) rotate(2deg);
    }
}

/* Theme-specific celebration icons */
[data-theme="default"] .celebration-icon {
    color: #667eea;
    text-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
}

[data-theme="kawaii"] .celebration-icon {
    color: #FF69B4;
    text-shadow: 0 0 8px rgba(255, 105, 180, 0.6);
}

[data-theme="neon"] .celebration-icon {
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

[data-theme="dark"] .celebration-icon {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .celebration-container {
        bottom: 15px;
        right: 15px;
        gap: 4px 6px;
        width: 90px;
    }
    
    .celebration-icon {
        font-size: 18px;
    }
} 

/* Hide miniaturize button on desktop */
@media (min-width: 769px) {
    .miniaturize-btn {
        display: none !important;
    }
}

/* Achievement Progress Bar */
.achievement-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(var(--blur-medium));
    border-bottom: 1px solid var(--border-transparent);
    padding: 8px 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.achievement-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.achievement-progress-text {
    color: var(--text-white);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.achievement-next-title {
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0.8;
}

/* Adjust main container to account for progress bar */
.container {
    padding-top: 60px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .achievement-progress-container {
        padding: 6px 15px;
        gap: 10px;
    }
    
    .achievement-progress-text {
        font-size: 11px;
    }
    
    .achievement-next-title {
        font-size: 10px;
    }
    
    .container {
        padding-top: 50px;
    }
} 

/* Hotbar */ 
