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

:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff006e;
    --background-color: #0a0a1a;
    --surface-color: #1a1a2e;
    --text-color: #ffffff;
    --text-secondary: #a0a0b0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
}

#game-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Mobile performance optimizations */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    /* Disable text selection and user interaction for better performance */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: scaleIn 0.4s ease-out;
    border: 2px solid var(--primary-color);
}

.modal-content h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-help {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn.secondary {
    background: linear-gradient(135deg, #666, #444);
}

.menu-btn.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #888, #666);
}

.menu-btn.small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.current-user {
    background: rgba(0, 212, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--primary-color);
}

.current-user p {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* User Info in Main Menu */
.user-info {
    background: rgba(0, 212, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--primary-color);
}

.user-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.username-display {
    color: var(--primary-color);
    font-weight: bold;
    padding: 0.2rem 0.8rem;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 15px;
}

.change-user-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.change-user-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: scale(1.1);
}

/* Input validation styles */
.input-group input.invalid {
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.input-group .error-message {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.input-group input.invalid + .input-help + .error-message,
.input-group input.invalid ~ .error-message {
    display: block;
}

/* Leaderboard username styles */
.leaderboard-entry .leaderboard-username {
    color: var(--primary-color);
    font-weight: bold;
    flex: 1;
    text-align: left;
    margin-left: 1rem;
}

.leaderboard-entry .leaderboard-score {
    color: var(--secondary-color);
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateX(5px);
}

.leaderboard-rank {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 40px;
    font-size: 1.1rem;
}

.leaderboard-rank.top-rank {
    color: #ffd700; /* Gold for #1 */
}

.leaderboard-rank.second-rank {
    color: #c0c0c0; /* Silver for #2 */
}

.leaderboard-rank.third-rank {
    color: #cd7f32; /* Bronze for #3 */
}

.current-user-score {
    color: var(--secondary-color) !important;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background-color), var(--surface-color));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-out;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    animation: slideUp 0.8s ease-out;
}

.loading-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px var(--primary-color)); }
    to { filter: drop-shadow(0 0 20px var(--secondary-color)); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.loading-bar {
    width: 300px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin: 1rem auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

#loading-text {
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Menu Styles */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease-out;
}

.menu-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.menu-content::-webkit-scrollbar {
    width: 8px;
}

.menu-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.menu-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.game-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* Player Stats */
.player-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.xp-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
}

.xp-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.8s ease-out;
    position: relative;
}

.xp-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.stat-value.updated {
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--secondary-color); }
    100% { transform: scale(1); }
}

/* Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), #0088cc);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    animation: slideInFromLeft 0.6s ease-out;
}

.menu-btn:nth-child(1) { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(2) { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(3) { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(4) { animation-delay: 0.4s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(5) { animation-delay: 0.5s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(6) { animation-delay: 0.6s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(7) { animation-delay: 0.7s; opacity: 0; animation-fill-mode: forwards; }
.menu-btn:nth-child(8) { animation-delay: 0.8s; opacity: 0; animation-fill-mode: forwards; }

@keyframes slideInFromLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.menu-btn:active:not(:disabled) {
    transform: translateY(0);
    transition: transform 0.1s;
}

.menu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #555, #333);
}

/* Game HUD */
#game-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    animation: fadeIn 0.5s ease-out;
}

.hud-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    animation: slideInFromTop 0.6s ease-out;
    border: 1px solid rgba(0, 212, 255, 0.3);
    height: 60px;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hud-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.hud-stat:hover {
    transform: scale(1.05);
}

.hud-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin: 0;
}

.hud-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: all 0.3s ease;
    text-shadow: 0 0 10px currentColor;
    margin: 0;
}

.hud-value.changing {
    animation: valueUpdate 0.4s ease-out;
}

@keyframes valueUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); filter: brightness(1.5); }
    100% { transform: scale(1); }
}

.hud-unit {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-left: 0.1rem;
}

.hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.hud-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    pointer-events: all;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hud-btn:hover {
    background: rgba(0, 212, 255, 0.5);
    transform: scale(1.05);
}

/* Power-up HUD */
.hud-powerups {
    position: absolute;
    top: 80px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 150px;
}

.powerup-indicator {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 8px 12px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    animation: slideInRight 0.3s ease-out;
}

.powerup-indicator.speed { border-left-color: #00ff00; }
.powerup-indicator.shield { border-left-color: #0088ff; }
.powerup-indicator.slowmo { border-left-color: #ff00ff; }
.powerup-indicator.magnet { border-left-color: #ff8800; }

.powerup-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.powerup-icon.speed { background: #00ff00; }
.powerup-icon.shield { background: #0088ff; }
.powerup-icon.slowmo { background: #ff00ff; }
.powerup-icon.magnet { background: #ff8800; }

.powerup-text {
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
}

.powerup-timer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Enhanced Game Effects */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 300;
    animation: flash 0.3s ease-out;
}

.screen-flash.damage {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.5) 0%, transparent 70%);
}

.screen-flash.powerup {
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Speed lines effect */
.speed-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.speed-lines.active {
    opacity: 0.6;
}

.speed-line {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, 0.8), transparent);
    animation: speedLine 0.5s linear infinite;
}

@keyframes speedLine {
    from { transform: translateY(-100px); }
    to { transform: translateY(calc(100vh + 100px)); }
}

/* Vehicle List */
.vehicle-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.vehicle-item {
    background: rgba(0, 212, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vehicle-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.vehicle-item.selected {
    border-color: var(--secondary-color);
    background: rgba(255, 0, 110, 0.1);
}

.vehicle-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.vehicle-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.vehicle-stats {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.vehicle-level {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Skills */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 212, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
}

.skill-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.skill-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skill-level {
    margin-top: 0.5rem;
    font-weight: bold;
}

.skill-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.skill-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.skill-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.skill-points-display {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Leaderboard */
.mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.leaderboard-rank {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 30px;
}

.leaderboard-score {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Multiplayer */
.multiplayer-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mp-section {
    background: rgba(0, 212, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
}

.mp-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mp-section input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.mp-section input::placeholder {
    color: var(--text-secondary);
}

#mp-status {
    text-align: center;
    color: var(--text-secondary);
    margin: 1rem 0;
}

#connected-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-tag {
    background: rgba(0, 212, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-align: center;
}

/* Settings */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    background: rgba(0, 212, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    gap: 0.5rem;
}

.setting-item label {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.username-setting {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.username-setting input {
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
}

.username-setting input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.username-setting input::placeholder {
    color: var(--text-secondary);
}

.setting-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.setting-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.setting-help {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.current-username-display {
    font-size: 0.9rem;
    color: var(--text-color);
    background: rgba(0, 212, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    align-self: flex-start;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.setting-item select {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.setting-item select option {
    background: var(--surface-color);
}

/* Game Over */
.game-stats {
    background: rgba(0, 212, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
}

.stat-row:last-child {
    border-bottom: none;
}

.level-up {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
}

.level-up-text {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }

    .menu-content {
        padding: 2rem;
    }

    .hud-top {
        padding: 0.5rem 1rem;
        height: 50px;
        gap: 0;
        justify-content: space-between;
    }

    .hud-stat {
        gap: 0.3rem;
    }

    .hud-label {
        font-size: 0.65rem;
    }

    .hud-value {
        font-size: 0.9rem;
    }

    .hud-unit {
        font-size: 0.6rem;
    }

    .hud-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .hud-powerups {
        top: 60px;
        right: 5px;
        max-width: 120px;
    }

    .powerup-indicator {
        padding: 6px 8px;
        min-width: 100px;
    }

    .powerup-text {
        font-size: 0.75rem;
    }

    .vehicle-list {
        grid-template-columns: 1fr;
    }

    .mode-tabs {
        flex-direction: column;
    }

    .setting-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .setting-item input[type="range"] {
        width: 100%;
    }
}
