:root {
    --primary-glow: #00ff88;
    --secondary-glow: #00ccff;
    --accent-red: #ff3e3e;
    --bg-dark: #0a0a0f;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --font-main: 'Outfit', 'Noto Sans KR', sans-serif;
}

.vivid-blur {
    filter: blur(12px);
    pointer-events: none;
    transition: filter 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.back-hub-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.back-hub-btn:hover {
    background: var(--primary-glow);
    color: black;
    transform: translateX(-5px);
    box-shadow: 0 0 15px var(--primary-glow);
}

#game-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #151520 0%, #0a0a0f 100%);
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ensure it covers the screen for bottom positioning */
    padding: 1.5rem;
    pointer-events: none;
    z-index: 10;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.header-left {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.glow-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--primary-glow), var(--secondary-glow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.4));
}

#instruction {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-glow);
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

#count-display {
    position: absolute;
    top: 2rem;
    right: 3rem;
    display: flex;
    gap: 1.2rem;
    z-index: 1000;
    /* 다른 요소보다 항상 위에 위치 */
    pointer-events: auto;
    /* 클릭 및 입력 이벤트 허용 */
}

.player-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.order-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary-glow);
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-input {
    width: 75px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    color: white;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    pointer-events: auto;
    /* 입력창 클릭 보장 */
    cursor: text;
}

.player-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
    transform: translateY(-1px);
}

.player-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.6rem;
    letter-spacing: 1px;
}

#count-display.hidden,
.input-group.hidden {
    display: none !important;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.help-link {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    z-index: 1000;
}

.help-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(0, 255, 136, 0.1);
}

/* Setup Panel Styles - Moved to Bottom Center */
.glass-panel {
    background: transparent;
    /* Slightly darker for better visibility */
    border: none;
    /* backdrop-filter: blur(20px); */
    border-radius: 24px 24px 0 0;
    /* More rounded top */
    padding: 1.2rem 1.5rem;
    pointer-events: auto;
    width: 90%;
    max-width: 800px;
    position: absolute;
    bottom: 30px;
    /* Moved up */
    left: 54%;
    /* Moved right further */
    transform: translateX(-50%);
    max-height: 40vh;
    overflow-y: auto;
    /* box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); */
    z-index: 100;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel.expanded {
    max-height: 85vh;
}

.setup-header {
    display: flex;
    flex-direction: column;
    /* Stack rows vertically */
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.2rem;
}

.setup-header.hidden {
    display: none !important;
}

.setup-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    /* Allow wrap on mobile */
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.setup-header label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-glow);
    white-space: nowrap;
}

#player-count,
#bet-count {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    width: 70px;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
}

/* Force Spin Buttons to be Visible */
#player-count::-webkit-outer-spin-button,
#player-count::-webkit-inner-spin-button,
#bet-count::-webkit-outer-spin-button,
#bet-count::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button !important;
    opacity: 1 !important;
    display: block !important;
    margin-left: 5px;
    /* Slight gap */
}



/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.toggle-label {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.toggle-label.active {
    opacity: 1;
    color: var(--primary-glow);
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--secondary-glow);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    /* Standard property */
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary-glow);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.name-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* Wrap items instead of scrolling */
    gap: 0.6rem;
    justify-content: center;
    width: 100%;
}

/* Custom scrollbar for horizontal list */
.name-list::-webkit-scrollbar {
    height: 4px;
}

.name-list::-webkit-scrollbar-track {
    background: transparent;
}

.name-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.name-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.name-input-group label {
    font-size: 0.65rem;
    opacity: 0.6;
    min-width: 25px;
    white-space: nowrap;
}

.name-input-group input {
    flex: 1;
    width: 80px;
    background: transparent;
    border: none;
    color: white;
    padding: 0.2rem 0.4rem;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.delete-btn {
    background: rgba(255, 62, 62, 0.15);
    border: 1px solid rgba(255, 62, 62, 0.3);
    color: #ff3e3e;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #ff3e3e;
    color: white;
    transform: scale(1.1);
}

.name-input-group input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-glow);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
    outline: none;
}

.name-input-btn {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    cursor: pointer;
    font-weight: bold;
    color: white;
    user-select: none;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.name-input-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

.name-input-btn:active {
    transform: scale(0.98);
}

/* Privilege Group Highlights */
.privilege-group {
    position: relative;
    border-style: solid !important;
}

.rank-1st {
    border-color: #ffd700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.rank-1st label {
    color: #ffd700 !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.rank-2nd {
    border-color: #00e5ff !important;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.rank-2nd label {
    color: #00e5ff !important;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
}

.rank-3rd {
    border-color: #ff00ff !important;
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
}

.rank-3rd label {
    color: #ff00ff !important;
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.shuffle-btn {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid var(--primary-glow);
    color: var(--primary-glow);
    padding: 0.2rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    align-self: center;
    margin-left: 0.2rem;
}

@keyframes pulse-selectable {
    0% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    }
}

.selectable-item {
    animation: pulse-selectable 1.5s infinite;
    border: 1px solid var(--primary-glow) !important;
    cursor: pointer;
    transition: transform 0.2s;
}

.selectable-item:hover {
    transform: scale(1.02);
    background: rgba(0, 255, 136, 0.15) !important;
}

.boosted-item {
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    position: relative;
}

.boosted-item::after {
    content: 'x1.5';
    position: absolute;
    right: 5px;
    top: -10px;
    background: #ffd700;
    color: black;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 800;
}

.shuffle-btn:hover {
    background: var(--primary-glow);
    color: black;
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
    border-style: solid;
}

/* Scrollbar styling for the panel */
.glass-panel::-webkit-scrollbar {
    width: 4px;
}

.glass-panel::-webkit-scrollbar-track {
    background: transparent;
}

.glass-panel::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Result Overlay */
#result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

#result-overlay.hidden {
    display: none;
}

.result-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    /* Much lighter to keep target visible */
    backdrop-filter: none;
    /* Removed blur to stay "vivid" */
}

.result-card {
    position: relative;
    background: var(--glass-bg);
    border: 2px solid var(--primary-glow);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.3);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.win-label {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--secondary-glow);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

#result-status {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 20px var(--primary-glow);
    margin-bottom: 1rem;
}

#result-shooter {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-glow);
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

#result-shooter.hidden {
    display: none;
}

#retry-btn {
    background: var(--primary-glow);
    color: black;
    border: none;
    padding: 1rem 3rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#retry-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.4);
}

#retry-btn:active {
    transform: translateY(0);
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    70% {
        opacity: 1;
        transform: translate(-50%, -60%) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(1.2);
    }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }

    .glass-panel {
        width: 100%;
        max-height: 25vh;
    }

    .glow-text {
        font-size: 1.2rem;
    }

    #result-status {
        font-size: 2.5rem;
    }
}

/* Custom Alert Modal Styles */
#custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#custom-alert.hidden {
    display: none;
}

.alert-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    transition: background 0.4s ease;
}

#custom-alert.bright-target .alert-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.alert-card {
    position: relative;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: alertBounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 5vh;
    /* Shifted upwards by 5% of viewport height */
}

.alert-header {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary-glow);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.8rem;
}

#alert-message {
    font-size: 1rem;
    line-height: 1.6;
    color: white;
    margin-bottom: 2rem;
}

.alert-highlight-name {
    font-size: 200%;
    font-weight: 800;
    display: inline-block;
    margin: 0 5px;
    vertical-align: middle;
}

#alert-ok-btn {
    background: var(--secondary-glow);
    color: black;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.alert-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#alert-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

#alert-cancel-btn.hidden {
    display: none;
}

#alert-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

#alert-ok-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 204, 255, 0.4);
}

@keyframes alertBounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Option Selection Modal */
#option-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align to bottom initially to position relative to panel */
    padding-bottom: 25vh;
    /* Push up from bottom to sit above panel */
}

#option-selection-modal.hidden {
    display: none;
}

.option-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.option-content {
    position: relative;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
    animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.option-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--primary-glow);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.option-card:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary-glow);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

.option-icon {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-glow);
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 3px;
    /* Move text slightly up */
}

.option-card:hover .option-icon {
    background: var(--primary-glow);
    color: black;
}

.option-card.selected {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--primary-glow);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: translateY(-5px);
}

.option-card.selected .option-icon {
    background: var(--primary-glow);
    color: black;
    box-shadow: 0 0 10px var(--primary-glow);
}

.option-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

#option-close-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

#option-close-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(255, 62, 62, 0.1);
}

/* Fire Control Button */
#fire-control-area {
    position: absolute;
    bottom: 140px;
    /* Moved up further */
    right: 40px;
    /* Moved right further */
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    /* Ensure it catches clicks */
}

#fire-btn {
    width: 100px;
    /* Slightly wider for rectangle */
    height: 70px;
    /* Rectangular shape */
    border-radius: 20px;
    /* Smooth corners */
    background: linear-gradient(135deg, #8b4513, #5a2d0c);
    /* Bow Color */
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    /* Prevent browser handling gestures here */
}

#fire-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) inset;
    background: linear-gradient(135deg, #5a2d0c, #8b4513);
}

.fire-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
}

.fire-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -2px;
}

.fire-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Adjust layout for mobile if necessary */
.option-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.option-content {
    position: relative;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
    animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.option-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--primary-glow);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.option-card:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary-glow);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

.option-icon {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-glow);
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 3px;
    /* Move text slightly up */
}

.option-card:hover .option-icon {
    background: var(--primary-glow);
    color: black;
}

.option-card.selected {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--primary-glow);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: translateY(-5px);
}

.option-card.selected .option-icon {
    background: var(--primary-glow);
    color: black;
    box-shadow: 0 0 10px var(--primary-glow);
}

.option-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

#option-close-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

#option-close-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(255, 62, 62, 0.1);
}

/* Fire Control Button */
#fire-control-area {
    position: absolute;
    bottom: 180px;
    /* Moved up further */
    right: 20px;
    /* Moved right further */
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    /* Ensure it catches clicks */
}

#fire-btn {
    width: 100px;
    /* Slightly wider for rectangle */
    height: 70px;
    /* Rectangular shape */
    border-radius: 20px;
    /* Smooth corners */
    background: linear-gradient(135deg, #8b4513, #5a2d0c);
    /* Bow Color */
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    /* Prevent browser handling gestures here */
}

#fire-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) inset;
    background: linear-gradient(135deg, #5a2d0c, #8b4513);
}

.fire-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
}

.fire-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -2px;
}

.fire-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Adjust layout for mobile if necessary */
@media (max-width: 768px) {
    #fire-control-area {
        bottom: 80px;
        right: 15px;
    }
}

/* Guide Hand Animation */
.guide-hand {
    position: absolute;
    font-size: 3rem;
    z-index: 2000;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.8));
    animation: bounce-point 1.5s infinite;
}

.guide-hand.hidden {
    display: none;
}

@keyframes bounce-point {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10px, 10px);
    }
}

.label-blink {
    animation: text-pulse 0.8s infinite alternate;
    color: var(--primary-glow) !important;
    text-shadow: 0 0 10px var(--primary-glow);
}

@keyframes text-pulse {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.3;
    }
}

.shuffle-btn.ready {
    background: var(--primary-glow);
    color: black;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: pulse-ready 1s infinite;
    border-color: white;
}

@keyframes pulse-ready {
    0% {
        box-shadow: 0 0 10px var(--primary-glow);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 25px var(--primary-glow);
        transform: scale(1.05);
    }
}

.shuffle-btn.disabled {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
    cursor: not-allowed;
    background: #333 !important;
    color: #888 !important;
    border-color: #555 !important;
    box-shadow: none !important;
    animation: none !important;
}