/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    background-color: #050505;
    background-image:
        radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000000 100%);
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    color: #fff;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* UI Overlay */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 20px;

    /* Neon Frame Border */
    box-shadow: inset 0 0 50px rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.1);
}

/* HUD */
.hud {
    position: absolute;
    top: 20px;
    width: 95%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    color: #00ffff;
    font-weight: 700;
    font-size: 0.9rem;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud div span {
    color: #fff;
    text-shadow: 0 0 10px #00ffff;
    margin-left: 5px;
}

/* Control Bar */
.controls {
    pointer-events: auto;
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* Cyberpunk Spin Button */
.spin-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid rgba(255, 0, 128, 0.8);
    background: radial-gradient(circle, #2b0036 0%, #0d0014 100%);
    color: #ff0080;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
    box-shadow:
        0 0 20px rgba(255, 0, 128, 0.4),
        0 0 50px rgba(255, 0, 128, 0.2),
        inset 0 0 20px rgba(255, 0, 128, 0.2);
    cursor: pointer;
    transition: all 0.1s;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.8);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 0, 128, 0.6);
    color: #fff;
    border-color: #fff;
}

.spin-btn:active {
    transform: scale(0.95);
}

.spin-btn:disabled {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Small Buttons */
.small-btn {
    pointer-events: auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: all 0.2s;
}

.small-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.small-btn.active {
    background: #00ffff;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

/* Help Modal */
#help-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#help-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #111;
    border: 2px solid #00ffff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
    text-align: center;
    font-size: 0.9rem;
}

.modal-content h2 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #ddd;
}

.close-btn {
    margin-top: 15px;
    padding: 10px 30px;
    background: #00ffff;
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 20px;
}

@media (min-width: 768px) {
    .spin-btn {
        width: 140px;
        height: 140px;
        font-size: 1.8rem;
    }

    .small-btn {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }

    .controls {
        gap: 30px;
        margin-bottom: 40px;
        padding: 20px 40px;
    }

    .hud {
        top: 40px;
        padding: 15px 30px;
        font-size: 1.2rem;
    }

    #ui-layer {
        padding-bottom: 60px;
    }
}