* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(180deg, #ff00ff 0%, #d946ef 10%, #a855f7 25%, #6366f1 40%, #3b82f6 55%, #06b6d4 70%, #14b8a6 85%, #10b981 95%, #22c55e 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 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, 0, 255, 0.3);
    overflow-y: auto;
    border-right: 2px solid rgba(255, 0, 255, 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, #ff00ff 0%, #06b6d4 100%);
    border-image-slice: 1;
    padding-bottom: 15px;
    text-shadow: 0 0 30px rgba(255, 0, 255, 0.8), 0 0 60px rgba(6, 182, 212, 0.5);
}

#displayPlayersList {
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

#displayPlayersList li {
    padding: 15px 20px;
    margin: 12px 0;
    background: linear-gradient(135deg, #a855f7 0%, #06b6d4 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(168, 85, 247, 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(168, 85, 247, 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: 900;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(255, 165, 0, 0.8), 0 0 80px rgba(255, 0, 255, 0.6);
    letter-spacing: 2px;
    font-stretch: condensed;
    font-family: 'Arial Narrow', 'Arial Black', 'Impact', Arial, sans-serif;
}

.prize-pool-display {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 40px;
    border-radius: 20px;
    border: 3px solid rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.5);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.prize-label-display {
    color: #22c55e;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 3px;
}

.prize-amount-display {
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(34, 197, 94, 1), 0 0 60px rgba(255, 255, 0, 0.6);
}

.wheel-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

#displayCanvas {
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 165, 0, 0.7),
                0 0 100px rgba(255, 0, 255, 0.5),
                0 0 140px rgba(0, 255, 255, 0.4);
    background: #000;
    border: 5px solid rgba(255, 165, 0, 0.5);
}

.pointer {
    position: absolute;
    width: 0;
    height: 0;
    border-top: 70px solid transparent;
    border-bottom: 70px solid transparent;
    border-right: 140px solid #ff6600;
    top: 50%;
    right: -50px;
    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, 165, 0, 0.9));
}

.pointer-multiplier {
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ff6600;
    font-size: 1.4rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    border: 2px solid #ff6600;
    z-index: 11;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 165, 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 #06b6d4;
    color: #06b6d4;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5), 0 4px 10px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    transform: translate(-50%, -50%) scale(1.1) rotate(180deg);
    box-shadow: 0 0 30px rgba(6, 182, 212, 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, 165, 0, 0.8), 0 0 40px rgba(255, 0, 255, 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, #ff00ff 0%, #a855f7 30%, #06b6d4 70%, #22c55e 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, 165, 0, 0.6);
    animation: bounceIn 0.8s;
    border: 3px solid rgba(255, 165, 0, 0.6);
}

.winner-content h2 {
    color: #ff0000;
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 0 0 40px rgba(255, 0, 0, 0.9), 0 0 80px rgba(255, 165, 0, 0.6);
    letter-spacing: 4px;
}

#displayWinnerName {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 165, 0, 1), 0 0 60px rgba(255, 255, 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, #22c55e 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.add-wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.5), 0 5px 20px rgba(6, 182, 212, 0.4);
}

/* Desktop: Show button in sidebar, hide in wheel-display */
.sidebar-btn {
    display: block;
}

.mobile-btn {
    display: none;
}

.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, 0, 255, 0.5);
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.4);
}

.bulk-modal-content h3 {
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

.bulk-modal-content p {
    color: #fff;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.bulk-modal-content strong {
    color: #06b6d4;
    font-size: 0.85rem;
    word-break: break-all;
}

.game-wallet-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.game-wallet-container p {
    flex: 1;
    margin: 0;
}

.copy-wallet-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.copy-wallet-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.5);
}

.copy-wallet-btn:active {
    transform: scale(0.95);
}

.copy-wallet-btn.copied {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

.wallet-input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #22c55e;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.wallet-input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.wallet-info {
    font-size: 0.85rem;
    color: #06b6d4;
    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(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.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, #a855f7 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bulk-modal-buttons .control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

@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, 0, 255, 0.4);
        padding: 20px;
        display: none; /* Hide entire sidebar on mobile */
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
    }
    
    .players-sidebar h2 {
        display: none; /* Hide heading on mobile */
    }
    
    /* Mobile: Hide sidebar button, show mobile button */
    .sidebar-btn {
        display: none;
    }
    
    .mobile-btn {
        display: block; /* Show button below wheel on mobile */
        order: 3; /* Button below wheel */
        margin: -10px 0 0 0; /* Negative margin to bring closer to wheel */
        width: 100%;
        font-size: 1.3rem;
        padding: 18px 30px;
    }
    
    #displayPlayersList {
        display: none; /* Hide players list on mobile */
    }
    
    .wheel-display {
        padding: 20px;
        order: 2; /* Wheel below button */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Align to top */
    }
    
    .display-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
        letter-spacing: 1px;
    }
    
    .prize-pool-display {
        padding: 15px 25px;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .prize-label-display,
    .prize-amount-display {
        font-size: 1.1rem;
    }
    
    .wheel-container {
        margin-bottom: 0; /* Remove bottom margin */
    }
    
    #displayCanvas {
        max-width: 90vw;
        max-height: 50vh;
        width: auto;
        height: auto;
    }
    
    .pointer {
        border-top: 40px solid transparent;
        border-bottom: 40px solid transparent;
        border-right: 80px solid #ff6600;
        right: -30px;
    }
    
    .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;
    }
}
