/* --- CRITICAL CSS FALLBACKS (Works without Tailwind) --- */
body {
    font-family: 'Press Start 2P', cursive;
    touch-action: none;
    background-color: #0f172a;
    margin: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.font-tech {
    font-family: 'Share Tech Mono', monospace;
}

/* Layout Structure */
.main-layout {
    display: flex;
    width: 100%;
    max-width: 1280px;
    height: 100dvh;
    /* Full height on mobile */
    gap: 1.5rem;
    padding: 0;
    /* No padding on mobile */
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .main-layout {
        height: 90vh;
        padding: 1rem;
    }
}

.side-panel {
    width: 16rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.game-center {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s linear;
}

/* Visibility */
.hidden {
    display: none !important;
}

/* Desktop Logic */
@media (min-width: 1024px) {
    .side-panel {
        display: flex;
    }
}

/* Styling */
.panel-box {
    background-color: #1e293b;
    border: 2px solid #334155;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.shake-hard {
    animation: shake 0.5s;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.recording-pulse {
    animation: recPulse 1s infinite;
}

@keyframes recPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #fbbf24;
    cursor: pointer;
    margin-top: -6px;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #475569;
    border-radius: 2px;
}