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

/* ── Neon palette ──────────────────────────────────────────
   Dark purple:  #080015  #0d0025  #0f0030  #150045
   Hot magenta:  #FF00CC  #CC0099  #990066  #FF33CC
   Neon green:   #39FF14  #00CC66  #88FFCC  #009944
   ────────────────────────────────────────────────────────── */

@keyframes flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999%            { opacity: 0.4; }
}

@keyframes floatAndFade {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(0deg); }
    10%  { opacity: 0.6; }
    50%  { opacity: 0.8; }
    90%  { opacity: 0.4; }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(var(--scale)) rotate(var(--rotate)); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bounceIn {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

@keyframes blinkGoldSilver {
    0%, 49%   { color: #39FF14; }
    50%, 100% { color: #FF00CC; }
}

/* ── Body ──────────────────────────────────────────────── */
body {
    font-family: 'Arial', sans-serif;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,255,136,0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 50%, rgba(255,0,204,0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 0%,  rgba(57,255,20,0.05) 0%, transparent 50%),
        linear-gradient(180deg, #080015 0%, #0d0025 20%, #0a001e 50%, #070015 80%, #040010 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ── Blinking light ─────────────────────────────────────── */
.blinking-light {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    animation: flicker 4s linear infinite;
}

.blinking-light img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7));
}

.custom-message-display .blinking-light {
    width: 95%;
    max-width: 570px;
    margin: 0 auto 20px auto;
}

/* ── Floating images ────────────────────────────────────── */
.floating-images {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-image {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 15px rgba(255,0,204,0.4));
}

/* ── Layout ─────────────────────────────────────────────── */
.display-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── Sidebar ────────────────────────────────────────────── */
.players-sidebar {
    width: 300px;
    background: linear-gradient(180deg,
        rgba(8,8,28,0.97) 0%,
        rgba(14,14,40,0.96) 50%,
        rgba(8,8,28,0.97) 100%);
    padding: 30px 20px;
    box-shadow: 5px 0 30px rgba(0,0,0,0.8);
    overflow-y: auto;
    border-right: 2px solid;
    border-image: linear-gradient(180deg,
        #39FF14 0%,
        #009944 25%,
        #FF00CC 50%,
        #009944 75%,
        #39FF14 100%) 1;
    display: flex;
    flex-direction: column;
}

.players-sidebar h2 {
    color: #39FF14;
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 3px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
        transparent, #39FF14, #FF00CC, #39FF14, transparent) 1;
    padding-bottom: 15px;
    text-shadow: 0 0 20px rgba(57,255,20,0.6);
}

#displayPlayersList {
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

#displayPlayersList li {
    padding: 15px 20px;
    margin: 12px 0;
    background: linear-gradient(135deg,
        #0d0d2e 0%,
        #1a2a5e 40%,
        #CC0099 80%,
        #FF00CC 100%);
    color: #eeffee;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    border: 1px solid rgba(57,255,20,0.2);
}

#displayPlayersList li:hover {
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 20px rgba(255,0,204,0.3);
    border-color: rgba(255,0,204,0.4);
}

#displayPlayersList li.empty {
    background: rgba(10,10,30,0.6);
    color: #336644;
    font-weight: normal;
    border: 1px solid rgba(100,130,200,0.15);
}

/* ── Main wheel area ────────────────────────────────────── */
.wheel-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.display-title {
    color: #39FF14;
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 25px rgba(57,255,20,0.6), 0 0 50px rgba(0,255,136,0.3);
    letter-spacing: 6px;
    animation: flicker 4s linear infinite;
}

/* ── Custom message banner ──────────────────────────────── */
.custom-message-display {
    background: linear-gradient(135deg,
        rgba(6,6,22,0.97) 0%,
        rgba(14,14,40,0.95) 50%,
        rgba(6,6,22,0.97) 100%);
    padding: 18px 40px;
    border-radius: 20px;
    border: 2px solid;
    border-image: linear-gradient(90deg, #009944, #39FF14, #FF00CC, #39FF14, #009944) 1;
    box-shadow:
        0 0 25px rgba(0,255,136,0.25),
        0 0 50px rgba(255,0,204,0.12);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#customMessageDisplay {
    background: linear-gradient(90deg,
        #009944 0%,
        #39FF14 25%,
        #FF00CC 50%,
        #39FF14 75%,
        #009944 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ── Pot display ────────────────────────────────────────── */
.pot-display {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-left: 2px solid rgba(255,0,204,0.4);
    padding-left: 24px;
    flex-shrink: 0;
}

.pot-label {
    color: #FF00CC;
    text-shadow: 0 0 12px rgba(255,0,204,0.7);
}

#potAmount {
    color: #39FF14;
    text-shadow: 0 0 16px rgba(57,255,20,0.8), 0 0 30px rgba(57,255,20,0.4);
    animation: pulse 2s ease-in-out infinite;
}

/* ── Wheel container ────────────────────────────────────── */
.wheel-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.logo-link {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 20%;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    z-index: 20;
}

#displayCanvas {
    display: block;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px #39FF14,
        0 0 0 6px rgba(0,200,100,0.35),
        0 0 0 9px rgba(255,0,204,0.25),
        0 0 40px rgba(57,255,20,0.5),
        0 0 80px rgba(255,0,204,0.3);
    background: #000;
}

/* ── Pointer ────────────────────────────────────────────── */
.pointer {
    position: absolute;
    width: auto;
    height: 97.5%;
    top: 55%; right: -40%;
    transform: translateY(-50%);
    z-index: 10;
    filter:
        drop-shadow(0 6px 10px rgba(0,0,0,0.9))
        drop-shadow(0 0 15px rgba(255,0,204,0.7));
    background-image: url('img/tyler.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    aspect-ratio: 1;
}

.pointer-multiplier {
    position: absolute;
    top: 50%; right: -30px;
    transform: translateY(-50%);
    background: rgba(6,6,22,0.95);
    color: #FF00CC;
    font-size: 1.4rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    border: 2px solid #FF00CC;
    z-index: 11;
    pointer-events: none;
    text-shadow: 0 0 8px rgba(255,0,204,0.7);
    box-shadow: 0 0 12px rgba(255,0,204,0.4);
    display: none;
}

/* ── Refresh button ─────────────────────────────────────── */
.refresh-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(6,6,22,0.95);
    border: 3px solid #39FF14;
    color: #39FF14;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(57,255,20,0.3), 0 4px 10px rgba(0,0,0,0.6);
    text-shadow: 0 0 8px rgba(200,220,255,0.6);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(0,255,136,0.12);
    border-color: #FF00CC;
    color: #FF00CC;
    transform: translate(-50%, -50%) scale(1.1) rotate(180deg);
    box-shadow: 0 0 25px rgba(255,0,204,0.5), 0 6px 15px rgba(0,0,0,0.7);
}

.refresh-btn:active {
    transform: translate(-50%, -50%) scale(0.95) rotate(360deg);
}

.pointer-1 { }
.pointer-2 {
    transform: translateY(-50%) rotate(120deg);
    transform-origin: calc(-300px) 50%;
}
.pointer-3 {
    transform: translateY(-50%) rotate(240deg);
    transform-origin: calc(-300px) 50%;
}

/* ── Spin status ────────────────────────────────────────── */
.spin-status {
    background: linear-gradient(90deg, #009944, #39FF14, #FF00CC, #39FF14, #009944);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 40px;
    letter-spacing: 2px;
}

/* ── Winner overlay ─────────────────────────────────────── */
.winner-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(4,4,18,0.88);
    z-index: 1000;
    animation: fadeIn 0.5s;
}

.winner-overlay.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.winner-content {
    background: linear-gradient(180deg,
        #060618 0%,
        #0d0d30 20%,
        #1a1a55 45%,
        #3a3020 70%,
        #8B6200 85%,
        #CC0099 100%);
    padding: 60px 80px;
    border-radius: 30px;
    text-align: center;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.95),
        0 0 50px rgba(57,255,20,0.35),
        0 0 80px rgba(255,0,204,0.25);
    animation: bounceIn 0.8s;
    border: 2px solid;
    border-image: linear-gradient(135deg, #39FF14, #FF00CC, #39FF14, #FF00CC) 1;
}

.winner-content h2 {
    color: #39FF14;
    font-size: 3.5rem;
    margin-bottom: 30px;
    letter-spacing: 8px;
    text-shadow: 0 0 20px rgba(57,255,20,0.6);
}

#displayWinnerName {
    font-size: 4rem;
    font-weight: bold;
    color: #39FF14;
    text-shadow: 0 0 30px rgba(57,255,20,0.8);
    animation: pulse 1s infinite;
    letter-spacing: 3px;
}

/* ── Add wallet button ──────────────────────────────────── */
.add-wallet-btn {
    background: linear-gradient(135deg,
        rgba(6,6,22,0.97) 0%,
        rgba(14,14,40,0.95) 50%,
        rgba(6,6,22,0.97) 100%);
    padding: 20px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        0 0 25px rgba(0,255,136,0.25),
        0 0 50px rgba(255,0,204,0.12);
    margin-top: 20px;
    margin-bottom: 20px;
    border: 2px solid;
    border-image: linear-gradient(90deg, #009944, #39FF14, #FF00CC, #39FF14, #009944) 1;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.add-wallet-btn .btn-text {
    background: linear-gradient(90deg,
        #009944 0%,
        #39FF14 25%,
        #FF00CC 50%,
        #39FF14 75%,
        #009944 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-wallet-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.7), 0 0 30px rgba(57,255,20,0.4);
    border-color: #FF00CC;
}

.add-wallet-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Modal ──────────────────────────────────────────────── */
.bulk-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(4,4,18,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.bulk-modal-content {
    background: linear-gradient(180deg,
        rgba(6,6,22,0.99) 0%,
        rgba(12,12,36,0.98) 100%);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    border: 2px solid;
    border-image: linear-gradient(135deg, #39FF14, #009944, #FF00CC, #009944, #39FF14) 1;
    box-shadow: 0 0 30px rgba(0,255,136,0.2);
}

.bulk-modal-content h3 {
    color: #39FF14;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(57,255,20,0.5);
    letter-spacing: 2px;
}

.modal-instructions {
    color: #66ff99;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0,255,136,0.05);
    border-radius: 8px;
    border: 1px solid rgba(57,255,20,0.15);
}

.blink-warning {
    font-weight: bold;
    animation: blinkGoldSilver 1s infinite;
}

.bulk-modal-content p {
    color: #66ff99;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.bulk-modal-content strong {
    color: #FF00CC;
    font-size: 0.85rem;
    word-break: break-all;
}

.wallet-address-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.copy-wallet-btn {
    background: linear-gradient(135deg, #0d0d2e 0%, #39FF14 50%, #FF00CC 100%);
    color: #06061a;
    border: 1px solid rgba(57,255,20,0.4);
    padding: 4px 10px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.copy-wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57,255,20,0.3);
}

.copy-wallet-btn:active {
    transform: translateY(0);
}

.copy-wallet-btn.copied {
    background: linear-gradient(135deg, #006400 0%, #00ff00 100%);
}

.wallet-input {
    width: 100%;
    padding: 12px;
    background: rgba(6,6,22,0.9);
    border: 2px solid rgba(57,255,20,0.3);
    border-radius: 8px;
    color: #39ff14;
    font-size: 0.9rem;
    margin-bottom: 10px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wallet-input:focus {
    outline: none;
    border-color: #39FF14;
    box-shadow: 0 0 15px rgba(57,255,20,0.3), inset 0 0 8px rgba(0,0,0,0.5);
}

select.wallet-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8D8F0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

select.wallet-input option {
    background: #0d0d2e;
    color: #39ff14;
}

.wallet-info {
    font-size: 0.85rem;
    color: #39FF14;
    margin-bottom: 10px;
}

.wallet-status {
    min-height: 20px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.wallet-status.success {
    background: rgba(0,255,136,0.08);
    border: 1px solid rgba(57,255,20,0.3);
    color: #39FF14;
}

.wallet-status.error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff7070;
}

.bulk-modal-buttons {
    display: flex;
    gap: 10px;
}

.bulk-modal-buttons .control-btn {
    flex: 1;
    background: #39FF14;
    color: #060015;
    border: 1px solid #00cc00;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(57,255,20,0.15);
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    letter-spacing: 1px;
}

.bulk-modal-buttons .control-btn:hover {
    background: #55ff33;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(57,255,20,0.5);
    border-color: #39FF14;
}

.bulk-modal-buttons .control-btn:active {
    transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-height: 700px) {
    .wheel-display {
        justify-content: flex-start;
    }
}

@media (max-width: 1024px) {
    .players-sidebar {
        width: 250px;
        padding: 20px 15px;
    }

    .display-title {
        font-size: 3rem;
    }

    .winner-content {
        padding: 40px 60px;
    }

    #displayWinnerName {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .display-container {
        flex-direction: column;
    }

    .players-sidebar {
        width: 100%;
        max-height: none;
        order: 1;
        border-right: none;
        border-bottom: 2px solid rgba(57,255,20,0.3);
        padding: 20px;
        display: flex;
        flex-direction: column;
        background: rgba(6,6,22,0.97);
    }

    .players-sidebar h2 {
        display: none;
    }

    .add-wallet-btn {
        width: 100%;
        font-size: 1.3rem;
        padding: 18px 30px;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    #displayPlayersList {
        display: none;
    }

    .wheel-display {
        padding: 0 20px 20px 20px;
        justify-content: flex-start;
    }

    .display-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .custom-message-display {
        padding: 15px 25px;
        margin-top: 0;
        margin-bottom: 20px;
    }

    #customMessageDisplay {
        font-size: 1.5rem;
    }

    .custom-message-display .blinking-light {
        margin-bottom: 15px;
    }

    .wheel-container {
        margin-bottom: 15px;
    }

    #displayCanvas {
        max-width: 100%;
        height: auto;
    }

    .pointer {
        height: 97.5%;
        right: -40%;
    }

    .pointer-multiplier {
        font-size: 1rem;
        padding: 5px 8px;
        right: -18px;
    }

    .refresh-btn {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .pointer-2 {
        transform-origin: calc(-150px) 50%;
    }

    .pointer-3 {
        transform-origin: calc(-150px) 50%;
    }

    .winner-content {
        padding: 30px 40px;
        max-width: 90%;
    }

    .winner-content h2 {
        font-size: 2rem;
    }

    #displayWinnerName {
        font-size: 2rem;
    }

    .bulk-modal-content {
        width: 90%;
        max-width: 400px;
        padding: 30px 25px;
    }
}
