@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

html {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    background-attachment: fixed;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: inherit;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    position: relative;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

canvas {
    border: 4px solid #ffffff;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #0f3460, #16537e);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #ffffff;
    font-size: 12px;
    text-shadow: 2px 2px 0px #000000;
    z-index: 100;
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #ffffff;
    font-size: 10px;
    text-shadow: 2px 2px 0px #000000;
    z-index: 100;
}

.title {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #00ffff;
    font-size: 16px;
    text-shadow: 2px 2px 0px #000000;
    z-index: 100;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0a0a1a, #1a1a2e, #16213e);
    background-size: 600% 600%;
    animation: gradientShift 3s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-container {
    text-align: center;
    color: #ffffff;
}

.loading-title {
    font-size: 32px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 2px 2px 0px #000000;
    margin-bottom: 40px;
    animation: titlePulse 2s ease-in-out infinite;
}

.loading-spinner {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    margin: 20px 0;
}

.spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    border-top: 4px solid #00ffff;
    border-right: 4px solid #00ffff;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-bottom: 4px solid #ff00ff;
    border-left: 4px solid #ff00ff;
    animation-delay: -0.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top: 4px solid #ffff00;
    border-right: 4px solid #ffff00;
    animation-delay: -1s;
}

.loading-text {
    font-size: 12px;
    margin: 30px 0 20px 0;
    text-shadow: 2px 2px 0px #000000;
    animation: textBlink 1.5s ease-in-out infinite;
}

.loading-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressFill 3s ease-in-out forwards, progressGlow 1.5s ease-in-out infinite;
    width: 0%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes titlePulse {
    0%, 100% { 
        text-shadow: 0 0 20px #00ffff, 2px 2px 0px #000000;
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 30px #00ffff, 0 0 40px #00ffff, 2px 2px 0px #000000;
        transform: scale(1.05);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes progressGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.lobby-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    text-align: center;
    color: #ffffff;
    position: relative;
    z-index: 10;
    padding: 20px;
    box-sizing: border-box;
}

.lobby-title {
    font-size: 48px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 2px 2px 0px #000000;
    margin-bottom: 20px;
    animation: titlePulse 2s ease-in-out infinite;
}

.lobby-subtitle {
    font-size: 14px;
    color: #ffffff;
    text-shadow: 2px 2px 0px #000000;
    margin-bottom: 40px;
    opacity: 0.8;
}

.lobby-section {
    margin: 40px 0;
    max-width: 600px;
}

.lobby-text {
    font-size: 10px;
    color: #ffffff;
    text-shadow: 2px 2px 0px #000000;
    margin: 15px 0;
    line-height: 1.5;
}

.lobby-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px 0;
}

.lobby-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    padding: 15px 30px;
    border: 3px solid #00ffff;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.05));
    color: #00ffff;
    text-decoration: none;
    text-shadow: 2px 2px 0px #000000;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    user-select: none;
}

.lobby-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 255, 255, 0.1));
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.lobby-button-play {
    border-color: #00ff00;
    color: #00ff00;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 255, 0, 0.05));
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.lobby-button-play:hover {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.lobby-button-settings {
    border-color: #ffff00;
    color: #ffff00;
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.1), rgba(255, 255, 0, 0.05));
    box-shadow: 
        0 0 20px rgba(255, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.lobby-button-settings:hover {
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.2), rgba(255, 255, 0, 0.1));
    box-shadow: 
        0 0 30px rgba(255, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #00ffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 
        0 0 50px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 300px;
    transition: all 0.3s ease;
}

.settings-title {
    font-size: 20px;
    color: #00ffff;
    text-shadow: 2px 2px 0px #000000;
    margin-bottom: 30px;
    text-align: center;
}

.settings-item {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-item label {
    font-size: 12px;
    color: #ffffff;
    text-shadow: 2px 2px 0px #000000;
}

.settings-input {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 10px;
    border: 2px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border-radius: 4px;
    text-shadow: 1px 1px 0px #000000;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.settings-input:focus {
    outline: none;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(0, 255, 255, 0.5);
}

.settings-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.settings-color {
    width: 60px;
    height: 40px;
    border: 2px solid #00ffff;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
}

@media (max-width: 768px) {
    .settings-color {
        width: 80px;
        height: 48px;
        border-radius: 6px;
    }
}

.lobby-button-close {
    width: 100%;
    margin-top: 20px;
    min-height: 50px;
    font-size: 14px;
    padding: 15px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lobby-button-close:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.lobby-button-close {
    margin-top: 20px;
    border-color: #ff0000;
    color: #ff0000;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 0, 0, 0.05));
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.lobby-button-close:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
}

#menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: none;
    z-index: 1000;
    text-align: center;
    transition: transform 0.3s ease-out;
}

#menu.show {
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

#menu h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-family: 'Press Start 2P', cursive;
}

#menu .menu_items button {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 18px;
    background-color: #ffcc00;
    color: black;
    border: 2px solid #000;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 0 4px #000;
    transition: transform 0.2s, box-shadow 0.2s;
}

#menu .menu_items button:active {
    transform: translateY(4px);
    box-shadow: 0 0 #000;
}

#menu .settings {
    margin-top: 20px;
}

#menu .settings_item {
    margin-bottom: 10px;
}

#menu .settings_item label {
    display: block;
    margin-bottom: 5px;
    font-family: 'Press Start 2P', cursive;
}

#menu .settings_item input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: linear-gradient(to right, #ffcc00, #ff6600);
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#menu .settings_item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffcc00;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#menu .settings_item input[type="range"]:hover {
    opacity: 1;
}

.connection-error-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ff0000;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 100;
}

.connection-error-box div {
    font-size: 24px;
    margin-bottom: 20px;
}

.connection-error-box button {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 18px;
    background-color: #ffcc00;
    color: black;
    border: 2px solid #000;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 0 4px #000;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-notification {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffcc00;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.quote-container {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
    margin: 20px auto;
    max-width: 80%;
}

.quote-text {
    color: #ffcc00;
    font-style: italic;
    font-size: 18px;
    text-align: center;
}

.settings-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.settings-button {
    background-color: #ffcc00;
    color: black;
    border: 2px solid #000;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.settings-button:active {
    transform: translateY(2px);
    box-shadow: 0 0 #000;
}

.server-response {
    color: #00ff00;
    font-size: 14px;
    margin-top: 10px;
    height: 20px;
    text-align: center;
}

.mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    z-index: 1000;
    pointer-events: none;
}

.joystick-container {
    position: absolute;
    bottom: 20px;
    pointer-events: all;
}

.left-joystick {
    left: 20px;
}

.left-joystick .joystick-stick {
    background: rgba(0, 255, 100, 0.8);
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.5);
}

.right-joystick {
    right: 120px;
}

.right-joystick .joystick-stick {
    background: rgba(255, 100, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.joystick-base {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    touch-action: none;
}

.joystick-stick {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.8);
    border: 2px solid #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.joystick-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.left-joystick .joystick-label {
    color: rgba(0, 255, 100, 0.9);
}

.right-joystick .joystick-label {
    color: rgba(255, 100, 0, 0.9);
}

.mobile-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: all;
}

.mobile-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    text-shadow: 2px 2px 0px #000000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
}

.mobile-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.shoot-btn {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.shoot-btn:active {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

.reload-btn {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.reload-btn:active {
    background: rgba(0, 255, 0, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

@media (max-width: 768px) {
    .settings-color {
        width: 80px;
        height: 48px;
        border-radius: 6px;
    }
    
    .lobby-button-close {
        width: 100%;
        margin-top: 20px;
        min-height: 50px;
        font-size: 14px;
        padding: 15px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .lobby-button-close:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .settings-item label {
        font-size: 11px;
        margin-bottom: 8px;
        display: block;
    }
    
    .server-response {
        font-size: 12px;
        margin: 15px 0;
        min-height: 24px;
    }
}

@media (max-width: 768px) {
    .settings-panel {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        top: 10px;
        transform: translateX(-50%);
        left: 50%;
        padding-bottom: 60px;
    }
    
    body.settings-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .settings-item:first-child {
        margin-top: 0;
    }
    
    .settings-item:last-of-type {
        margin-bottom: 20px;
    }
    
    .settings-buttons {
        margin-top: 10px;
    }
    
    .server-response {
        min-height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
        margin: 15px 0;
        padding: 8px;
    }
}

@media (max-width: 360px) {
    .settings-panel {
        width: 98%;
        left: 1%;
        top: 1%;
        height: 98%;
        padding: 12px;
        border-radius: 8px;
    }
    
    .settings-title {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .settings-item {
        margin: 15px 0;
    }
    
    .settings-item label {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    .settings-input {
        font-size: 14px;
        padding: 12px;
        min-height: 48px;
    }
    
    .settings-button {
        font-size: 8px;
        padding: 10px 12px;
        min-height: 44px;
        min-width: 65px;
        margin: 4px;
    }
    
    .settings-buttons {
        gap: 8px;
    }
    
    .lobby-button-close {
        font-size: 12px;
        padding: 12px;
        min-height: 48px;
        margin-top: 15px;
    }
    
    .server-response {
        font-size: 11px;
        margin: 10px 0;
    }
}

@media (hover: none) and (pointer: coarse) {
    .settings-button:hover {
        background-color: #ffcc00;
        transform: none;
    }
    
    .settings-button:active {
        background-color: #e6b800;
        transform: translateY(1px) scale(0.98);
    }
    
    .settings-input:focus {
        border-color: #00ff00;
        box-shadow: 
            inset 0 0 10px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(0, 255, 0, 0.6);
    }
    
    .settings-color {
        min-width: 80px;
        min-height: 48px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .settings-button:hover {
        background-color: #ffd700;
        transform: translateY(-1px);
        box-shadow: 0 3px  #000;
    }
    
    .lobby-button:hover {
        transform: translateY(-2px);
        box-shadow: 
            0 6px 20px rgba(0, 255, 255, 0.4),
            inset 0 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .settings-input:hover {
        border-color: #00ff00;
    }
    
    .settings-color:hover {
        border-color: #00ff00;
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    }
}

@media screen and (max-width: 1024px) and (orientation: portrait) {
    .settings-panel {
        width: 90%;
        left: 5%;
        transform: translate(0, 0);
        top: 5%;
        height: 90%;
    }
    
    .lobby-container {
        padding: 20px;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
    .settings-panel {
        width: 70%;
        left: 15%;
        height: 85%;
        top: 7.5%;
    }
    
    .mobile-controls {
        display: block;
        height: 140px;
    }
}

@media screen and (min-width: 1025px) {
    .mobile-controls {
        display: none !important;
    }
    
    .settings-panel {
        max-width: 500px;
        width: auto;
        min-width: 400px;
    }
    
    .lobby-container {
        max-width: 800px;
    }
}

.device-mobile .game-ui {
    font-size: 10px;
    top: 10px;
    left: 10px;
}

.device-mobile .title {
    font-size: 14px;
    top: 10px;
    right: 10px;
}

.device-mobile .controls {
    display: none;
}

.device-desktop .mobile-controls,
.device-desktop .joystick-container,
.device-desktop .mobile-buttons {
    display: none !important;
}

.device-mobile .lobby-container {
    padding: 15px;
    max-width: 100%;
}

.device-tablet .lobby-container {
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
}

.device-desktop .lobby-container {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.has-touch .lobby-button {
    -webkit-tap-highlight-color: transparent;
}

.no-touch .lobby-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 255, 255, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.1);
}

@media screen and (max-device-width: 480px) {
    .device-mobile .settings-panel {
        border-radius: 0;
        border-left: none;
        border-right: none;
        width: 100%;
        left: 0;
        top: 0;
        height: 100%;
        padding: 20px 15px;
    }
}

@media (min-device-width: 1025px) {
    .device-desktop .settings-panel {
        box-shadow: 
            0 0 50px rgba(0, 255, 255, 0.4),
            inset 0 0 20px rgba(0, 0, 0, 0.3),
            0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

.device-mobile .settings-panel {
    width: 90%;
    left: 5%;
    top: 5%;
    height: 90%;
    transform: translate(0, 0);
    position: fixed;
}

.device-tablet .settings-panel {
    width: 70%;
    left: 15%;
    max-width: 600px;
}

.device-desktop .settings-panel {
    width: auto;
    min-width: 400px;
    max-width: 500px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.device-mobile .mobile-controls {
    display: block;
}

.device-desktop .mobile-controls {
    display: none !important;
}

.has-touch .settings-button {
    min-height: 48px;
    touch-action: manipulation;
}

.no-touch .settings-button:hover {
    background-color: #ffd700;
    transform: translateY(-1px);
}

.has-touch .settings-input {
    font-size: 16px;
    min-height: 44px;
}

.device-mobile.portrait .settings-panel {
    height: 90vh;
    height: 90dvh;
}

.device-mobile.landscape .settings-panel {
    width: 80%;
    left: 10%;
    height: 85vh;
    height: 85dvh;
}

.device-tablet.landscape .settings-panel {
    width: 60%;
    left: 20%;
    columns: 2;
    column-gap: 30px;
}

.device-tablet.landscape .settings-item {
    break-inside: avoid;
}

.device-mobile .mobile-controls {
    display: block !important;
}

.device-tablet.landscape .mobile-controls {
    display: block !important;
    height: 160px;
}

.device-desktop .mobile-controls {
    display: none !important;
}

.device-mobile .settings-input:focus {
    zoom: 1;
    -webkit-text-size-adjust: 100%;
}

.device-desktop .settings-input:focus {
    border-color: #00ff00;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 255, 0, 0.5);
}

.device-mobile .settings-button:active {
    background-color: #e6b800;
    transform: translateY(1px) scale(0.98);
}

.device-desktop .settings-button:hover {
    background-color: #ffd700;
    transform: translateY(-1px);
    box-shadow: 0 3px #000;
}

.device-mobile.landscape .lobby-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.device-mobile.portrait .lobby-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.device-mobile .settings-color {
    min-width: 80px;
    min-height: 48px;
    cursor: pointer;
}

.device-desktop .settings-color {
    width: 60px;
    height: 40px;
}

.has-touch * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.device-mobile .settings-panel {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.device-desktop .settings-panel {
    box-shadow: 
        0 0 50px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.2);
}

.device-desktop .lobby-button:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}