﻿
<style >
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', system-ui, sans-serif;
    overflow-x: hidden; /* hide sideways scroll only */
    overflow-y: auto; /* ✅ allow vertical scroll so footer can appear */
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #0b0f1a, #0e1217);
    color: #e5eefc;
}

header, footer {
    flex: 0 0 auto;
}

/* ================================
   Header
   ================================ */
header {
    background: linear-gradient(135deg, #2f3d52, #3e4f68);
    color: #2979ff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #7fff00;
    box-shadow: 0 4px 16px rgba(41, 121, 255, 0.5), 0 0 12px rgba(127, 255, 0, 0.4);
    z-index: 55;
    position: relative;
}

    header h1 {
        margin: 0;
        font-size: 1.8rem;
        font-weight: 900;
        color: #fff;
        text-shadow: 0 0 8px #2979ff, 0 0 16px #2979ff;
    }

.logo {
    display: block;
    margin-top: 0px;
    margin-left: 0px;
    max-width: 620px;
    height: auto;
}


nav {
    display: flex;
    align-items: center;
    gap: 20px; /* space between button + links */
    justify-content: flex-start; /* ensure items flow left, not centered */
}

    nav a {
        color: #7fff00;
        text-decoration: none;
        font-weight: 700;
        transition: color 0.2s ease, text-shadow 0.2s ease;
    }

        nav a:hover {
            color: #fff;
            text-shadow: 0 0 8px #7fff00, 0 0 12px #2979ff;
        }

#myWheelsBtn {
    transition: opacity 0.25s ease-in-out;
}

    #myWheelsBtn[style*="display:none"] {
        opacity: 0;
    }

/* Distinct "New Wheel" button inside nav */
/*.new-wheel-btn {
    padding: 6px 14px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #2979ff;*/ /* blue base */
/*color: #fff;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 6px #7fff00, 0 0 12px #7fff00;*/ /* green neon glow */
/*}

    .new-wheel-btn:hover {
        background: #7fff00;
        color: #000;
        box-shadow: 0 0 12px #7fff00, 0 0 24px #7fff00;*/ /* stronger glow on hover */
/*}*/

.new-wheel-btn .plus {
    color: #7fff00;
    text-shadow: 0 0 8px #7fff00, 0 0 12px #2979ff;
    font-size: 1.3em;
    font-weight: 900;
    margin-right: 6px;
    line-height: 1;
}

/* Shared neon button style for all main action buttons */
/* ================================
   Universal Neon Button Style
   ================================ */
.neon-btn {
    padding: 6px 14px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #2979ff; /* blue base */
    color: #fff;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    box-shadow: 0 0 6px #7fff00, 0 0 12px #7fff00; /* green neon glow */
}

    .neon-btn:hover {
        background: #7fff00; /* neon green hover */
        color: #000; /* black text */
        box-shadow: 0 0 12px #7fff00, 0 0 24px #7fff00; /* stronger glow */
    }

    .neon-btn .plus {
        color: #7fff00;
        text-shadow: 0 0 8px #7fff00, 0 0 12px #2979ff;
        font-size: 1.3em;
        font-weight: 900;
        margin-right: 6px;
        line-height: 1;
    }


#add-panel.neon-btn {
    display: block;
    width: calc(100%);
    margin: 0 0 14px 0; /* no side margins */
    box-sizing: border-box;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    box-shadow: 0 0 6px #7fff00, 0 0 12px #7fff00; /* green neon glow */
    background: #2979ff; /* blue base */
    color: #fff;
}


/* Shared button style */
/* Add Panel button styling */
#add-panel.neon-btn {
    display: block;
    width: 100%;
    margin: 0 0 14px 0;
    box-sizing: border-box;
    background: #2979ff; /* blue base */
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    box-shadow: 0 0 6px #7fff00, 0 0 12px #7fff00; /* base glow */
}

    /* ✅ proper hover effect — same as other neon buttons */
    #add-panel.neon-btn:hover {
        background: #7fff00; /* neon green hover */
        color: #000; /* black text */
        box-shadow: 0 0 12px #7fff00, 0 0 24px #7fff00; /* stronger glow */
    }




#save-reset-wrapper {
    flex-shrink: 0;
    position: relative;
    background: #000;
    display: none;
    justify-content: space-between;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}


/* ================================
   Layout
   ================================ */
main {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 160px 325px minmax(0, 1fr) 325px 160px;
    gap: 16px;
    padding: 16px 16px 40px;
    /*height: calc(76.5vh);*/
    height: auto;
    min-height: calc(100vh - 245px); /* header + footer space */
    /* min-height: 0;*/
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
    justify-content: center;
    align-items: stretch;
    align-content: stretch;
    padding-bottom: 20px;
}

/* Explicit grid placement for main’s children */
#left-ad {
    grid-column: 1;
}

#left-panel {
    grid-column: 2;
}

#center-wrapper {
    grid-column: 3;
}

#right-panel {
    grid-column: 4;
}

#right-ad {
    grid-column: 5;
}


/* Collapse states (for left/right panel hide toggles) */
main.hide-left {
    grid-template-columns: 150px 50px minmax(0, 1fr) 325px 150px;
}

main.hide-right {
    grid-template-columns: 150px 325px minmax(0, 1fr) 50px 150px;
}

main.hide-left.hide-right {
    grid-template-columns: 150px 50px minmax(0, 1fr) 50px 150px;
}

/* Hide inner content when panel is collapsed */
main.hide-left #left-panel > *:not(.toggle),
main.hide-right #right-panel > *:not(.toggle) {
    display: none;
}

/* Ad Block Styles */
.ad-side {
    background: #0d1422;
    border: 2px solid #2979ff;
    border-radius: 10px;
    color: #7fff00;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 12px rgba(41, 121, 255, 0.5);
    font-size: 0.95rem;
}


/* ================================
   Side panels
   ================================ */
/*aside {
    background: #000;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #7fff00;
    box-shadow: 0 0 10px #7fff00, 0 0 18px #7fff00;
    max-height: 100%;
    position: relative;
    overflow: hidden;
}*/

aside {
    background: #000;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #7fff00;
    box-shadow: 0 0 10px #7fff00, 0 0 18px #7fff00;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

    aside h2 {
        font-size: 1rem;
        margin-top: 0;
        color: #7fff00;
        text-shadow: 0 0 6px #7fff00;
    }

    aside .toggle {
        position: absolute;
        top: 8px;
        right: 8px;
        background: #2979ff;
        color: #fff;
        border: none;
        border-radius: 4px;
        width: 28px;
        height: 28px;
        cursor: pointer;
        font-weight: bold;
        box-shadow: 0 0 6px #2979ff;
        z-index: 2;
    }

        aside .toggle:hover {
            background: #1e5ed6;
        }


/* Structure for Customize Wheel panel */
#left-panel {
    display: flex;
    flex-direction: column;
    position: relative;
    /*height: 100%;*/
    overflow: hidden; /* prevents entire panel from scrolling */
}

input.placeholder-text {
    color: #9dff73 !important;
    font-style: italic;
    text-shadow: 0 0 4px rgba(63, 169, 255, 0.6); /* subtle neon glow */
    opacity: 0.95; /* nearly full brightness for visibility */
}




/*#clear-history {
    margin-bottom: 10px;
    padding: 6px 12px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #2979ff;
    color: #fff;
    transition: background 0.2s;
}

    #clear-history:hover {
        background: #1e5ed6;
    }*/

#history {
    max-height: 90%;
    overflow-y: auto;
    padding: 8px;
    margin: 0;
    width: 100%;
}

    #history li {
        list-style: disc inside;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-bottom: 6px;
    }

/* --- Fix Spin History panel expansion --- */
#right-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent internal content from pushing height */
}

    /*#right-panel h2 {
        margin-left: 25px;
    }*/

    #right-panel h2,
    #right-panel #clear-history {
        flex-shrink: 0; /* header + button stay fixed at top */
    }

#history {
    flex: 1 1 auto; /* take remaining space within panel */
    overflow-y: auto; /* enable scroll when full */
    overflow-x: hidden;
    margin-top: 8px;
    padding-right: 6px;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #2979ff #111;
}

    /* optional pretty scrollbars */
    #history::-webkit-scrollbar {
        width: 8px;
    }

    #history::-webkit-scrollbar-track {
        background: #111;
        border-radius: 4px;
    }

    #history::-webkit-scrollbar-thumb {
        background-color: #2979ff;
        border-radius: 4px;
    }

        #history::-webkit-scrollbar-thumb:hover {
            background-color: #52a1ff;
        }


/* ================================
   Wheel container
   ================================ */
.wheel-container {
    display: grid;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #2979ff;
    box-shadow: 0 0 10px #2979ff, 0 0 16px #2979ff;
    position: relative;
    max-height: 85%;
}

prize-drum {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.wheel-container prize-drum {
    margin-top: -85px;
}

prize-drum::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68%;
    height: 87%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    background: #2979ff;
    filter: blur(6px);
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}

.drum-outer {
    display: inline-block;
    transform: rotateX(90deg);
}

/* Spin button */
.wheel-container button {
    position: absolute;
    bottom: 25px; /* raise or lower this value as needed */
    margin-top: 0; /* no longer used */
    padding: 14px 32px;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    background: #000;
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 3px solid #7fff00;
    box-shadow: 0 0 6px #7fff00, 0 0 12px #7fff00;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wheel-container button {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
}

    .wheel-container button:hover {
        box-shadow: 0 0 12px #7fff00, 0 0 24px #7fff00;
    }

/* 🧩 Fix for overlapping wheel blocking Spin button */
.wheel-container prize-drum {
    margin-top: -85px;
    pointer-events: auto; /* Prevent invisible overlap from blocking clicks */
}

#spin {
    position: relative;
    z-index: 50; /* Ensure it's above everything else */
    pointer-events: auto; /* Explicitly clickable */
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
}

#wheel, .wheel, canvas {
    touch-action: none; /* Prevents scrolling while dragging */
}



/* Ensure side panels and wheel container stretch equally */
aside,
.wheel-container {
    height: 96%;
    max-height: none; /* remove artificial limits */
    display: flex;
    flex-direction: column;
}
/* ================================
   Footer
   ================================ */
footer {
    text-align: center;
    margin: 0;
    padding: 6px 0;
    font-size: 0.9rem;
    background: #060b12;
    color: #2979ff;
    border-top: 2px solid #7fff00;
    box-shadow: 0 0 12px #7fff00;
    position: relative;
    z-index: 3;
    bottom: 0;
    margin-top: auto;
}





/* ================================
   Panel editor
   ================================ */
#panel-editor {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0; /* ✅ side margin for glow breathing */
    padding: 6px 6px 12px 6px; /* even spacing left/right */
    scrollbar-width: thin;
    scrollbar-color: #2979ff #000;
}


# add-panel {
    overflow-y: auto;
}



*/
#add-panel:disabled {
    opacity: 0.5; /* look dimmed */
    cursor: not-allowed; /* show disabled cursor */
    pointer-events: none; /* extra safeguard */
}

.add-panel-wrapper {
    width: 100%; /* stretch full width */
    display: block; /* make it a block-level wrapper */
}

    .add-panel-wrapper button {
        width: 100%; /* button stretches across wrapper */
        box-sizing: border-box;
        box-shadow: 0 0 6px #7fff00, 0 0 12px #7fff00; /* green neon glow */
    }


/* Panel rows (single definition) */
.panel-row {
    display: grid;
    grid-template-columns: 1fr 32px 32px 32px;
    gap: 8px;
    align-items: center;
}

    .panel-row input[type="text"] {
        width: 125px;
        padding: 6px 8px;
        border-radius: 4px;
        border: 1px solid #444;
        background: #111;
        color: #fff;
    }

    .panel-row input[type="color"] {
        -webkit-appearance: none;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 4px;
        cursor: pointer;
        background: none;
    }

    /* Hide the native file input */
    .panel-row input[type="file"] {
        display: none;
    }

    /* Image + remove buttons */
    .panel-row button.image,
    .panel-row button.remove {
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 6px;
        margin: 2px 0; /* ✅ separates top & bottom buttons */
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-weight: 700;
        transition: all 0.2s ease;
        box-shadow: 0 0 4px rgba(0,0,0,0.3);
    }

    .panel-row button.image {
        background: #2979ff;
        color: #fff;
    }

        /* Square image button */
        .panel-row button.image:hover {
            background: #4090ff;
        }

    /* Remove button */
    .panel-row button.remove {
        background: #ff4757;
        color: #fff;
    }

        .panel-row button.remove:hover {
            background: #d63031;
        }


    .panel-row button.remove {
        background: #ff4757;
        color: #fff;
    }

        .panel-row button.remove:hover {
            background: #d63031;
        }

    .panel-row button.placeholder {
        visibility: hidden;
    }

.img-preview-popup {
    position: absolute;
    top: 0; /* ensure it has coordinates */
    left: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #2979ff;
    border-radius: 6px;
    padding: 4px;
    color: #7fff00;
    font-size: 0.8rem;
    pointer-events: none;
    box-shadow: 0 0 8px #2979ff;
    transform: translate(12px, 12px); /* nudge off cursor if JS fails */
    opacity: 1; /* make sure it’s visible */
}

    .img-preview-popup img {
        display: block;
        max-width: 120px;
        max-height: 80px;
        border-radius: 4px;
    }


/* ================================
   Panels & content
   ================================ */
.panel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-align: center;
}

    .panel-content[data-layout="image-only"] {
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .panel-content[data-layout="image-only"] .panel-img {
            max-width: 65%;
            max-height: 65%;
            object-fit: contain;
        }

    /* --- Image + text panels (mimic image-only behavior) --- */
    .panel-content[data-layout="row"] {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        overflow: hidden;
        padding: 0;
    }

        .panel-content[data-layout="row"] .panel-img {
            width: auto;
            height: 70%; /* mimic image-only scaling */
            max-width: 100%;
            object-fit: contain;
            display: block;
            margin: 0 auto;
        }

        .panel-content[data-layout="row"] .panel-text {
            height: 30%; /* reserve consistent band for text */
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            font-size: 1.1em;
            color: #fff;
            text-shadow: 0 0 4px rgba(0,0,0,0.8);
            text-align: center;
            word-break: break-word;
            padding: 0 4px;
            box-sizing: border-box;
        }





.panel-text {
    font-weight: 900;
    font-size: 1.2em;
    color: #fff;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    margin-top: 6px;
}

.panel-img {
    max-width: 65%;
    max-height: 65%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.panel-content:only-child,
.panel-content:only-child .panel-img {
    margin: 0;
    align-items: center;
    justify-content: center;
}


/* --- Proper scaling for image-only panels --- */
.panel-content[data-layout="image-only"] {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%; /* ✅ fill entire panel height */
    padding: 0;
    overflow: hidden; /* ✅ prevent spillover */
}

    .panel-content[data-layout="image-only"] .panel-img {
        width: auto;
        height: 100%; /* ✅ limit to panel height */
        max-width: 100%;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }



/* ================================
   Wheel Name
   ================================ */
/* Dropdown menu for the wheel name ellipses */
#wheelNameDisplay {
    position: relative; /* so dropdown can anchor */
    text-align: center;
    margin-bottom: 12px;
}

    #wheelNameDisplay .dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #111;
        border: 2px solid #2979ff;
        border-radius: 6px;
        box-shadow: 0 0 8px #2979ff;
        padding: 6px 0;
        min-width: 140px;
        z-index: 1000;
    }

        #wheelNameDisplay .dropdown button {
            display: block;
            width: 100%;
            padding: 8px 12px;
            background: none;
            border: none;
            color: #7fff00;
            font-weight: 700;
            text-align: left;
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease;
        }

            #wheelNameDisplay .dropdown button:hover {
                background: #2979ff;
                color: #fff;
            }





/* ================================
   Dice wheels
   ================================ */
.dice-wheels {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 20px;
}

.dice {
    text-align: center;
}

#spinBoth {
    margin-top: 10px;
    padding: 12px 28px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #2979ff, #7fff00);
    color: #fff;
}

/* ================================
   Special popup style
   ================================ */
.popup-card.sole-survivor {
    background: linear-gradient(135deg, var(--survivor-bg-grad, #222), var(--survivor-bg, #111)) !important;
    border: 3px solid #00f !important;
    box-shadow: 0 0 6px #2979ff, 0 0 12px #2979ff, 0 0 20px #00f !important;
    font-size: 1.2em;
    color: #fff !important;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7) !important;
    animation: survivorPulse 1.5s infinite alternate;
}

@keyframes survivorPulse {
    from {
        transform: scale(1.20);
        box-shadow: 0 0 6px #2979ff, 0 0 12px #2979ff, 0 0 20px #00f;
    }

    to {
        transform: scale(1.30);
        box-shadow: 0 0 8px #2979ff, 0 0 16px #2979ff, 0 0 28px #00f;
    }
}


/* Popup overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}


/* ======================================
   Popup Content — Glass Panel Style
   ====================================== */
.popup-content {
    background: rgba(18, 24, 38, 0.6); /* translucent navy glass */
    border: 2px solid rgba(41, 121, 255, 0.7); /* soft neon blue border */
    box-shadow: 0 0 12px rgba(127, 255, 0, 0.4), 0 0 20px rgba(41, 121, 255, 0.5);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    width: 340px;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    color: #e5eefc;
    animation: popupFadeIn 0.4s ease;
    position: relative;
}

    /* Neon trim accent */
    .popup-content::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 12px;
        padding: 2px;
        background: linear-gradient(135deg, #2979ff, #7fff00);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0.4;
        pointer-events: none;
    }

/* Auth popup inherits same style but wider */
.auth-popup {
    width: 360px;
    max-width: 90vw;
}


.popup-content h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #7fff00;
    text-shadow: 0 0 8px #7fff00;
}

#wheelNameInput {
    width: 100%;
    padding: 8px 10px;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
    margin-bottom: 16px;
    /* Keep it away from the popup edges */
    box-sizing: border-box;
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .popup-buttons button {
        flex: 1;
        padding: 8px 12px;
        font-weight: bold;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        color: #fff;
        background: #2979ff;
        transition: background 0.2s;
    }

        .popup-buttons button:hover {
            background: #1e5ed6;
        }

.wheel-name {
    margin: 8px 0 16px 0;
    padding: 4px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #3fa9ff; /* lighter, brighter neon blue */
    /*text-shadow: 0 0 2px #000, */ /* subtle black outline for clarity */
    /*0 0 6px #2979ff, */ /* soft blue inner glow */
    /*0 0 10px #7fff00; */ /* faint green outer glow */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}



    .wheel-name button.edit {
        background: none;
        border: none;
        color: #7fff00; /* neon green */
        font-size: 1.2rem;
        cursor: pointer;
        transition: color 0.2s ease, text-shadow 0.2s ease;
    }

        .wheel-name button.edit:hover {
            color: #fff;
            text-shadow: 0 0 8px #7fff00, 0 0 12px #2979ff;
        }

#wheelNameDisplay {
    text-align: center;
    margin-bottom: 12px; /* space above Add Panel button */
}

    #wheelNameDisplay span {
        font-size: 1.1rem;
        font-weight: 900;
        color: #2979ff; /* bright neon blue text, no glow */
    }

    #wheelNameDisplay button.edit {
        margin-left: 8px;
        background: none;
        border: none;
        color: #2979ff;
        font-size: 1.1rem;
        cursor: pointer;
        transition: color 0.2s ease;
    }

        #wheelNameDisplay button.edit:hover {
            color: #7fff00; /* neon green hover */
        }


/* ================================
   Auth Popup
   ================================ */
.auth-popup {
    width: 340px;
    padding: 24px;
}

    .auth-popup input[type="text"],
    .auth-popup input[type="email"],
    .auth-popup input[type="password"] {
        width: 100%;
        padding: 10px 12px;
        margin-bottom: 12px;
        border-radius: 6px;
        border: 1px solid #2979ff;
        background: #111;
        color: #fff;
        font-size: 0.95rem;
        box-sizing: border-box;
    }

    .auth-popup input:focus {
        outline: none;
        border-color: #7fff00;
        box-shadow: 0 0 6px #7fff00;
    }

.auth-form .neon-btn {
    width: 100%;
    margin-top: 6px;
}

.auth-switch {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
}

    .auth-switch a {
        color: #7fff00;
        text-decoration: none;
        font-weight: 700;
        transition: color 0.2s ease, text-shadow 0.2s ease;
    }

        .auth-switch a:hover {
            color: #fff;
            text-shadow: 0 0 8px #7fff00, 0 0 12px #2979ff;
        }


/* --- Neon-style blue, crisp and readable --- */
#authBtn {
    color: #29a8ff; /* vivid but softer neon blue */
    font-weight: 600;
    text-shadow: 0 0 2px rgba(41, 168, 255, 0.4);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

    #authBtn:hover {
        color: #5ac3ff;
        text-shadow: 0 0 4px rgba(90, 195, 255, 0.5);
    }

/* ======================================
   Popup Fade Animations
   ====================================== */
/* ======================================
   Popup Overlay (with blur + fade)
   ====================================== */
/* ======================================
   Popup Overlay (with blur + fade + click fix)
   ====================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* 🟢 critical line — allows clicks to pass through when hidden */
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

    .popup-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all; /* 🟢 re-enable clicks when popup is visible */
    }

    /* ======================================
   Fix legacy popups hidden by new fade CSS
   ====================================== */
    .popup-overlay[style*="display: flex"] {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: all !important;
    }

/* --- Blur effect for popup background --- */
.blurred {
    filter: blur(6px);
    transition: filter 0.2s ease;
}


@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===========================
   Global Loading Overlay
   =========================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 20, 0.82);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    transition: opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

    .loading-overlay.show {
        display: flex;
        opacity: 1;
        pointer-events: all;
    }

/* ===========================
   Spinner (neon blue + neon green)
   =========================== */
.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #2979ff; /* 💙 full neon blue ring */
    border-top-color: #7fff00; /* 💚 neon green pointer */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px #2979ff, 0 0 20px #2979ff, 0 0 30px #7fff00;
    background: transparent;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 16px;
    color: #e5eefc;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 0 6px #2979ff, 0 0 10px #7fff00;
}

/* === Settings Footer (Save button) === */
/* === Settings Footer (Save button inside tabs) === */
.settings-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 10px auto 15px;
    width: 90%;
}

#save-settings-btn {
    background: linear-gradient(135deg, #00ff88, #3affb8);
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0b0f1a;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0,255,136,0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    #save-settings-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 0 12px rgba(0,255,136,0.8);
    }

    #save-settings-btn:active {
        transform: scale(0.95);
        box-shadow: 0 0 5px rgba(0,255,136,0.4);
    }

/* =============================================
   🔹 Fix: Align Save Settings button below tabs
   ============================================= */

/* Optional visual tweaks */
.settings-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 10px auto 15px;
    width: 90%;
}

/* ==========================================
   ✅ FIX: Keep Save Settings at bottom
   ========================================== */
.settings-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.settings-header {
    flex-shrink: 0;
}

/* Row of tabs (left and right content) */
.settings-tabs {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

    /* Left column */
    .settings-tabs .tab-list {
        flex: 0 0 140px;
        display: flex;
        flex-direction: column;
    }

    /* Right column — scrollable area */
    .settings-tabs .tab-content {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 10px 14px;
        box-sizing: border-box;
    }

/* Footer sits below everything, fixed position inside panel */
.settings-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 12px 0 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    background: rgba(10,15,25,0.3);
    box-sizing: border-box;
}






/* ======================================================
   Mobile layout is hidden by default on desktop
   ====================================================== */
#mobile-header,
#mobile-main,
#mobile-footer {
    display: none;
}

/* Hide mobile dropdown on desktop */
@media (min-width: 901px) {
    #mobile-menu,
    #mobile-menu-top,
    #mobile-app,
    #mobile-header,
    #mobile-footer {
        display: none !important;
    }
}


/* ======================
   📱 Mobile Popup Tweaks
   ====================== */
@media (max-width: 900px) {
    .popup-backdrop {
        background: rgba(0, 0, 0, 0.8);
        align-items: center;
        justify-content: center;
    }

    .popup-card {
        width: 65vw;
        max-width: 300px;
        padding: 1.5rem;
        font-size: 1.2rem;
        border-radius: 18px;
        box-shadow: 0 0 12px rgba(0, 255, 200, 0.6);
        text-align: center;
    }

        .popup-card h2 {
            font-size: 1.4rem;
            margin-bottom: 0.5rem;
        }

    .popup-actions button {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
        border-radius: 10px;
    }

    .popup-img {
        max-width: 80%;
        height: auto;
        margin: 0.5rem auto;
    }
}


</style >
