* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    background-color: #000;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.7); }
    50% { transform: translateX(-50%) scale(1.1); box-shadow: 0 0 20px 10px rgba(0, 200, 255, 0); }
    100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(0, 200, 255, 0); }
}

@keyframes joystick-pulse {
    0% { border-color: rgba(255, 255, 255, 0.25); }
    50% { border-color: rgba(0, 200, 255, 0.8); }
    100% { border-color: rgba(255, 255, 255, 0.25); }
}

@keyframes shrink-pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

.credits {
    position: absolute; top: 1px; right: 5px;
    color: #666; font-size: 11px;
    background-color: #000;
    padding: 1px 2px 1px 2px;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; 
}

#score {
    position: absolute;
    top: 40px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

#multiplier {
    position: absolute;
    top: 70px;
    left: 20px;
    font-size: 18px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

#speed-indicator {
    position: absolute;
    top: 70px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.speed-label {
    font-size: 12px;
    color: #ff00ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.speed-segments {
    display: flex;
    gap: 3px;
}

.speed-segment {
    width: 8px;
    height: 20px;
    background: rgba(255, 0, 255, 0.2);
    border-radius: 2px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 0, 255, 0.3);
}

.speed-segment.active {
    background: linear-gradient(180deg, #ff00ff 0%, #cc00cc 100%);
    box-shadow: 0 0 5px #ff00ff, inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: #ff00ff;
}

.speed-segment.boost {
    background: linear-gradient(180deg, #ffff00 0%, #ff9900 100%);
    box-shadow: 0 0 5px #ffff00, inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: #ffff00;
}

#rings {
    position: absolute;
    top: 120px;
    left: 20px;
    font-size: 18px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 40px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 5px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

p {
    margin-bottom: 20px;
    font-size: 14px;
    color: #ccc;
    letter-spacing: 1px;
    justify-content: center;
    align-items: center;
}

button {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 15px 40px;
    font-size: 18px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

button:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

button:active {
    transform: scale(0.95);
}

#pause-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border: 2px solid #00ffff;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 20;
    min-width: 300px;
    pointer-events: auto; /* Allow button clicks */
}

#pause-screen.hidden {
    display: none !important;
}

#pause-screen h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 0, 85, 0.8);
}

/* Shrink indicator line styles */
#shrink-indicator {
    position: absolute;
    z-index: 29;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px; 
    height: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px currentColor;
}

/* Normal state (not shrunken) - Orange */
#shrink-indicator.normal {
    background: linear-gradient(90deg, #ff5500, #ff9900);
    box-shadow: 0 0 15px #ff5500, 0 0 30px rgba(255, 85, 0, 0.3);
}

/* Shrunken state - Teal */
#shrink-indicator.shrunk {
    background: linear-gradient(90deg, #00ffff, #00ccff);
    box-shadow: 0 0 15px #00ffff, 0 0 30px rgba(0, 255, 255, 0.3);
}

/* Pulsing animation for visual feedback */
@keyframes shrink-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#shrink-indicator.shrunk {
    animation: shrink-pulse 1s infinite;
}

/* Flash effect for shrink toggle */
@keyframes shrink-flash {
    0% { transform: translateX(-50%) scaleX(1); }
    50% { transform: translateX(-50%) scaleX(1.1); }
    100% { transform: translateX(-50%) scaleX(1); }
}

#shrink-indicator.flash {
    animation: shrink-flash 0.2s ease;
}

/* Cooldown flash (red) */
@keyframes cooldown-flash {
    0% { background: linear-gradient(90deg, #ff0000, #ff5555); }
    50% { background: linear-gradient(90deg, #ff5555, #ff0000); }
    100% { background: linear-gradient(90deg, #ff0000, #ff5555); }
}

#shrink-indicator.cooldown-flash {
    animation: cooldown-flash 0.3s ease;
}

/* Shrink end flash (orange pulse) */
@keyframes shrink-end-flash {
    0% { 
        background: linear-gradient(90deg, #ffff00, #ffaa00);
        box-shadow: 0 0 20px #ffff00;
    }
    100% { 
        background: linear-gradient(90deg, #ff5500, #ff9900);
        box-shadow: 0 0 15px #ff5500;
    }
}

#shrink-indicator.shrink-end-flash {
    animation: shrink-end-flash 0.5s ease;
}

/* Warning animation when shrink is about to end */
@keyframes shrink-warning {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

#shrink-indicator.shrunk.warning {
    animation: shrink-warning 0.3s infinite;
}

/* Leaderboard Styles */
/* Improved Leaderboard Styles */
.leaderboard-container {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ffff;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    width: 90%;
    max-width: 500px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    /* Add fixed height and overflow */
    max-height: 310px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Hide the outer overflow */
    pointer-events: auto;
}

/* proper column widths */
.leaderboard-header {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00ffff;
    font-weight: bold;
    /* Make header non-scrollable */
    flex-shrink: 0;
}

/* Match EXACTLY with .leaderboard-row children widths */
.rank-header {
    width: 30px;
    text-align: center;
    margin-right: 5px;
}

.name-header {
    flex: 1;
    text-align: left;
    padding-left: 10px;
    margin-right: 10px;
}

.rings-header {
    width: 90px;
    text-align: center;
    margin-right: 5px;
}

.time-header {
    width: 60px;
    text-align: right;
    padding-right: 5px;
}

/* Scrollable container for rows */
.leaderboard-rows-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 250px;
    /* Ensure scrollbar is always visible */
    scrollbar-width: auto;
    scrollbar-color: #00ffff rgba(0, 0, 0, 0.5);
    /* Enable touch scrolling ONLY here */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    /* Make scrollbar more visible */
    padding-right: 2px; /* Add small padding so scrollbar doesn't overlap content */
}

/* Enhanced scrollbar styling for better visibility */
.leaderboard-rows-container::-webkit-scrollbar {
    width: 10px;
}

.leaderboard-rows-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.leaderboard-rows-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffff 0%, #00cccc 100%);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.leaderboard-rows-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ffff 0%, #009999 100%);
    box-shadow: 0 0 10px #00ffff;
}

.leaderboard-rows-container::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #00ffff 0%, #006666 100%);
}

.leaderboard-rows {
    /* Ensure rows take full width */
    width: 100%;
}

/* Match row column widths with headers */
.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    margin: 4px 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Ensure these match the .header- classes exactly */
.leaderboard-rank {
    width: 30px;
    text-align: center;
    font-weight: bold;
    color: #ff00ff;
    font-size: 14px;
    margin-right: 5px;
}

.leaderboard-name {
    flex: 1;
    text-align: left;
    padding-left: 10px;
    font-size: 13px;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.leaderboard-rings {
    width: 90px;
    text-align: center;
    color: #ffff00;
    font-weight: bold;
    font-size: 13px;
    margin-right: 5px;
}

.leaderboard-time {
    width: 35px;
    text-align: right;
    padding-right: 5px;
    color: #00ff00;
    font-size: 12px;
    font-family: monospace;
}

.leaderboard-loading {
    text-align: center;
    padding: 20px;
    color: #aaaaaa;
    font-style: italic;
}

.leaderboard-empty {
    text-align: center;
    padding: 20px;
    color: #aaaaaa;
}

.leaderboard-username {
    font-size: 11px;
    color: #aaaaaa;
    margin-left: 5px;
}

/* Trophy icons for top 3 */
.leaderboard-row:nth-child(1) .leaderboard-rank {
    color: #ffd700; /* Gold */
    font-size: 16px;
}

.leaderboard-row:nth-child(2) .leaderboard-rank {
    color: #c0c0c0; /* Silver */
}

.leaderboard-row:nth-child(3) .leaderboard-rank {
    color: #cd7f32; /* Bronze */
}

/* top left corner */
.username-display {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 12px;
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 5px #00ffff;
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 30px;
    border: 1px solid rgba(33, 255, 255, 0.3);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.username-display::before {
    content: '👤 ';
}

/* When game is playing, make username more subtle */
#canvas-container:not(:empty) ~ #ui-layer .username-display {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.3);
}

/* When on start or game over screen, make username more visible */
#start-screen:not(.hidden) ~ .username-display,
#game-over-screen:not(.hidden) ~ .username-display {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

#music-toggle-container {
    margin: 5px 5px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: auto;
}

#music-toggle-container label {
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 1px;
}

#music-toggle-container label:hover {
    color: #00ffff;
}

#music-status {
    color: #00ff00;
    font-size: 14px;
    min-width: 40px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.music-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    cursor: pointer;
}

.music-toggle-switch input {
    display: none;
}

.music-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 255, 255, 0.3);
    border-radius: 34px;
    transition: .4s;
    border: 2px solid rgba(0, 255, 255, 0.5);
}

.music-toggle-slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 1px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.music-toggle-switch input:checked + .music-toggle-slider {
    background-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.music-toggle-switch input:checked + .music-toggle-slider:before {
    transform: translateX(23px);
}

/* Pulsing animation when music is on */
@keyframes music-pulse {
    0% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
}

.music-toggle-switch input:checked + .music-toggle-slider {
    animation: music-pulse 2s infinite;
}

.music-toggle-switch:hover .music-toggle-slider {
    border-color: #00ffff;
    background-color: rgba(0, 255, 255, 0.4);
}

.music-toggle-switch:hover input:checked + .music-toggle-slider {
    background-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

/* Active/click effect */
.music-toggle-switch:active {
    transform: scale(0.95);
}

@keyframes levelCompletePulse {
    0% { box-shadow: 0 0 50px rgba(0, 255, 255, 0.3); }
    50% { box-shadow: 0 0 80px rgba(0, 255, 255, 0.6); }
    100% { box-shadow: 0 0 50px rgba(0, 255, 255, 0.3); }
}

.level-complete-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Ad Container Styles */
.ad-container {
    margin: 30px 0;
    border: 2px solid #00ffff;
    border-radius: 15px;
    overflow: hidden;
    background: #0a0a1a;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(90deg, #00ffff, #00ccff);
    color: #000;
    font-weight: bold;
}

.close-ad-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid #fff;
}

.close-ad-btn:hover {
    background: #000;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.ad-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.ad-link img {
    max-height: none !important;
}

.ad-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-name {
    font-size: 18px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.ad-visit {
    background: #00ffff;
    color: #000;
    padding: 6px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.ad-visit:hover {
    background: #ff00ff;
    color: #fff;
    transform: scale(1.1);
}

.ad-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Game Over Screen - Optimized for Mobile Vertical */
#game-over-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

#gameover h1 {
    font-size: 24px;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 0;
    text-align: center;
}

#gameover h3 {
    font-size: 14px;
    margin: 4px 4px 4px 15px;
    }

/* Ad Container - Vertical Optimized */
#gameover-ad-container {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    max-width: 560px; 
    height: 980px;
    border: 1px solid #00ffff;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a1a;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

#gameover-ad-container .ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: linear-gradient(90deg, #00ffff, #00ccff);
    color: #000;
    font-weight: bold;
    font-size: 14px;
}

/* Small Timer Above Image */
#gameover-ad-container .ad-timer {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #00ffff;
    padding: 5px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    animation: timerPulse 1s infinite;
    z-index: 200;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

/* Smaller Continue Button */
#gameover-ad-container .close-ad-btn {
    background: linear-gradient(45deg, #00ffff, #00ccff);
    color: #000;
    font-weight: bold;
    padding: 6px 18px;
    font-size: 10px;
    border: 1px solid #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

#gameover-ad-container .close-ad-btn:hover {
    background: linear-gradient(45deg, #ff00ff, #cc00cc);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

/* Ad Image - Larger, Better Fit */
#gameover-ad-container .ad-link {
    display: block;
    position: relative;
    text-decoration: none;
    width: 100%; 
    height: 100%;
    flex-grow: 1; 
    background: #000;
}

#gameover-ad-container .ad-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;    /* Changed from 'contain' to 'cover' to remove black bar */
    object-position: center;
}

/* Clean Overlay */
#gameover-ad-container .ad-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#gameover-ad-container .ad-name {
    font-size: 16px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

#gameover-ad-container .ad-visit {
    background: #00ffff;
    color: #000;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s ease;
}

#gameover-ad-container .ad-visit:hover {
    background: #ff00ff;
    color: #fff;
}

/* Level Complete Screen - Clean version without ad */
#level-complete-screen {
    position: absolute;
    pointer-events: auto;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;       /* Center vertically */
    z-index: 100;
    backdrop-filter: blur(10px);
}

.level-complete-content {
    background: linear-gradient(145deg, #0a0a1a, #000);
    border: 2px solid #00ffff;
    border-radius: 20px;
    padding: 50px;
    max-width: 500px;
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    animation: levelCompletePulse 2s infinite;
}

.level-complete-content h1 {
    font-size: 36px;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.level-stats {
    margin: 30px 0;
    padding: 30px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.level-stats p {
    font-size: 20px;
    margin: 15px 0;
    color: #fff;
}

.next-level-text {
    font-size: 20px;
    color: #00ffff;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.continue-btn {
    background: linear-gradient(45deg, #00ff00, #00cc00);
    color: #000;
    border: none;
    padding: 20px 60px;
    font-size: 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    border: 2px solid #fff;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.continue-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.8);
}

.continuebutton1 { display: flex; justify-content: center; padding: 1px; margin: 0; }

/* Level display in top right corner */
#level-display {
    position: absolute;
    top: 25px;
    right: 20px;
    font-size: 14px;
    color: #ffaa00;
    text-shadow: 0 0 10px #ffaa00, 0 0 20px rgba(255, 170, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 170, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 3;
    letter-spacing: 1px;
}

/* a pulsing animation for when level changes */
@keyframes level-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); text-shadow: 0 0 20px #ffaa00; }
    100% { transform: scale(1); }
}

#level-display.pulse {
    animation: level-pulse 0.3s ease;
}







