/* Section: Main Container */
#main-container {
    margin-top: 15px !important;
    position: relative;
}

/* Section: Wheel Container */
.wheel_container {
    position: relative;
    width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Section: Wheel Header */
.wheel_header {
    width: 100%;
    z-index: 10;
    display: flex;
    margin-bottom: 15px;
}

.icons {
    font-size: 2rem;
    margin-right: 10px;
    cursor: pointer;
    background-color: #000;
    color: #fff;
    border-radius: 10px;
    width: 54px;
    height: 54px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.names-count {
    color: #000;
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 0 0px 0px;
    text-align: left;
}

/* Section: Wheel Area */
.wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheel {
    display: block;
    border-radius: 50%;
    border: 5px solid #333;
}

#spin-btn {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: red;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    border: 5px solid white;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pointer {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 60px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section: Winner Overlay */
#winnerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-box {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -120%);
    background: #fffbe7;
    color: #222;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 36px 48px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    border: 3px solid #ffd700;
    text-align: center;
    min-width: 450px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

/* Section: Tap to Reveal */
.tap-to-reveal-text {
    margin-top: 24px;
    text-align: center;
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
    letter-spacing: 1px;
    transition: opacity 0.3s;
    opacity: 1;
    cursor: pointer;
    user-select: none;
}

.tap-to-reveal-text.hide {
    opacity: 0;
    pointer-events: none;
}

/* Section: Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.modal-content {
    background: #fff;
    border: 3px solid #222;
    border-radius: 18px;
    min-width: 650px;
    max-width: 100vw;
    box-shadow: 0 8px 32px #0004;
    padding: 0;
    overflow: hidden;
    margin-top: 20px;
    z-index: 9999;
    height: auto;
}

.modal-header {
    text-align: center;
    border-bottom: 3px solid #222;
    padding: 10px 20px;
}

.modal-header .model-header_title {
    margin: 0;
    color: #4CAF50;
    font-size: 1.5rem;
    text-align: left;
}

.modal-body {
    padding: 10px 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.modal-body textarea {
    width: 100%;
    min-height: 270px;
    max-height: 270px;
    font-size: 1.1em;
    border: 2px solid #222;
    border-radius: 8px;
    padding: 8px;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 18px;
    background: #fafafa;
    font-family: inherit;
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
}

#save-names-btn {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #333;
}

#save-names-btn:hover {
    background-color: #45a049;
}

.save-names-btn:disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border: 1px solid #aaa !important;
}

.save-names-btn {
    background: #388e3c;
    color: #fff;
    border: 1px solid #388e3c;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

/* Section: Close Icon in Modal Header */
.close-modal {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    margin-top: -30px;
    margin-right: 5px;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #d32f2f;
}

/* Section: Button group */
.reveal-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    align-items: center;
    margin-top: 10px;
}

/* Section: Remove Toggle Button */
.remove-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border: none;
    border-radius: 30px;
    padding: 13px 36px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    width: 100%;
}

.remove-toggle.on {
    background: linear-gradient(90deg, #3fd86b 0%, #1ebc5c 100%);
    color: #fff;
}

.remove-toggle.off {
    background: linear-gradient(0deg, #e74c3c 0%, #ffb3b3 100%);
    color: #fff;
}

.remove-toggle .toggle-icon {
    margin-right: 10px;
    font-size: 1.3em;
}

/* Section: Continue Button */
.continue-btn2 {
    background: linear-gradient(90deg, #6fd6ff 0%, #3a8dde 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px 36px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    width: 100%;
    max-width: 270px;
    transition: background 0.2s;
}

/* Section: Button Overlay */
.button-overlay {
    position: absolute;
    right: -198px;
    bottom: -58px;
    z-index: 999999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.button-overlay .reveal-buttons {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 20px;
    /* min-width: 320px;
    min-height: 140px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    position: relative;
    gap: 8px;
}

/* Section: Warning Popup */

.custom-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.custom-warning-content {
    background: #fffbe7;
    border: 2.5px solid #ff9800;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0003;
    min-width: 320px;
    max-width: 90vw;
    padding: 0;
    overflow: hidden;
    animation: popIn 0.2s;
}

@keyframes popIn {
    from {
        transform: scale(0.95);
    }

    to {
        transform: scale(1);
    }
}

.custom-warning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #ffe0b2 0%, #fffbe7 100%);
    padding: 16px 24px 10px 18px;
    border-bottom: 2px solid #ff9800;
}

.custom-warning-icon {
    font-size: 2.1rem;
    margin-right: 10px;
}

.custom-warning-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e65100;
    flex: 1;
    text-align: left;
}

.custom-warning-close {
    font-size: 2rem;
    color: #e65100;
    cursor: pointer;
    margin-left: 18px;
    transition: color 0.2s;
}

.custom-warning-close:hover {
    color: #d32f2f;
}

.custom-warning-body {
    padding: 24px 28px 24px 28px;
    font-size: 1.15rem;
    color: #333;
    text-align: center;
    font-weight: 500;
    min-width: 220px;
    min-height: 40px;
}





/* 1299px and below */
@media (max-width: 1299px) {
    .wheel_container {
        width: 90vw;
        max-width: 600px;
    }

}

@media (max-width: 1024px) {

    .wheel-container {
        position: relative;
        /* Ensure absolute children are positioned correctly */
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        min-height: 0;
    }

    .wheel_header {
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
    }

    #wheel {
        width: 90vw !important;
        height: 90vw !important;
        max-width: 350px !important;
        max-height: 350px !important;
        min-width: 200px;
        min-height: 200px;
        display: block;
        margin: 0 auto;
    }

    #spin-btn {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 100px !important;
        height: 100px !important;
        border-radius: 50% !important;
        transform: translate(-50%, -50%);
        font-size: 1.8rem;
        font-weight: bold;
        z-index: 10;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: red;
        color: white;
        border: 5px solid white;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        cursor: pointer;
    }

    .pointer {
        left: 78%;
        top: 43%;
        transform: translateX(-50%);
        width: 40px;
        height: 48px;
    }

    .winner-box {
        font-size: 1.2rem;
        padding: 10px 20px;
        max-width: 90vw;
        word-break: break-word;
    }

    .modal-content {
        width: 95vw;
        max-width: 400px;
        padding: 10px;
    }

    .modal-body textarea {
        width: 100%;
        font-size: 1rem;
    }

    .reveal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    #spin-btn,
    .continue-btn2,
    #removeToggleBtn {
        width: 100%;
        font-size: 1.1rem;
        margin: 5px 0;
    }

    .tap-to-reveal-text {
        font-size: 1rem;
        padding: 8px 0;
    }
}

@media (max-width: 992px) {
    .pointer {
        width: 36px;
        height: 44px;
        left: 78.5%;
        top: 43.9%;
        transform: translateX(-50%);
    }

    .winner-box {
        min-width: 350px;
        position: absolute;
        top: 80%;
        left: 50%;
        transform: translate(-50%, -120%);
        font-size: 2rem;
    }

    .button-overlay {
        position: absolute;
        right: -135px;
        bottom: -65px;
        z-index: 999999999;
    }
}

@media (max-width: 768px) {

    .pointer {
        width: 40px;
        height: 40px;
        left: 78.5%;
        top: 43.9%;
        transform: translateX(-50%);
    }

    .winner-box {
        min-width: 250px;
        position: absolute;
        top: 75%;
        left: 50%;
        transform: translate(-50%, -120%);
        font-size: 2rem;
        min-width: 350px;
        height: 130px;
    }

    .button-overlay {
        position: absolute;
        right: -50px;
        bottom: -20px;
        z-index: 999999999;
    }

    #settings-modal .modal-content {
        width: 90vw;
        max-width: 400px;
        padding: 18px 10px;
    }

    #settings-modal .modal-header h2 {
        font-size: 1.3rem;
    }

    #settings-modal .modal-body label,
    #settings-modal .modal-body textarea,
    #settings-modal .modal-body button {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 20px 0 !important;
    }

    .pointer {
        width: 40px;
        height: 40px;
        left: 82%;
        top: 43.9%;
        transform: translateX(-50%);
    }

    .winner-box {
        min-width: 300px;
        position: absolute;
        top: 70%;
        left: 50%;
        transform: translate(-50%, -120%);
        font-size: 2rem;
    }

    .button-overlay {
        position: absolute;
        right: 0px;
        bottom: -5px;   
        z-index: 999999999;
    }

    .modal-content {
        width: 96vw;
        min-width: 93vw !important;
        padding: 12px 4px;
    }

    #settings-modal .modal-header h2 {
        font-size: 1.1rem;
    }

    #settings-modal .modal-body textarea {
        min-height: 120px;
        font-size: 0.95rem;
    }

    #settings-modal .modal-body button {
        width: 100%;
        font-size: 1rem;
    }

    .modal-content {
        max-width: 98vw;
        padding: 4px;
    }

    .winner-box {
        font-size: 2rem;
        padding: 6px 10px;
    }

    .custom-warning-content {
        min-width: 0;
        width: 95vw;
        padding: 0;
    }

    .custom-warning-header {
        padding: 12px 10px 8px 10px;
    }

    .custom-warning-body {
        padding: 16px 8px 16px 8px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .pointer {
        width: 40px;
        height: 40px;
        left: 89%;
        top: 43.9%;
        transform: translateX(-50%);
    }
}

@media (max-width: 350px) {
    .pointer {
        width: 30px;
        height: 30px;
        position: absolute;
        left: 98%;
        top: 43.9%;
        transform: translateX(-50%, -50%);
    }

    .winner-box {
        min-width: 300px;
        min-height: 150px;
        position: absolute;
        top: 85%;
        left: 50%;
        transform: translate(-50%, -120%);
        font-size: 1.5rem;
    }

    .button-overlay {
        position: absolute;
        bottom: -10px;
        z-index: 999999999;

    }

    .button-overlay .reveal-buttons {
        min-width: 300px;
        min-height: 130px;
        padding: 10px 20px;
        gap: 10px;
        margin-top: 0;

    }

    #removeToggleBtn,
    .continue-btn2 {
        font-size: 1rem;
        padding: 10px 20px;
        margin-bottom: 0px !important;
    }

    .names-count {
        font-size: 1rem;
    }

    #settings-modal .modal-content {
        width: 95vw;
        min-width: 99vw;
        padding: 6px 2px;
    }

    #settings-modal .modal-header h2 {
        font-size: 1rem;
    }

    #settings-modal .modal-body textarea {
        min-height: 80px;
        font-size: 0.9rem;
    }

    #settings-modal .modal-body button {
        font-size: 0.95rem;
        padding: 8px 0;
    }
}

@media (max-width: 320px) {
    .button-overlay {
        position: absolute;
        right: -5px;
        bottom: -10px;
        z-index: 999999999;

    }
}