@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
    --bg-color: #fdfdfd;
    --text-color: #444;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --secondary-text: #666;
    --cloth-color: #ffcc00;
    --font-main: 'Outfit', sans-serif;
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.1);
    --item-bg: rgba(0, 0, 0, 0.03);
    --input-bg: rgba(0, 0, 0, 0.05);
}

body.theme-dark {
    --bg-color: #121212;
    --text-color: #eee;
    --glass-bg: rgba(30, 30, 30, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --secondary-text: #aaa;
    --item-bg: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(255, 255, 255, 0.1);
}

body.theme-ocean {
    --bg-color: #0c1445;
    --text-color: #fff;
    --glass-bg: rgba(12, 20, 69, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --secondary-text: #b8c1ec;
    --item-bg: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.15);
}

body.theme-forest {
    --bg-color: #1b261b;
    --text-color: #e3f2e3;
    --glass-bg: rgba(27, 38, 27, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --secondary-text: #a8bba8;
    --item-bg: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.5s ease;
}

.global-rainbow {
    animation: global-rainbow-bg 10s linear infinite !important;
}

@keyframes global-rainbow-bg {
    0% {
        background-color: #ffadad !important;
    }

    20% {
        background-color: #ffd6a5 !important;
    }

    40% {
        background-color: #fdffb6 !important;
    }

    60% {
        background-color: #caffbf !important;
    }

    80% {
        background-color: #9bf6ff !important;
    }

    100% {
        background-color: #ffadad !important;
    }
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stain {
    position: absolute;
    filter: blur(8px);
    transition: width 0.5s ease, height 0.5s ease, filter 0.5s ease, opacity 0.5s ease, background-color 0.5s ease;
    pointer-events: none;
    border-radius: 8px;
    /* Default square */
}

.stain-circle {
    border-radius: 50% !important;
}

.stain-triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0 !important;
}

.pulse-animation {
    animation: pulsing-stain 1s infinite alternate;
}

@keyframes pulsing-stain {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.cloth {
    position: absolute;
    width: 200px;
    /* Slightly larger to show the model clearly */
    height: 200px;
    background-image: url('tilo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
    border: none !important;
    pointer-events: none;
    z-index: 1000;
    transition: transform 0.1s ease-out, filter 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    cursor: grab;
    touch-action: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cloth:active {
    cursor: grabbing;
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

/* Skins are now handled by .cloth-skin-* classes with filters only */

/* End of old skins section */

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

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

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

/* Side Menu Containers (Top Left & Top Right) */
.side-menu-container {
    position: fixed;
    top: 20px;
    z-index: 4000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    overflow: visible;
    width: 250px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.side-menu-container.left-menu {
    left: 20px;
    transform: translateX(calc(-100% - 10px));
}

.side-menu-container.right-menu {
    right: 20px;
    transform: translateX(calc(100% + 10px));
}

.side-menu-container.menu-open {
    transform: translateX(0) !important;
}

.side-menu-toggle {
    position: absolute;
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    z-index: 4001;
}

.left-menu .side-menu-toggle {
    right: -55px;
    top: 0;
}

.right-menu .side-menu-toggle {
    left: -55px;
    top: 0;
}

.side-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-menu-header {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 5px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--cloth-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-stat-item {
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-color);
}

.menu-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 12px;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: var(--cloth-color);
}

.vip-hidden {
    display: none !important;
}

@keyframes pulse-gold {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
}

.actions {
    display: flex;
    gap: 10px;
}

.glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.2s;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.info-text {
    position: absolute;
    top: 100px;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-text h1 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--secondary-text);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6000;
    /* Higher than game-overlay (5000) */
    backdrop-filter: blur(5px);
    transition: background 0.3s ease;
}

.hidden {
    display: none !important;
}

.modal-content {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 35px;
    border-radius: 28px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    backdrop-filter: blur(20px);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.5;
}

/* Side-by-side layout for wide screens when auth is open over start menu */
@media (min-width: 1000px) {
    body.auth-visual-open #game-start-overlay .start-container {
        transform: translateX(-260px);
    }

    #auth-modal.auth-open-side {
        background: transparent;
        backdrop-filter: none;
        pointer-events: none;
        /* Let clicks pass through backdrop when side-by-side */
    }

    .modal.auth-open-side .modal-content {
        transform: translateX(250px);
        pointer-events: auto;
    }
}

.action-btn {
    background: #ffcc00;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.upgrade-card {
    flex: 1;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 30px 20px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.upgrade-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.upgrade-card:hover {
    transform: translateY(-15px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: #FFD700;
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.25);
}

.upgrade-card:hover::before {
    opacity: 1;
}

.upgrade-card h3 {
    margin: 15px 0 10px;
    font-size: 1.25rem;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.upgrade-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
    text-align: center;
}

/* Themes Modal Refinement */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.theme-opt {
    padding: 25px 20px;
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-opt:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.theme-opt.active {
    border-color: var(--cloth-color) !important;
    background: rgba(255, 204, 0, 0.05);
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.5;
}

.close-modal:hover {
    opacity: 1;
}

/* Boss Stains */
.boss-stain {
    border: 4px solid #ff4d4d;
    box-shadow: 0 0 40px rgba(255, 77, 77, 0.6);
    animation: boss-pulse 2s infinite ease-in-out;
}

.triangle-boss {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border: 6px solid #ffd700 !important;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    animation: triangle-boss-pulse 1.5s infinite ease-in-out;
}

@keyframes triangle-boss-pulse {
    0% {
        transform: scale(1);
        filter: brightness(1) blur(8px);
    }

    50% {
        transform: scale(1.1);
        filter: brightness(1.5) blur(4px);
    }

    100% {
        transform: scale(1);
        filter: brightness(1) blur(8px);
    }
}

.boss-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white !important;
    font-weight: 800;
    font-size: 2rem;
    pointer-events: none;
    text-shadow: 0 0 10px red;
}

/* Helper Bot */
.helper-bot {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--glass-border);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), left 1s ease-in-out, top 1s ease-in-out;
    font-size: 1.5rem;
}

.helper-bot.vip-rainbow-trail {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    animation: bot-glow 2s infinite alternate;
}

@keyframes bot-glow {
    from {
        filter: hue-rotate(0deg);
        transform: scale(1);
    }

    to {
        filter: hue-rotate(360deg);
        transform: scale(1.1);
    }
}

@keyframes boss-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

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

/* Soap Milestone */
.soap-stain {
    position: absolute;
    width: 120px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #ffb6c1, #ff69b4);
    border-radius: 40px;
    box-shadow:
        0 0 30px rgba(255, 105, 180, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    pointer-events: auto;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    animation: soap-float 3s infinite ease-in-out;
    transition: transform 0.1s;
    user-select: none;
}

.soap-stain:active {
    transform: scale(1.2);
}

@keyframes soap-float {

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

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.bubble-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 105, 180, 0.4);
    pointer-events: none;
    z-index: 3500;
    animation: bubble-burst 1s forwards ease-out;
}

@keyframes bubble-burst {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    to {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.pink-upgrade-card {
    background: rgba(255, 105, 180, 0.1) !important;
    border: 2px solid #ff69b4 !important;
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.3) !important;
}

.pink-upgrade-card:hover {
    background: rgba(255, 105, 180, 0.2) !important;
    transform: translateY(-10px) scale(1.05) !important;
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.5) !important;
}

.pink-upgrade-card h3 {
    color: #ff69b4 !important;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.5) !important;
}

/* Skin Overrides for Image-based Cloth */
.cloth-skin-fire {
    filter: drop-shadow(0 0 15px #ff4d4d) hue-rotate(-20deg) brightness(1.2);
}

.cloth-skin-ice {
    filter: drop-shadow(0 0 15px #4facfe) hue-rotate(160deg) saturate(1.5);
}

.cloth-skin-rainbow {
    animation: skin-rainbow-anim 3s linear infinite;
}

.cloth-skin-electric {
    filter: drop-shadow(0 0 20px #00f2fe) brightness(1.5) contrast(1.2);
}

@keyframes skin-rainbow-anim {
    0% {
        filter: drop-shadow(0 0 15px red) hue-rotate(0deg);
    }

    100% {
        filter: drop-shadow(0 0 15px red) hue-rotate(360deg);
    }
}

.chat-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    height: 300px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 2000;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    overflow: visible;
}

.chat-container.side-collapsed {
    transform: translateX(calc(-100% - 10px));
}

.chat-toggle-side {
    position: absolute;
    right: -45px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    z-index: 2001;
}

.chat-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 15px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--glass-border);
}

.chat-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.5;
}

.chat-toggle:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

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

#chat-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text-color);
    outline: none;
    font-size: 0.85rem;
}

#send-chat-btn {
    background: var(--cloth-color);
    border: none;
    border-radius: 10px;
    width: 36px;
    color: white;
    cursor: pointer;
}

.chat-msg {
    font-size: 0.8rem;
    color: var(--text-color);
    word-break: break-word;
}

.vip-rainbow-text {
    background: linear-gradient(90deg, #ff0000, #ffa500, #ffff00, #008000, #0000ff, #4b0082, #ee82ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    animation: rainbow 3s linear infinite;
}

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

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

@media (max-width: 768px) {
    .chat-container {
        width: 280px;
        height: 250px;
        bottom: 80px;
        left: 10px;
    }

    .side-menu-container {
        width: 200px;
    }

    .stat-box {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .glass-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
    }

    .info-text h1 {
        font-size: 0.9rem;
    }

    .stats-sidebar {
        bottom: 80px !important;
        right: 10px !important;
        width: 140px !important;
    }
}

/* Statistics Sidebar (Right) */
.stats-sidebar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    height: 300px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 2000;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
}

.stats-sidebar.side-collapsed {
    transform: translateX(calc(100% + 10px));
}

.stats-toggle-side {
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.stats-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 15px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--glass-border);
}

.stats-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.5;
}

.active-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.upgrade-stat-item {
    display: flex;
    justify-content: space-between;
    background: var(--item-bg);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.upgrade-stat-item span:last-child {
    font-weight: bold;
    color: var(--cloth-color);
}

.session-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.s-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

/* Auth / Settings */
.settings-layout {
    display: grid;
    gap: 15px;
    text-align: left;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--item-bg);
    border-radius: 16px;
    margin-bottom: 10px;
}

.auth-field {
    margin-bottom: 15px;
}

.auth-field input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--input-bg);
    color: var(--text-color);
    outline: none;
}

#auth-mode-toggle button {
    flex: 1;
    margin: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--cloth-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Slither Overlay */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.98);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(79, 172, 254, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 254, 0.15) 0%, transparent 40%);
}

.start-container {
    background: rgba(30, 30, 40, 0.9);
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffcc00, #ff4d4d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 30px;
}

.nick-input {
    width: 100%;
    padding: 15px;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

.play-btn {
    width: 100%;
    padding: 15px;
    border-radius: 50px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

/* Mini-game Styling */
.minigame-point {
    position: absolute;
    width: 40px;
    /* Slightly larger for easier clicking */
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    z-index: 10000;
    /* Extremely high to be above everything */
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: auto !important;
}

.minigame-point:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.minigame-point.red {
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #990000);
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
}

.minigame-point.green {
    background: radial-gradient(circle at 30% 30%, #b5ff4d, #2d9300);
    box-shadow: 0 0 20px rgba(77, 255, 77, 0.6);
}

.minigame-point.active {
    outline: 4px solid white;
    box-shadow: 0 0 30px white;
}

.minigame-line {
    position: absolute;
    height: 6px;
    background: #4facfe;
    transform-origin: left center;
    box-shadow: 0 0 10px #4facfe;
    pointer-events: none;
    z-index: 5;
    border-radius: 3px;
}

.status-token {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

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