/* Sidebar Container */
.sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: #f8f9fa;
    border-right: 1px solid #ccc;
    padding-top: 55px;
    padding-left: 25px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-300px);
}

.sidebar-container.visible {
    transform: translateX(0);
}

.sidebar-container.hidden {
    transform: translateX(-300px);
}

/* Menu Toggle Button */
#menu-toggle-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 0.25rem;
    z-index: 1002;
}

#menu-toggle-btn:hover {
    background: #2563eb;
}

/* Sidebar Menu */
#sidebar-menu {
    width: 100%;
    height: 100%;
    padding: 40px 1rem 1rem 1rem;
    position: relative;
}

#sidebar-menu.hidden {
    display: none;
}

#sidebar-menu a.menu-item {
    display: block;
    padding: 0.5rem;
    color: #333;
    text-decoration: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
}

#sidebar-menu a.menu-item:hover {
    background: #e5e7eb;
}

#sidebar-menu a.menu-item.auth-only {
    display: none;
}

.sidebar-container.logged-in #sidebar-menu a.menu-item.auth-only {
    display: block;
}

/* Status Container (Dot and Text) */
#sidebar-menu .status-container {
    display: flex;
    align-items: center;
    position: absolute;
    top: 20px;
    left: 30px;
    gap: 8px;
}

#sidebar-menu .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: red;
}

#sidebar-menu .status-dot.logged-in {
    background-color: green;
}

#sidebar-menu .status-text {
    font-size: 16px;
    color: #333;
    cursor: pointer;
}

#sidebar-menu .status-text.menu-item:hover {
    background: #e5e7eb;
}

/* Sidebar Content */
#sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
}

#sidebar-content.hidden {
    display: none;
}

#sidebar-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

#sidebar-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: #333;
}

#sidebar-content p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

#sidebar-content ul {
    list-style: disc;
    margin-left: 20px;
    font-size: 0.875rem;
    color: #666;
}

#sidebar-content input, #sidebar-content select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

#sidebar-content label {
    font-size: 0.875rem;
    color: #333;
    margin-bottom: 0.25rem;
    display: block;
}

#sidebar-content button {
    background: #3b82f6;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    font-size: 0.875rem;
}

#sidebar-content button:hover {
    background: #2563eb;
}

#sidebar-content .menu-link {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
}

#sidebar-content .menu-link:hover {
    color: #2563eb;
}

.faq-section, .about-section, .rules-section, .add-credit-section, .upgrade-vip-section, .play-free-section, .play-paid-section, .play-vip-section {
    margin: 20px 0;
}

#settings-success, #settings-error {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid;
    border-radius: 0.25rem;
}

#settings-success {
    border-color: green;
    background-color: #e6ffe6;
}

#settings-error {
    border-color: red;
    background-color: #ffe6e6;
}

.vip-badge {
    background-color: gold;
    color: black;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
}

/* Navigation Buttons */
.nav-buttons {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.nav-buttons.hidden {
    display: none;
}

.nav-buttons button {
    background: #6b7280;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.nav-buttons button:hover {
    background: #4b5563;
}

/* Game Status (Timer or Join Queue/Queue Info) */
.game-status {
    position: absolute;
    bottom: min(5%, 40px);
    left: calc(30% - min(20vw, 240px));
    z-index: 3;
    background: #fff;
    padding: min(0.8vw, 0.8vh, 10px);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: min(40vw, 240px);
}

.game-status.hidden {
    display: none;
}

.queue-status {
    display: block;
}

.queue-status.hidden {
    display: none;
}

.toggle-queue-btn {
    pointer-events: auto;
    cursor: pointer;
    display: inline-block;
    background: #3b82f6 !important;
    color: #fff !important;
    padding: min(1.2vw, 1.2vh, 12px) min(0.8vw, 0.8vh, 8px);
    border-radius: 0.25rem;
    border: none;
    font-size: min(1.6vw, 1.6vh, 16px);
    transition: background 0.2s ease;
}

.toggle-queue-btn:hover {
    background: #2563eb !important;
}

.toggle-queue-btn:disabled, .toggle-queue-btn.disabled {
    background: #9ca3af !important;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: auto;
}

.queue-content {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
    margin-top: 5px;
}

.queue-content .queue-position {
    font-size: min(1.6vw, 1.6vh, 16px);
    font-weight: 600;
    color: #333;
}

.queue-content .wait-time {
    color: #666;
    font-size: min(1.4vw, 1.4vh, 14px);
}

.queue-content .queue-pay-faster, .queue-content .queue-upgrade-vip {
    margin-top: min(0.8vw, 0.8vh, 8px);
    padding: min(0.8vw, 0.8vh, 8px) min(1.6vw, 1.6vh, 16px);
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
}

.queue-content .queue-pay-faster {
    background: #10b981;
    color: #fff;
}

.queue-content .queue-pay-faster:hover {
    background: #059669;
}

.queue-content .queue-upgrade-vip {
    background: #8b5cf6;
    color: #fff;
}

.queue-content .queue-upgrade-vip:hover {
    background: #7c3aed;
}

.queue-list {
    list-style: none;
    padding: 0;
    margin: 5px 0;
}

.queue-list li {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px), (max-height: 770px) {
    .game-status {
        left: calc(30% - min(25vw, 180px));
        padding: min(0.6vw, 0.6vh, 6px);
        max-width: min(50vw, 180px);
    }
    .toggle-queue-btn {
        padding: min(0.8vw, 0.8vh, 8px) min(0.6vw, 0.6vh, 6px);
        font-size: min(1.2vw, 1.2vh, 12px);
    }
    .queue-content .queue-position {
        font-size: min(1.4vw, 1.4vh, 14px);
    }
    .queue-content .wait-time {
        font-size: min(1.2vw, 1.2vh, 12px);
    }
    .queue-list li {
        font-size: 12px;
    }
    /* Existing styles unchanged, only showing relevant additions */
#toggle-queue-popout {
    pointer-events: auto;
    cursor: pointer;
    display: inline-block;
    background: #6b7280 !important;
    color: #fff !important;
    padding: min(1.2vw, 1.2vh, 12px) min(0.8vw, 0.8vh, 8px);
    border-radius: 0.25rem;
    border: none;
    font-size: min(1.6vw, 1.6vh, 16px);
    margin-left: 5px;
    transition: background 0.2s ease;
}

#toggle-queue-popout:hover {
    background: #4b5563 !important;
}
.queue-content {
    display: block;
}

.queue-content:not(.open) {
    display: none;
}

#toggle-queue-popout {
    pointer-events: auto;
    cursor: pointer;
    display: inline-block;
    background: #6b7280 !important;
    color: #fff !important;
    padding: min(1.2vw, 1.2vh, 12px) min(0.8vw, 0.8vh, 8px);
    border-radius: 0.25rem;
    border: none;
    font-size: min(1.6vw, 1.6vh, 16px);
    margin-left: 5px;
    transition: background 0.2s ease;
}

#toggle-queue-popout:hover {
    background: #4b5563 !important;
}

.toggle-queue-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
}
.success-message {
    color: green;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background-color: #e0ffe0;
    border-radius: 5px;
    margin: 10px 0;
}
}