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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(180deg, #1a0000 0%, #2d0a0a 20%, #1a1a1a 50%, #0a0a0a 80%, #000000 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Blinking light at top */
.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 30px rgba(255, 69, 0, 0.8));
}

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

@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;
    }
}

/* Floating background images container */
.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 20px rgba(255, 255, 255, 0.3));
}

@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));
    }
}

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

.players-sidebar {
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px 20px;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 69, 0, 0.3);
    overflow-y: auto;
    border-right: 2px solid rgba(255, 69, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.players-sidebar h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 2px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #ff4500 0%, #ff0000 100%);
    border-image-slice: 1;
    padding-bottom: 15px;
    text-shadow: 0 0 30px rgba(255, 69, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.5);
}

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

#displayPlayersList li {
    padding: 15px 20px;
    margin: 12px 0;
    background: linear-gradient(135deg, #8b0000 0%, #ff4500 100%);
    color: white;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 69, 0, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#displayPlayersList li:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 69, 0, 0.5);
}

#displayPlayersList li.empty {
    background: rgba(0, 0, 0, 0.6);
    color: #999;
    font-weight: normal;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.display-title {
    color: #fff;
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(255, 69, 0, 0.8), 0 0 80px rgba(255, 0, 0, 0.6);
    letter-spacing: 6px;
    animation: flicker 4s linear infinite;
}

.custom-message-display {
    background: rgba(0, 0, 0, 0.9);
    padding: 30px 40px;
    border-radius: 20px;
    border: 3px solid rgba(255, 69, 0, 0.6);
    box-shadow: 0 0 40px rgba(255, 69, 0, 0.5);
    margin-bottom: 30px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#customMessageDisplay {
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(255, 69, 0, 1), 0 0 60px rgba(255, 0, 0, 0.6);
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    animation: flicker 4s linear infinite;
}

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

#displayCanvas {
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 69, 0, 0.7),
                0 0 100px rgba(255, 0, 0, 0.5),
                0 0 140px rgba(139, 0, 0, 0.4);
    background: #000;
    border: 5px solid rgba(255, 69, 0, 0.5);
}

.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.6)) drop-shadow(0 0 15px rgba(255, 69, 0, 0.9));
    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(0, 0, 0, 0.9);
    color: #ff4500;
    font-size: 1.4rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    border: 2px solid #ff4500;
    z-index: 11;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
    display: none;
}

.refresh-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ff4500;
    color: #ff4500;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.8);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(255, 69, 0, 0.2);
    transform: translate(-50%, -50%) scale(1.1) rotate(180deg);
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.8), 0 6px 15px rgba(0, 0, 0, 0.6);
}

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

.pointer-1 {
    /* Position on right side */
}

.pointer-2 {
    /* Position at 120 degrees clockwise from right */
    transform: translateY(-50%) rotate(120deg);
    transform-origin: calc(-300px) 50%;
}

.pointer-3 {
    /* Position at 240 degrees clockwise from right */
    transform: translateY(-50%) rotate(240deg);
    transform-origin: calc(-300px) 50%;
}

.spin-status {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 40px;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.5);
}

.winner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    animation: fadeIn 0.5s;
}

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

.winner-content {
    background: linear-gradient(180deg, #8b0000 0%, #ff0000 30%, #ff4500 70%, #ff6347 100%);
    padding: 60px 80px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(255, 69, 0, 0.6);
    animation: bounceIn 0.8s;
    border: 3px solid rgba(255, 69, 0, 0.6);
}

.winner-content h2 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 0 0 40px rgba(255, 0, 0, 0.9), 0 0 80px rgba(255, 69, 0, 0.6);
    letter-spacing: 4px;
}

#displayWinnerName {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 69, 0, 1), 0 0 60px rgba(255, 0, 0, 0.6);
    animation: pulse 1s infinite;
}

@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);
    }
}

.add-wallet-btn {
    background: linear-gradient(135deg, #8b0000 0%, #ff4500 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 69, 0, 0.4);
    margin-top: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 69, 0, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.add-wallet-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 69, 0, 0.6), 0 6px 25px rgba(255, 0, 0, 0.5);
}

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

.bulk-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: 2000;
}

.bulk-modal-content {
    background: rgba(0, 0, 0, 0.95);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    border: 2px solid rgba(255, 69, 0, 0.5);
    box-shadow: 0 0 40px rgba(255, 69, 0, 0.4);
}

.bulk-modal-content h3 {
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.6);
}

.modal-instructions {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 69, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 69, 0, 0.3);
}

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

@keyframes blinkRedWhite {
    0%, 49% {
        color: #fff;
    }
    50%, 100% {
        color: #ff0000;
    }
}

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

.bulk-modal-content strong {
    color: #ff4500;
    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, #8b0000 0%, #ff4500 100%);
    color: white;
    border: 1px solid rgba(255, 69, 0, 0.6);
    padding: 4px 10px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

.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(0, 0, 0, 0.6);
    border: 2px solid #ff4500;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.wallet-input:focus {
    outline: none;
    border-color: #ff6347;
    box-shadow: 0 0 15px rgba(255, 99, 71, 0.4);
}

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='white' 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: #1a1a1a;
    color: #fff;
}

.wallet-info {
    font-size: 0.85rem;
    color: #ff4500;
    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(255, 69, 0, 0.2);
    border: 1px solid rgba(255, 69, 0, 0.4);
    color: #ff4500;
}

.wallet-status.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    color: #ff6666;
}

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

.bulk-modal-buttons .control-btn {
    flex: 1;
    background: linear-gradient(135deg, #8b0000 0%, #ff4500 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 69, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
}

.bulk-modal-buttons .control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 69, 0, 0.4);
}

.bulk-modal-buttons .control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 69, 0, 0.3);
}

@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; /* Move to top */
        border-right: none;
        border-bottom: 2px solid rgba(255, 69, 0, 0.4);
        padding: 20px;
        display: flex;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
    }
    
    .players-sidebar h2 {
        display: none; /* Hide heading on mobile */
    }
    
    .add-wallet-btn {
        width: 100%;
        font-size: 1.3rem;
        padding: 18px 30px;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    
    #displayPlayersList {
        display: none; /* Hide players list on mobile */
    }
    
    .wheel-display {
        padding: 0 20px 20px 20px;
    }
    
    .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: 90vw;
        max-height: 50vh;
        width: auto;
        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;
    }
}
