/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background: #4EC0CA;
    user-select: none;
}

/* Game Container */
.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Canvas */
#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #4EC0CA;
    cursor: pointer;
}

/* Game UI Overlay */
.game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Screen Overlays */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    text-align: center;
    pointer-events: all;
    backdrop-filter: blur(5px);
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #f39c12;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

.game-title {
    font-size: 4rem !important;
    color: #f39c12;
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
    margin-bottom: 0.5rem !important;
    animation: titleGlow 3s ease-in-out infinite;
}

.game-title::first-letter {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: inherit !important;
}

.game-subtitle {
    font-size: 1.5rem !important;
    color: #3498db !important;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6) !important;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 2rem !important;
    font-weight: 600;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(243, 156, 18, 0.5), 0 0 30px rgba(243, 156, 18, 0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(243, 156, 18, 0.8), 0 0 40px rgba(243, 156, 18, 0.5);
    }
}


@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.screen h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.screen p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.controls-text {
    color: #bdc3c7;
    font-size: 1rem;
    margin-bottom: 2rem;
}

@keyframes glow {
    from { text-shadow: 3px 3px 6px rgba(243, 156, 18, 0.8), 0 0 20px rgba(243, 156, 18, 0.3); }
    to { text-shadow: 3px 3px 6px rgba(243, 156, 18, 0.8), 0 0 30px rgba(243, 156, 18, 0.6); }
}

/* Buttons */
.menu-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.game-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    position: relative;
    overflow: hidden;
    animation: buttonFloat 3s ease-in-out infinite;
}

@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.game-btn.primary {
    background: linear-gradient(45deg, #2980b9, #3498db);
    color: white;
}

.game-btn.secondary {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.game-btn.primary:hover {
    background: linear-gradient(45deg, #3498db, #2980b9);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.4);
}

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

/* In-Game HUD */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 15;
}

.score-display {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    z-index: 20;
}

.difficulty-display {
    position: absolute;
    top: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: bold;
    color: #27ae60;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1.2rem;
    border-radius: 15px;
    z-index: 20;
}

.score-number {
    color: #f39c12;
    font-size: 1.2em;
}

/* Settings Button */
.settings-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 30;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.settings-btn:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Pause Button */
.pause-btn {
    position: fixed;
    top: 6.5rem; /* Increased gap below settings button */
    right: 2rem; /* Align with settings button */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 30;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none; /* Hidden by default, shown when game is playing */
    align-items: center;
    justify-content: center;
}

.pause-btn:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.pause-btn.playing {
    display: flex;
}

/* Version Number */
.version-number {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-weight: bold;
    z-index: 15;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.version-number:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 7rem;
    right: -380px;
    width: 350px;
    max-width: calc(100vw - 2rem);
    background: rgba(0, 0, 0, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    z-index: 25;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #f39c12 #2c3e50;
}

.settings-panel:not(.hidden) {
    right: 2rem;
}

/* Webkit scrollbar styling for settings panel */
.settings-panel::-webkit-scrollbar {
    width: 8px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #e67e22, #d35400);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.settings-panel::-webkit-scrollbar-thumb:active {
    background: linear-gradient(45deg, #d35400, #c0392b);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: white;
}

.panel-header h3 {
    font-size: 1.2rem;
    color: #f39c12;
}

.close-btn {
    background: transparent;
    color: #e74c3c;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: rotate(90deg);
}

/* Setting Sections */
/* Setting Sections */
.setting-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.setting-section:last-child {
    margin-bottom: 0;
}

.setting-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Master Section */
.master-section {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.master-section h4 {
    color: #e74c3c;
}

/* Audio Section */
.audio-section {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

.audio-section h4 {
    color: #3498db;
}

/* Volume Grid */
.volume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.volume-grid .volume-control {
    margin: 0;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-grid .volume-control label {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

/* Customization Section */
.customization-section {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.customization-section h4 {
    color: #2ecc71;
}

/* Audio Uploads Subsection */
.audio-uploads {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-uploads h5 {
    color: #f39c12;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: bold;
}

/* Upload Buttons */
.upload-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: bold;
}

.upload-btn:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

input[type="file"] {
    display: none;
}

/* Volume Control */
.volume-control {
    margin: 0.8rem 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-control:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.volume-control.master-volume {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(52, 152, 219, 0.3);
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.upload-controls {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.upload-group:last-child {
    margin-bottom: 0;
}

.remove-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
    transition: all 0.2s ease;
    opacity: 0.7;
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    opacity: 1;
    transform: scale(1.05);
}

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

.remove-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.3;
}

.remove-btn:disabled:hover {
    transform: none;
}

.volume-control label {
    display: block;
    color: #3498db;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.volume-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-slider:hover::-webkit-slider-thumb {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: scale(1.2);
}

/* Master Volume Slider */
.master-slider::-webkit-slider-thumb {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    width: 24px;
    height: 24px;
}

.master-slider::-moz-range-thumb {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    width: 24px;
    height: 24px;
}

.master-slider:hover::-webkit-slider-thumb {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    transform: scale(1.2);
}

/* Volume Slider Colors by Type */
#tapVolumeSlider::-webkit-slider-thumb {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

#crashVolumeSlider::-webkit-slider-thumb {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

#powerupVolumeSlider::-webkit-slider-thumb {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

#musicVolumeSlider::-webkit-slider-thumb {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

/* Leaderboard Styles */
.player-name-section {
    margin: 1rem 0;
    text-align: center;
}

.player-name-section label {
    display: block;
    color: #3498db;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.name-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    padding: 0.5rem;
    text-align: center;
    width: 150px;
    margin-right: 0.5rem;
}

.name-input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.15);
}

.save-name-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.save-name-btn:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    transform: scale(1.05);
}

.leaderboard-section {
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #f39c12 #2c3e50;
}

/* Webkit scrollbar styling for leaderboard section */
.leaderboard-section::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-section::-webkit-scrollbar-track {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 4px;
}

.leaderboard-section::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.leaderboard-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #e67e22, #d35400);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.leaderboard-section::-webkit-scrollbar-thumb:active {
    background: linear-gradient(45deg, #d35400, #c0392b);
}

.leaderboard-section h3 {
    color: #f39c12;
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1.2rem;
}

.leaderboard-status {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #95a5a6;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #f39c12 #2c3e50;
}

/* Webkit scrollbar styling for Chrome/Safari */
.leaderboard-list::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-list::-webkit-scrollbar-track {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #e67e22, #d35400);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.leaderboard-list::-webkit-scrollbar-thumb:active {
    background: linear-gradient(45deg, #d35400, #c0392b);
}

.leaderboard-list li {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #ecf0f1;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.leaderboard-list li:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.leaderboard-list li:nth-child(1) {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #ffffff;
    font-weight: bold;
    border: 2px solid #d35400;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
    transform: scale(1.02);
}

.leaderboard-list li:nth-child(1):hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.5);
}

.leaderboard-list li:nth-child(2) {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #ffffff;
    font-weight: bold;
    border: 2px solid #6c7b7d;
    box-shadow: 0 3px 8px rgba(149, 165, 166, 0.3);
}

.leaderboard-list li:nth-child(2):hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: scale(1.03);
    box-shadow: 0 5px 12px rgba(149, 165, 166, 0.4);
}

.leaderboard-list li:nth-child(3) {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #ffffff;
    font-weight: bold;
    border: 2px solid #c0392b;
    box-shadow: 0 3px 8px rgba(230, 126, 34, 0.3);
}

.leaderboard-list li:nth-child(3):hover {
    background: linear-gradient(135deg, #d35400, #c0392b);
    transform: scale(1.03);
    box-shadow: 0 5px 12px rgba(230, 126, 34, 0.4);
}

.leaderboard-list .player-name {
    flex: 1;
    text-align: left;
    font-weight: 400; /* back to normal weight */
}

.leaderboard-list .player-score {
    font-weight: 600;
    color: #f39c12;
    font-size: 1.0rem;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 0, 0, 0.25);
}

.rank-display {
    color: #e74c3c !important;
    font-weight: bold;
    font-size: 0.9rem;
}

.refresh-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s ease;
    width: 100%;
}

.refresh-btn:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: scale(1.02);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .screen h1 {
        font-size: 2.5rem;
    }
    
    /* Mobile Settings Panel */
    .settings-panel {
        width: calc(100vw - 2rem);
        right: -100vw;
    }
    
    .settings-panel:not(.hidden) {
        right: 1rem;
    }
    
    /* Mobile Volume Grid */
    .volume-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .volume-grid .volume-control {
        padding: 0.6rem;
    }
    
    .volume-grid .volume-control label {
        font-size: 0.9rem;
    }
    
    .screen h2 {
        font-size: 2rem;
    }
    
    .score-display {
        font-size: 2.2rem;
        top: 1rem;
    }
    
    .difficulty-display {
        top: 4rem;
        font-size: 0.9rem;
        padding: 0.3rem 1rem;
    }
    
    .settings-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .settings-panel {
        top: 5rem;
        right: -340px;
        width: 280px;
        max-height: calc(100vh - 6rem);
    }
    
    .settings-panel:not(.hidden) {
        right: 1rem;
    }
    
    .menu-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 200px;
        margin: 0.3rem;
    }
    
    .version-number {
        bottom: 0.8rem;
        right: 0.8rem;
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .screen h1 {
        font-size: 2rem;
    }
    
    .score-display {
        font-size: 1.8rem;
        top: 0.8rem;
    }
    
    .difficulty-display {
        top: 3.2rem;
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }
    
    .settings-panel {
        width: 260px;
        top: 4rem;
        right: -280px;
    }
    
    .settings-panel:not(.hidden) {
        right: 0.5rem;
    }
    
    .version-number {
        bottom: 0.5rem;
        right: 0.5rem;
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
}

/* Discord Links */
.help-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    padding-top: 1rem;
}

.help-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-request {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    text-align: center;
}

.custom-request p {
    margin: 0;
    color: #f1c40f;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

.discord-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(114, 137, 218, 0.1);
    border: 1px solid rgba(114, 137, 218, 0.3);
    border-radius: 8px;
    color: #7289da;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.discord-link:hover {
    background: rgba(114, 137, 218, 0.2);
    border-color: rgba(114, 137, 218, 0.5);
    transform: translateY(-1px);
}

.discord-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1); /* Make it white */
}

/* Instagram link styling */
.instagram-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(225, 48, 108, 0.12); /* Instagram pink */
    border: 1px solid rgba(225, 48, 108, 0.35);
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.instagram-link:hover {
    background: rgba(225, 48, 108, 0.24);
    border-color: rgba(225, 48, 108, 0.55);
    transform: translateY(-1px);
}

.instagram-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0.8rem;
    left: 0.8rem; /* Move to left side */
    display: flex;
    align-items: center;
    gap: 2rem; /* Gap between Discord icon and version number */
    z-index: 15;
    flex-direction: row; /* Normal order: Discord icon, then version */
}

.version-number {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.discord-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(114, 137, 218, 0.8);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.discord-footer:hover {
    background: rgba(114, 137, 218, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(114, 137, 218, 0.4);
}

.discord-logo {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Make it white */
}

/* Mobile Pause Button */
@media (max-width: 768px) {
    .pause-btn {
        top: 6rem; /* Increased gap below settings button on mobile */
        right: 1.5rem; /* Align with settings button */
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .footer {
        bottom: 0.5rem;
        left: 0.5rem; /* Move to left side on mobile */
        gap: 1.5rem; /* Gap on mobile */
        flex-direction: row; /* Normal order on mobile too */
    }
    
    .version-number {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .discord-footer {
        width: 35px;
        height: 35px;
    }
    
    .discord-logo {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .pause-btn {
        top: 5.5rem; /* Increased gap below settings button on small screens */
        right: 1rem; /* Align with settings button */
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .footer {
        bottom: 0.3rem;
        left: 0.3rem; /* Move to left side on small mobile */
        gap: 1.2rem; /* Gap on small mobile */
        flex-direction: row; /* Normal order on small mobile too */
    }
    
    .version-number {
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
    
    .discord-footer {
        width: 30px;
        height: 30px;
    }
    
    .discord-logo {
        width: 18px;
        height: 18px;
    }
}