:root {
    --neon-cyan: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff41;
    --glass-bg: rgba(10, 16, 26, 0.95);
    --grid-line: rgba(0, 243, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    user-select: none;
}

/* Performance optimizations */
canvas {
    will-change: contents;
}

button,
.cyber-btn {
    will-change: transform, background-color;
}

body {
    background-color: #050510;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.9) 100%);
    pointer-events: none;
    z-index: 1;
}

.ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header {
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.score-board {
    display: flex;
    gap: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--neon-cyan);
    padding: 10px 30px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(5px);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    letter-spacing: 2px;
}

.value {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.game-wrapper {
    position: relative;
    z-index: 5;
    padding: 4px;
    background: linear-gradient(45deg, var(--neon-cyan), transparent, var(--neon-pink));
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
    border-radius: 8px;
}

canvas {
    background: rgba(5, 5, 10, 0.9);
    display: block;
    border-radius: 4px;
}

/* Menu Screens - Premium Fullscreen Design */
.menu-screen {
    pointer-events: auto;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile */
    background: linear-gradient(135deg, rgba(5, 10, 20, 0.98) 0%, rgba(10, 20, 40, 0.95) 50%, rgba(5, 10, 20, 0.98) 100%);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.15s ease;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 10px;
    box-sizing: border-box;
}

/* Animated border glow around edge of screen */
.menu-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan), var(--neon-green), var(--neon-cyan)) border-box;
    background-size: 400% 400%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderFlow 8s ease infinite;
    pointer-events: none;
}

/* Subtle grid overlay */
.menu-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Corner decorations */
.menu-screen .corner-decoration {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--neon-cyan);
    opacity: 0.6;
}

.menu-screen .corner-decoration.top-left {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.menu-screen .corner-decoration.top-right {
    top: 15px;
    right: 15px;
    border-left: none;
    border-bottom: none;
}

.menu-screen .corner-decoration.bottom-left {
    bottom: 15px;
    left: 15px;
    border-right: none;
    border-top: none;
}

.menu-screen .corner-decoration.bottom-right {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes menuGlow {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(0, 243, 255, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 80px rgba(0, 243, 255, 0.25), 0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

/* Specific styling for customize screen to be compact */
#customize-screen {
    padding: 30px 20px;
    max-width: 90vw;
    max-height: 85vh;
}


.menu-screen.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

/* Generic hidden class for other elements like hat section */
.hidden {
    display: none !important;
}

.title {
    font-size: 5rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #fff 0%, var(--neon-cyan) 50%, #fff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 6px;
    margin-bottom: 0;
    animation: titleShimmer 4s ease infinite;
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.5));
    position: relative;
}

/* Glow layer behind title */
.title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    z-index: -1;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titleShimmer {
    0% {
        background-position: 200% 50%;
    }

    100% {
        background-position: -200% 50%;
    }
}

@keyframes titlePulse {

    0%,
    100% {
        opacity: 0;
        filter: blur(10px);
    }

    50% {
        opacity: 0.3;
        filter: blur(15px);
    }
}

.title.red-glow {
    background: linear-gradient(135deg, #fff 0%, #ff4444 50%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.5));
}

.subtitle {
    font-size: 1.3rem;
    color: transparent;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan), var(--neon-pink));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: 5px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 500;
    animation: subtitleFlow 3s ease infinite;
}

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

    100% {
        background-position: 200% 50%;
    }
}

.instructions {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.6;
}

/* Cyber Button - Premium Design (Large) */
.cyber-btn {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    color: var(--neon-cyan);
    border: 2px solid rgba(0, 243, 255, 0.5);
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 200px;
}

/* Animated scan line effect */
.cyber-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.4s ease;
}

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

.cyber-btn:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.8) 0%, rgba(0, 200, 220, 0.9) 100%);
    color: #000;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5), 0 0 60px rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

.cyber-btn:active {
    transform: scale(0.98) translateY(0);
}

.cyber-btn.sm {
    padding: 14px 28px;
    font-size: 1rem;
    border-width: 2px;
    letter-spacing: 3px;
    min-width: 120px;
}

.cyber-btn.selected {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, rgba(0, 200, 220, 1) 100%);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Primary button - main action */
.cyber-btn.primary {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.3) 0%, rgba(0, 150, 200, 0.4) 100%);
    padding: 22px 60px;
    font-size: 1.4rem;
    min-width: 280px;
}

/* Secondary button */
.cyber-btn.secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    padding: 16px 40px;
    min-width: 250px;
}

.cyber-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

/* Icon button */
.cyber-btn.icon-btn {
    width: 60px;
    height: 60px;
    padding: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset;
}

/* Corner decorations */
.corner-deco {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 10;
}

.corner-deco::before,
.corner-deco::after {
    content: '';
    position: absolute;
    background: var(--neon-cyan);
    opacity: 0.5;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.corner-deco.top-left {
    top: 30px;
    left: 30px;
}

.corner-deco.top-right {
    top: 30px;
    right: 30px;
}

.corner-deco.bottom-left {
    bottom: 30px;
    left: 30px;
}

.corner-deco.bottom-right {
    bottom: 30px;
    right: 30px;
}

.corner-deco.top-left::before,
.corner-deco.top-right::before,
.corner-deco.bottom-left::before,
.corner-deco.bottom-right::before {
    width: 60px;
    height: 3px;
}

.corner-deco.top-left::after,
.corner-deco.top-right::after,
.corner-deco.bottom-left::after,
.corner-deco.bottom-right::after {
    width: 3px;
    height: 60px;
}

.corner-deco.top-left::before,
.corner-deco.top-left::after {
    top: 0;
    left: 0;
}

.corner-deco.top-right::before {
    top: 0;
    right: 0;
}

.corner-deco.top-right::after {
    top: 0;
    right: 0;
}

.corner-deco.bottom-left::before {
    bottom: 0;
    left: 0;
}

.corner-deco.bottom-left::after {
    bottom: 0;
    left: 0;
}

.corner-deco.bottom-right::before {
    bottom: 0;
    right: 0;
}

.corner-deco.bottom-right::after {
    bottom: 0;
    right: 0;
}

/* Lobby Coins Display */
.lobby-coins {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 180, 0, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50px;
    padding: 12px 30px;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 0 15px rgba(255, 215, 0, 0.1);
    animation: coinGlow 2s ease-in-out infinite;
}

@keyframes coinGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 0 15px rgba(255, 215, 0, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.2);
    }
}

.lobby-coins .coin-icon {
    font-size: 1.8rem;
    animation: coinBounce 1s ease infinite;
}

@keyframes coinBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.lobby-coins .coin-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    letter-spacing: 2px;
}

.lobby-coins .coin-label {
    font-size: 0.9rem;
    color: rgba(255, 215, 0, 0.8);
    letter-spacing: 3px;
    font-weight: 500;
}

/* Menu divider */
.menu-divider {
    width: 60%;
    max-width: 500px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), rgba(255, 0, 255, 0.3), transparent);
    margin: 25px 0;
}

/* Section label */
.section-label {
    color: var(--neon-cyan);
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Input group */
.input-group {
    margin: 25px 0;
}

/* Cyber input - premium styling (Large) */
.cyber-input {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 12px;
    padding: 16px 30px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 3px;
    width: 320px;
    transition: all 0.3s ease;
    outline: none;
}

.cyber-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
}

.cyber-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3), inset 0 0 10px rgba(0, 243, 255, 0.1);
}

/* Button group */
.button-group {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.button-group.main-actions {
    align-items: stretch;
}

/* Difficulty Selector */
.difficulty-selector {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.diff-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.hologram-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 6;
    opacity: 0.3;
}

@keyframes spin {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

.spinning-item {
    font-size: 8rem;
    animation: spin 3s infinite linear;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    margin: 20px;
}

.custom-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Color Grid / Hat Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 10px;
    overflow-y: auto;
    max-height: 50vh;
    padding: 10px;
}

.color-option,
.hat-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
}

.color-option:hover,
.hat-option:hover {
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.color-option.selected,
.hat-option.selected {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: scale(1.1);
}

.hat-option.locked {
    opacity: 0.8;
    filter: grayscale(0.8);
    border-color: #333;
}

.hat-price {
    position: absolute;
    bottom: -20px;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    color: #ffd700;
    text-shadow: 0 0 2px #000;
}

.hat-option.can-buy {
    border-color: #ffd700;
    filter: none;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.hat-option.can-buy::after {
    content: "💰";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1rem;
}

.coin-display {
    font-size: 1.2rem;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #ffd700;
    font-weight: bold;
}

.hat-option.locked::after {
    content: "🔒";
    position: absolute;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 5px #000;
}

/* Close/X Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 68, 68, 0.3);
    border: 2px solid #ff4444;
    color: #ff4444;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 68, 68, 0.5);
    color: white;
}

#cheat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    transform: none;
    background: red;
    color: white;
    padding: 15px 25px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    border: none;
}

#cheat-btn.active {
    background: #00ff41;
    color: black;
    box-shadow: 0 0 20px #00ff41;
}

.close-btn:hover {
    transform: scale(1.2);
    color: white;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: white;
}

.color-option.selected {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: scale(1.1);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 5px black;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050510;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: var(--neon-cyan);
    width: 300px;
}

.neon-text-large {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
    margin-bottom: 2rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
}

.loading-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 0.2s linear;
}

#loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    margin-top: 10px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-top: 3px solid var(--neon-cyan);
    border-radius: 50%;
    margin: 0 auto 20px auto;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.snake-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px auto;
    filter: drop-shadow(0 0 15px #00ff41);
    animation: float 2s ease-in-out infinite;
}

.snake-tongue {
    animation: tongueFlick 1s infinite;
    transform-origin: 105px 55px;
}

@keyframes tongueFlick {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    10%,
    90% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===== ANIMATION SELECTOR ===== */
.anim-selector-settings {
    width: 100%;
    text-align: center;
}

.anim-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.anim-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.anim-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.anim-btn.selected {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

/* ===== ORGANIZED SETTINGS STYLES ===== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.settings-section-title {
    color: var(--neon-cyan);
    font-size: 0.85rem;
    letter-spacing: 3px;
    font-weight: 600;
    text-align: left;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    margin-bottom: 5px;
}

.settings-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    font-size: 0.85rem;
}

.settings-btn.danger {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.settings-btn.danger:hover {
    background: rgba(255, 68, 68, 0.3);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
}

.settings-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin: 0 0 10px 0;
    text-align: center;
}

.settings-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.3), transparent);
    margin: 10px 0;
}

/* Enhanced Animation Selector Buttons */
.anim-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.anim-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 243, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 15px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.anim-icon {
    font-size: 1.5rem;
}

.anim-name {
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.anim-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

.anim-btn.selected {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.4), inset 0 0 15px rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}



/* Hide non-active animations */
.loader-content {
    display: none;
}

.loader-content.active {
    display: flex;
}

/* ===== SMOOTH ANIMATION ===== */
.anim-smooth {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.smooth-glow {
    animation: smoothPulse 3s ease-in-out infinite;
}

@keyframes smoothPulse {

    0%,
    100% {
        text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
        opacity: 0.8;
    }

    50% {
        text-shadow: 0 0 40px var(--neon-cyan), 0 0 80px var(--neon-cyan), 0 0 120px var(--neon-pink);
        opacity: 1;
    }
}

.smooth-orb-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 30px 0;
}

.smooth-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    border-radius: 50%;
    animation: orbPulse 2s ease-in-out infinite;
}

@keyframes orbPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

.smooth-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    opacity: 0;
    animation: ringExpand 3s ease-out infinite;
}

.ring1 {
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.ring2 {
    width: 80px;
    height: 80px;
    animation-delay: 1s;
}

.ring3 {
    width: 80px;
    height: 80px;
    animation-delay: 2s;
}

@keyframes ringExpand {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

.smooth-wave {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 40px;
    margin: 20px 0;
}

.wave-bar {
    width: 8px;
    background: linear-gradient(to top, var(--neon-cyan), var(--neon-pink));
    border-radius: 4px;
    animation: waveAnim 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) {
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
    animation-delay: 0.4s;
}

.wave-bar:nth-child(6) {
    animation-delay: 0.5s;
}

.wave-bar:nth-child(7) {
    animation-delay: 0.6s;
}

@keyframes waveAnim {

    0%,
    100% {
        height: 10px;
    }

    50% {
        height: 40px;
    }
}

.smooth-text {
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    letter-spacing: 3px;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ===== RETRO ANIMATION ===== */
.anim-retro {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    font-family: 'Courier New', monospace;
}

.retro-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 10;
}

.retro-title {
    font-size: 3rem;
    color: #00ff41;
    text-shadow: 0 0 10px #00ff41;
    margin-bottom: 30px;
    position: relative;
}

.glitch {
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
    animation: glitchBottom 2s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitchTop {

    0%,
    100% {
        transform: translate(0);
        color: #00ff41;
    }

    50% {
        transform: translate(-3px, 0);
        color: #ff00ff;
    }
}

@keyframes glitchBottom {

    0%,
    100% {
        transform: translate(0);
        color: #00ff41;
    }

    50% {
        transform: translate(3px, 0);
        color: #00f3ff;
    }
}

.retro-terminal {
    text-align: left;
    margin: 20px 0;
}

.retro-line {
    color: #00ff41;
    font-size: 0.9rem;
    margin: 8px 0;
    opacity: 0;
    animation: typeIn 0.5s forwards;
}

.retro-line:nth-child(1) {
    animation-delay: 0.5s;
}

.retro-line:nth-child(2) {
    animation-delay: 1.2s;
}

.retro-line:nth-child(3) {
    animation-delay: 1.9s;
}

.retro-line:nth-child(4) {
    animation-delay: 2.6s;
}

@keyframes typeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.retro-line.blink {
    animation: typeIn 0.5s forwards, blinkCursor 0.5s infinite 3s;
}

@keyframes blinkCursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.retro-progress {
    width: 200px;
    height: 20px;
    border: 2px solid #00ff41;
    padding: 3px;
    margin-top: 20px;
}

.retro-blocks {
    display: block;
    height: 100%;
    background: repeating-linear-gradient(90deg,
            #00ff41,
            #00ff41 15px,
            transparent 15px,
            transparent 18px);
    width: 0%;
    animation: retroLoad 3s steps(10) forwards;
    box-shadow: 0 0 10px #00ff41;
}

@keyframes retroLoad {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Update Notification Banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.95) 0%, rgba(0, 150, 80, 0.95) 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 200, 100, 0.4);
    animation: slideDown 0.5s ease-out;
    direction: rtl;
}

.update-banner.hidden {
    display: none !important;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.update-icon {
    font-size: 1.5rem;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.update-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.update-btn {
    background: white;
    color: #00a060;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.update-btn:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.dismiss-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Friends Screen Styles */
.friends-add-section {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.friends-list-container {
    width: 100%;
    max-width: 400px;
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.no-friends-text {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    text-align: center;
    padding: 30px;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.friend-item:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--neon-cyan);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.friend-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.friend-status.online {
    background: #00ff41;
    color: #00ff41;
    animation: statusPulse 1.5s ease infinite;
}

.friend-status.offline {
    background: #ff4444;
    color: #ff4444;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.friend-name {
    font-size: 1rem;
    color: white;
    font-weight: 500;
    letter-spacing: 1px;
}

.friend-remove-btn {
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ff4444;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-remove-btn:hover {
    background: rgba(255, 68, 68, 0.3);
    border-color: #ff4444;
}

.friends-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Auth Screen Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 20px 0;
}

.auth-error {
    color: #ff4444;
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    margin: 10px 0;
    max-width: 280px;
    text-align: center;
}

.auth-note {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 20px;
}

/* Friend Request Styles */
.friend-requests-section {
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
}

.friend-requests-title {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 10px;
    text-align: center;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 8px;
}

.friend-request-name {
    color: #ffd700;
    font-weight: 500;
}

.friend-request-actions {
    display: flex;
    gap: 8px;
}

.friend-accept-btn {
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.friend-accept-btn:hover {
    background: rgba(0, 255, 65, 0.4);
}

.friend-reject-btn {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.friend-reject-btn:hover {
    background: rgba(255, 68, 68, 0.4);
}

/* Logout Button */
.logout-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ff6666;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.4);
    border-color: #ff4444;
}

/* Chat Modal Styles */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    pointer-events: auto;
}

.chat-modal.hidden {
    display: none;
}

.chat-container {
    width: 90%;
    max-width: 500px;
    height: 70vh;
    max-height: 600px;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%);
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    pointer-events: auto;
    position: relative;
    z-index: 100000;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 243, 255, 0.1);
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
}

.chat-friend-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    word-wrap: break-word;
}

.chat-message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #00f3ff 0%, #00a8ff 100%);
    color: #000;
    border-bottom-right-radius: 5px;
}

.chat-message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 5px;
}

.chat-message .message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    position: relative;
    z-index: 10001;
}

.chat-input-area input,
#chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid var(--neon-cyan) !important;
    color: #fff !important;
    padding: 12px 15px !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    outline: none !important;
    pointer-events: auto !important;
    cursor: text !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

#chat-input:focus {
    border-color: #00f3ff !important;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5) !important;
}

/* Chat button in friend list */
.friend-chat-btn {
    background: rgba(0, 243, 255, 0.2);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-chat-btn:hover {
    background: rgba(0, 243, 255, 0.4);
    transform: scale(1.1);
}

/* Unread indicator */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Sticker Panel */
.sticker-panel {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 10002;
    pointer-events: auto !important;
}

.sticker {
    font-size: 1.5rem;
    cursor: pointer !important;
    padding: 5px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    user-select: none;
    pointer-events: auto !important;
    position: relative;
    z-index: 10003;
}

.sticker:hover {
    transform: scale(1.3);
    background: rgba(0, 243, 255, 0.2);
}

.sticker-message .message-content {
    font-size: 2.5rem;
    display: block;
    text-align: center;
}

.sticker-message {
    background: transparent !important;
    border: none !important;
}

.join-game-btn {
    display: block;
    width: 100%;
    margin-top: 5px;
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.join-game-btn:hover {
    background: #00ff41;
    color: black;
    box-shadow: 0 0 10px #00ff41;
}

/* 1v1 Battle Arena */
.arena-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0015 0%, #1a0030 50%, #0a0015 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.arena-screen.hidden {
    display: none;
}

.arena-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 650px;
    padding: 15px;
    margin-bottom: 10px;
}

.arena-player {
    text-align: center;
}

.arena-player .player-name {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.arena-player.player1 .player-name {
    color: #00f3ff;
}

.arena-player.player2 .player-name {
    color: #ff4444;
}

.player-health {
    font-size: 1.5rem;
    letter-spacing: 5px;
}

.arena-vs {
    font-size: 1.5rem;
    color: gold;
    text-shadow: 0 0 10px gold;
    animation: pulse 1s infinite;
}

.arena-canvas-container {
    border: 3px solid #ff00ff;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5), inset 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#arenaCanvas {
    display: block;
    background: #0a0a1a;
}

.arena-controls {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.fire-btn {
    background: linear-gradient(45deg, #ff4400, #ff8800) !important;
    border: none !important;
    font-size: 1.2rem !important;
    padding: 15px 40px !important;
    animation: fireGlow 0.5s infinite alternate;
}

@keyframes fireGlow {
    from {
        box-shadow: 0 0 10px #ff4400;
    }

    to {
        box-shadow: 0 0 25px #ff8800, 0 0 40px #ff4400;
    }
}

.danger-btn {
    background: rgba(255, 68, 68, 0.3) !important;
    border: 1px solid #ff4444 !important;
    color: #ff4444 !important;
}

.arena-status {
    margin-top: 15px;
    font-size: 1rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================
   ARENA CHEAT BUTTONS
   ======================================== */

.arena-cheat-btn {
    position: fixed;
    top: 50%;
    left: 20px;
    /* Moved to side */
    transform: translateY(-50%);
    /* Only center vertically */
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    border: 3px solid #ffd700 !important;
    color: #000 !important;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 100001;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    animation: cheatGlow 2s infinite alternate;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.arena-cheat-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

/* ========================================
   FRIENDS SCREEN STYLES - IMPROVED
   ======================================== */
.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    gap: 15px;
    min-height: 60px;
}

.friend-item .friend-name {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: left;
}

.friend-item .friend-actions {
    display: flex;
    gap: 10px;
}

.friend-chat-btn {
    background: rgba(0, 243, 255, 0.2) !important;
    color: var(--neon-cyan) !important;
    border: 1px solid var(--neon-cyan) !important;
    font-size: 1.2rem !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
}

.friend-remove-btn {
    background: rgba(255, 68, 68, 0.2) !important;
    color: #ff4444 !important;
    border: 1px solid #ff4444 !important;
    font-size: 1.2rem !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
}

/* ========================================
   BUTTON FIXES
   ======================================== */
.cyber-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
    /* Fix text clipping */
    padding: 15px 30px;
    /* Adjusted padding */
    min-height: 50px;
    /* Ensure minimum height */
}

.cyber-btn.secondary {
    padding: 15px 30px;
    margin-top: 10px;
}

.arena-cheat-btn.active {
    background: linear-gradient(135deg, #00ff41, #00aa00) !important;
    border-color: #00ff41 !important;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.3);
}

@keyframes cheatGlow {
    from {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }

    to {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

/* God Mode Button */
.cheat-god-btn {
    background: linear-gradient(135deg, #ff00ff, #8800ff) !important;
    border: 2px solid #ff00ff !important;
    color: #fff !important;
    font-weight: bold;
}

.cheat-god-btn.active {
    background: linear-gradient(135deg, #00ff41, #00aa00) !important;
    border-color: #00ff41 !important;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

/* Infinite Fire Button */
.cheat-fire-btn {
    background: linear-gradient(135deg, #ff6600, #ff0000) !important;
    border: 2px solid #ff6600 !important;
    color: #fff !important;
    font-weight: bold;
}

.cheat-fire-btn.active {
    background: linear-gradient(135deg, #00ff41, #00aa00) !important;
    border-color: #00ff41 !important;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

/* ========================================
   AUTH SCREEN STYLES
   ======================================== */

#auth-screen {
    z-index: 150;
}

.auth-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    max-width: 350px;
    padding: 0 15px;
    box-sizing: border-box;
}

.auth-error {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    padding: 10px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 8px;
    max-width: 280px;
}

.auth-note {
    font-size: 0.85rem;
    color: #888;
    margin-top: 20px;
    text-align: center;
}

/* ========================================
   FRIENDS SCREEN STYLES
   ======================================== */

#friends-screen {
    z-index: 150;
}

.friends-add-section {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.friends-list-container {
    width: 100%;
    max-width: 400px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    gap: 10px;
}

.friend-item .friend-name {
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.friend-item .friend-status {
    font-size: 0.8rem;
}

.friend-item .friend-actions {
    display: flex;
    gap: 8px;
}

.friend-item button {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.friends-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #aaa;
}

.no-friends-text {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* Friend Requests */
.friend-requests-section {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 200, 0, 0.1);
    border: 1px solid rgba(255, 200, 0, 0.3);
    border-radius: 10px;
}

.friend-requests-title {
    font-size: 1rem;
    color: #ffd700;
    margin-bottom: 10px;
    font-weight: 600;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 8px;
}

.friend-request-name {
    color: #fff;
    font-weight: 500;
}

.friend-request-actions {
    display: flex;
    gap: 8px;
}

.friend-accept-btn {
    background: #00ff41;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.friend-reject-btn {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablets and smaller screens */
@media screen and (max-width: 900px) {
    canvas#gameCanvas {
        width: 90vw !important;
        height: auto !important;
        max-width: 500px;
        max-height: 400px;
    }

    #arenaCanvas {
        width: 90vw !important;
        height: 90vw !important;
        max-width: 500px;
        max-height: 500px;
    }

    .title {
        font-size: 3rem;
        letter-spacing: 3px;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .cyber-btn {
        padding: 14px 30px;
        font-size: 1rem;
        min-width: 160px;
    }

    .cyber-btn.primary {
        padding: 16px 40px;
        font-size: 1.2rem;
        min-width: 220px;
    }

    .cyber-btn.secondary {
        padding: 12px 30px;
        font-size: 1rem;
        min-width: 200px;
    }

    .score-board {
        gap: 20px;
        padding: 8px 20px;
    }
}

/* Mobile phones */
@media screen and (max-width: 600px) {
    body {
        height: 100dvh;
        /* Use dynamic viewport height for mobile */
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* Make canvas fit mobile screen */
    canvas#gameCanvas {
        width: 95vw !important;
        height: 70vw !important;
        max-width: none;
        max-height: 50vh;
    }

    #arenaCanvas {
        width: 85vw !important;
        height: 85vw !important;
        max-width: 350px;
        max-height: 350px;
    }

    .game-wrapper {
        padding: 2px;
        margin-top: 60px;
    }

    /* Menu screen mobile optimization - CRITICAL FIX */
    .menu-screen {
        padding: 20px 15px;
        padding-top: env(safe-area-inset-top, 25px);
        padding-bottom: env(safe-area-inset-bottom, 30px);
        gap: 10px;
        overflow-y: auto !important;
        overflow-x: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Friends screen specific fixes */
    #friends-screen {
        padding-top: 50px !important;
    }

    #friends-screen .title {
        font-size: 1.6rem !important;
    }

    /* Customize screen specific fixes */
    #customize-screen {
        padding-top: 50px !important;
    }

    /* Auth screen specific fixes */
    #auth-screen {
        padding-top: 40px !important;
    }

    /* Settings modal */
    #settings-modal {
        padding-top: 50px !important;
    }

    .title {
        font-size: 2rem;
        letter-spacing: 2px;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }

    /* Buttons for mobile */
    .cyber-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 140px;
        letter-spacing: 2px;
    }

    .cyber-btn.primary {
        padding: 14px 30px;
        font-size: 1rem;
        min-width: 200px;
    }

    .cyber-btn.secondary {
        padding: 10px 20px;
        font-size: 0.85rem;
        min-width: 180px;
    }

    .cyber-btn.sm {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-width: 90px;
    }

    .cyber-btn.icon-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    /* Input fields */
    .cyber-input {
        width: 260px;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .input-group {
        margin: 15px 0;
    }

    /* Score board header */
    .score-board {
        gap: 10px;
        padding: 6px 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .score-item {
        min-width: 60px;
    }

    .label {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .value {
        font-size: 1rem;
    }

    header {
        top: 10px;
    }

    /* Lobby coins */
    .lobby-coins {
        padding: 8px 20px;
        gap: 8px;
    }

    .lobby-coins .coin-icon {
        font-size: 1.4rem;
    }

    .lobby-coins .coin-amount {
        font-size: 1.5rem;
    }

    .lobby-coins .coin-label {
        font-size: 0.75rem;
    }

    /* Menu divider */
    .menu-divider {
        margin: 15px 0;
        width: 80%;
    }

    /* Difficulty selector */
    .diff-buttons {
        gap: 8px;
    }

    /* Button group */
    .button-group {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Instructions */
    .instructions {
        font-size: 0.75rem;
        padding: 0 10px;
        margin-top: 10px;
    }

    .instructions p {
        margin: 3px 0;
    }

    /* Corner decorations - smaller on mobile */
    .corner-deco {
        width: 30px;
        height: 30px;
    }

    .corner-deco.top-left,
    .corner-deco.top-right,
    .corner-deco.bottom-left,
    .corner-deco.bottom-right {
        top: 10px;
        left: 10px;
    }

    .corner-deco.top-right,
    .corner-deco.bottom-right {
        left: auto;
        right: 10px;
    }

    .corner-deco.bottom-left,
    .corner-deco.bottom-right {
        top: auto;
        bottom: 10px;
    }

    .corner-deco::before,
    .corner-deco::after {
        display: none;
        /* Hide corner decorations on mobile for cleaner look */
    }

    /* Color grid for customization */
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        max-height: 40vh;
        padding: 10px;
        width: 90%;
        margin: 0 auto;
    }

    .custom-tabs {
        gap: 10px;
        margin-bottom: 15px;
    }

    .coin-display {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .color-option,
    .hat-option {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    /* Chat modal */
    .chat-container {
        width: 95vw;
        max-width: none;
        height: 80vh;
    }

    .chat-input-area {
        flex-direction: column;
        gap: 8px;
    }

    .chat-input-area input {
        width: 100% !important;
    }

    /* Promo code container */
    .promo-code-container {
        flex-direction: column;
        align-items: center;
    }

    #promo-input {
        width: 200px !important;
    }

    /* Friends screen */
    .friends-add-section {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    #add-friend-input {
        width: 80% !important;
        max-width: 250px;
    }

    .friends-list-container {
        max-height: 45vh;
        width: 95%;
        margin: 0 auto;
    }

    .friend-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .friend-item .friend-actions {
        width: 100%;
        justify-content: center;
    }

    .friends-note {
        font-size: 0.75rem;
        padding: 0 10px;
    }

    .friend-requests-section {
        width: 95%;
        padding: 10px;
    }

    .friend-request-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .friend-request-actions {
        justify-content: center;
    }

    /* Unlock modal */
    #unlock-modal {
        padding: 20px !important;
    }

    .spinning-item {
        font-size: 5rem;
    }

    /* Arena screen mobile */
    .arena-header {
        padding: 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .arena-player .player-name {
        font-size: 1rem;
    }

    .player-health {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }

    .arena-vs {
        font-size: 1.2rem;
    }

    .arena-controls {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .fire-btn {
        padding: 12px 30px !important;
        font-size: 1rem !important;
    }

    /* Auth screen */
    .auth-form .cyber-input {
        width: 90vw !important;
        max-width: 280px;
    }

    /* Settings modal */
    .settings-container {
        max-height: 70vh;
        overflow-y: auto;
    }

    .settings-row {
        flex-direction: column;
        gap: 10px;
    }

    .anim-selector {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .anim-btn {
        padding: 10px 15px;
    }

    /* Close button positioning */
    .close-btn {
        top: 10px !important;
        right: 10px !important;
    }
}

/* Extra small phones */
@media screen and (max-width: 380px) {
    .title {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .cyber-btn.primary {
        padding: 12px 25px;
        font-size: 0.9rem;
        min-width: 180px;
    }

    .cyber-input {
        width: 220px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    canvas#gameCanvas {
        width: 95vw !important;
        height: 75vw !important;
        max-height: 45vh;
    }

    .score-board {
        gap: 8px;
        padding: 5px 10px;
    }

    .score-item {
        min-width: 50px;
    }

    .label {
        font-size: 0.6rem;
    }

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

/* Landscape mode on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .menu-screen {
        padding-top: 10px;
        gap: 8px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        display: none;
    }

    .menu-divider {
        margin: 10px 0;
    }

    .lobby-coins {
        padding: 5px 15px;
    }

    .instructions {
        display: none;
    }

    canvas#gameCanvas {
        max-height: 70vh;
    }

    .game-wrapper {
        margin-top: 50px;
    }

    header {
        top: 5px;
    }

    .score-board {
        padding: 4px 12px;
    }
}