* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #0D0015;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    max-height: 750px;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(0, 255, 255, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 60%, rgba(255, 0, 200, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse at 20% 80%, rgba(138, 43, 226, 0.08) 0%, transparent 35%),
        linear-gradient(180deg, #0D0020 0%, #1A0A30 40%, #0F0525 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(138, 43, 226, 0.3);
}

#ui-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(12px + env(safe-area-inset-top)) 15px 12px;
    z-index: 10;
}

.stat-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

/* Best box - Cyan neon accent */
.best-box {
    border-color: rgba(0, 255, 255, 0.4);
}

.best-box .stat-label {
    color: rgba(0, 255, 255, 0.8);
}

.best-box .stat-value {
    color: #00FFFF;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.best-box.glow {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 25px rgba(0, 255, 255, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Score box - Magenta neon accent */
.score-box {
    border-color: rgba(255, 0, 200, 0.4);
}

.score-box .stat-label {
    color: rgba(255, 100, 220, 0.9);
}

.score-box .stat-value {
    color: #FF66DD;
    text-shadow: 0 0 15px rgba(255, 0, 200, 0.8);
}

.score-box.glow {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 25px rgba(255, 0, 200, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.stat-value {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 210, 200, 0.3);
}

.level-box {
    min-width: 70px;
    padding: 8px 16px;
    border-color: rgba(255, 200, 0, 0.4);
}

.level-box .stat-label {
    color: rgba(255, 220, 100, 0.9);
}

.level-box .stat-value {
    color: #FFDD44;
    text-shadow: 0 0 15px rgba(255, 200, 0, 0.8);
}

.level-box.glow {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 25px rgba(255, 200, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}

#coins-display {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

#coins-icon {
    font-size: 18px;
}

#coins-value {
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

#settings-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(0, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    top: calc(90px + env(safe-area-inset-top));
    right: 15px;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

#settings-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
    transform: scale(1.1);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 15px rgba(0, 255, 255, 0.2);
}

/* Pause Button */
#pause-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 100, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
    top: calc(90px + env(safe-area-inset-top));
    left: 15px;
    box-shadow: 
        0 0 10px rgba(255, 100, 255, 0.3),
        inset 0 0 10px rgba(255, 100, 255, 0.1);
}

#pause-btn:hover {
    background: rgba(255, 100, 255, 0.1);
    border-color: #FF66FF;
    transform: scale(1.1);
    box-shadow: 
        0 0 20px rgba(255, 100, 255, 0.5),
        inset 0 0 15px rgba(255, 100, 255, 0.2);
}

#pause-btn.hidden {
    display: none;
}

/* Pause Modal */
.pause-modal {
    text-align: center;
}

.pause-modal h2 {
    margin-bottom: 25px;
    font-size: 24px;
}

.pause-modal button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00D2C8 0%, #00B5A8 100%);
    color: #fff;
    font-weight: 600;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 210, 200, 0.4);
}

#shop-btn {
    display: none;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

#ball-count {
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 14px;
    border-radius: 16px;
    z-index: 15;
}

#balls-remaining {
    color: #fff;
    font-size: 14px;
}

#ball-number {
    font-weight: bold;
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('image/0f93c78f-850f-47e7-99d9-32c969376c7c.jpg') center center / cover no-repeat;
    background-color: #0a0015;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 150;
    padding: 20px;
    padding-top: 25px;
    padding-bottom: 30px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#start-screen.hidden {
    display: none !important;
}

.start-content {
    text-align: center;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-title {
    font-size: 58px;
    font-weight: 800;
    background: linear-gradient(135deg, 
        #00FFFF 0%, 
        #44FFFF 15%,
        #FFFF00 30%,
        #FF66FF 50%, 
        #00FFFF 70%,
        #44FF88 85%,
        #00FFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    margin: 0;
    padding: 0;
    line-height: 1;
    letter-spacing: 1px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 20px rgba(0, 255, 255, 0.6)) 
            drop-shadow(0 0 40px rgba(255, 100, 255, 0.4));
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.start-best {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    padding: 8px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.best-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

.best-value {
    color: #00FFFF;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#play-btn {
    background: linear-gradient(135deg, #00CCCC 0%, #CC00AA 100%);
    color: #fff;
    border: none;
    padding: 14px 50px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 12px;
    transition: all 0.3s;
    box-shadow: 
        0 8px 30px rgba(0, 200, 200, 0.4),
        0 0 20px rgba(200, 0, 170, 0.3);
    animation: pulseGlow 2s ease-in-out infinite, slideUp 0.5s ease-out;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 8px 30px rgba(0, 200, 200, 0.4), 0 0 20px rgba(200, 0, 170, 0.3); }
    50% { box-shadow: 0 8px 40px rgba(0, 255, 255, 0.6), 0 0 35px rgba(255, 0, 200, 0.5); }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#play-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 255, 255, 0.5),
        0 0 30px rgba(255, 0, 200, 0.4);
}

#play-btn:active {
    transform: translateY(0) scale(0.98);
}

.play-icon {
    font-size: 24px;
}

.how-to-play {
    background: rgba(138, 43, 226, 0.1);
    border-radius: 15px;
    padding: 15px 20px;
    border: 1px solid rgba(138, 43, 226, 0.25);
    margin-top: 0;
}

.how-to-play h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.instructions {
    text-align: left;
}

.instructions p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.instructions p:last-child {
    margin-bottom: 0;
}

.instructions strong {
    color: #fff;
}

/* Game Over Screen */
#game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

#game-over h2 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 100, 100, 0.5);
}

#game-over p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    margin-bottom: 10px;
}

#game-over #final-score {
    color: #ffd700;
    font-weight: bold;
}

.coins-earned {
    color: #ffd700 !important;
    font-size: 18px !important;
    margin-bottom: 25px !important;
}

#continue-options {
    margin-bottom: 20px;
}

.action-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
}

.btn-icon {
    font-size: 24px;
}

.btn-text {
    font-size: 16px;
}

.btn-sub {
    font-size: 12px;
    opacity: 0.8;
}

#restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

/* Modals */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(15px);
}

.modal-content {
    background: rgba(10, 0, 25, 0.95);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 350px;
    position: relative;
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.2),
        0 0 60px rgba(255, 100, 255, 0.1),
        inset 0 0 30px rgba(0, 255, 255, 0.05);
}

.modal-content h2 {
    color: #00FFFF;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.15);
    color: #fff;
}

.toggle-btn {
    background: transparent;
    color: #FF6666;
    border: 2px solid #FF6666;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
}

.toggle-btn.on {
    background: transparent;
    color: #00FFAA;
    border-color: #00FFAA;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.4);
}

/* Remove Ads Section */
.setting-divider {
    height: 1px;
    background: rgba(0, 255, 255, 0.2);
    margin: 15px 0;
}

.remove-ads-row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
    padding: 20px 0 !important;
}

.remove-ads-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.remove-ads-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.remove-ads-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.btn-purchase {
    background: linear-gradient(135deg, #00FFAA 0%, #00CCFF 100%);
    color: #000;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.4);
}

.btn-purchase:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.6);
}

.btn-purchase:active {
    transform: scale(0.98);
}

.ads-removed {
    color: #00FFAA;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.premium-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.premium-section h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.premium-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 15px;
}

.premium-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: #FF66FF;
    border: 2px solid rgba(255, 100, 255, 0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 100, 255, 0.3);
}

.close-btn:hover {
    background: rgba(255, 100, 255, 0.1);
    border-color: #FF66FF;
    box-shadow: 0 0 20px rgba(255, 100, 255, 0.5);
}

/* Shop */
.shop-content {
    max-width: 380px;
}

.shop-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.shop-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shop-item.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.shop-item.locked {
    opacity: 0.6;
}

.shop-item .item-preview {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border-radius: 50%;
}

.shop-item .item-name {
    color: #fff;
    font-size: 12px;
    margin-bottom: 5px;
}

.shop-item .item-price {
    color: #ffd700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.shop-item .item-price.owned {
    color: #10b981;
}

/* Ad Overlay */
#ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 300;
}

.ad-container {
    width: 90%;
    max-width: 350px;
}

.ad-content {
    background: #222;
    border-radius: 15px;
    overflow: hidden;
}

.ad-label {
    background: #333;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-placeholder {
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
}

.ad-timer {
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.skip-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.skip-btn:hover {
    opacity: 0.9;
}

.hidden {
    display: none !important;
}

/* Mobile optimizations */
@media (max-width: 450px) {
    #game-container {
        border-radius: 0;
        max-height: 100vh;
    }
    
    .stat-box {
        padding: 6px 15px;
        min-width: 70px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-btn {
        animation: none;
    }

    #game-over h2, #game-over p, #game-over button {
        animation: none;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.action-btn {
    animation: pulse 2s infinite;
}

#game-over h2, #game-over p, #game-over button {
    animation: fadeIn 0.5s ease-out;
}

/* Global Rank Display */
.global-rank {
    font-size: 14px;
    color: #00D2C8;
    margin: 10px 0 15px;
    padding: 8px 12px;
    background: rgba(0, 210, 200, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 210, 200, 0.2);
    text-align: center;
    line-height: 1.5;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.global-rank .loading {
    color: #888;
}

.global-rank .player-id {
    font-size: 11px;
    color: #666;
    font-family: monospace;
}

.global-rank button {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 12px;
}

/* Leaderboard Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-small {
    background: linear-gradient(135deg, #00D2C8 0%, #00B5A8 100%);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    transform: scale(1.05);
}

/* Leaderboard Modal */
.leaderboard-modal {
    max-width: 340px;
    max-height: 80vh;
}

.leaderboard-list {
    max-height: 350px;
    overflow-y: auto;
    margin: 15px 0;
    padding-right: 5px;
}

.leaderboard-list::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.lb-entry {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.lb-entry:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lb-entry.top-3 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.lb-entry.you {
    background: linear-gradient(135deg, rgba(0, 210, 200, 0.2) 0%, rgba(0, 210, 200, 0.05) 100%);
    border: 1px solid rgba(0, 210, 200, 0.4);
}

.lb-rank {
    width: 35px;
    font-weight: 700;
    font-size: 14px;
    color: #888;
}

.lb-entry.top-3 .lb-rank {
    color: #FFD700;
}

.lb-name {
    flex: 1;
    font-size: 14px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-score {
    font-weight: 700;
    font-size: 14px;
    color: #CE93D8;
}

.leaderboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#your-rank-display {
    font-size: 12px;
    color: #888;
}

/* Home Screen Rank */
.home-rank {
    font-size: 14px;
    color: #FF66DD;
    padding: 10px 20px;
    background: rgba(255, 0, 200, 0.12);
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 200, 0.3);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 0, 200, 0.5);
}

.btn-leaderboard {
    background: transparent;
    border: 1.5px solid rgba(0, 255, 255, 0.4);
    color: #00FFFF;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-bottom: 0;
    transition: all 0.3s;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    animation: slideUp 0.6s ease-out 0.1s backwards;
}

.btn-leaderboard:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}
