/* --- demo.css --- */

/* 1. Modal Overlay */
.modal-demo {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

/* 2. Form Box */
.modal-demo .lottery-form {
    background-color: #fefefe;
    margin: 0;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 410px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    box-sizing: border-box;
}

#game-setup-modal .lottery-form {
    padding: 30px;
}

/* Layout Utils */
.lottery-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* 3. Inputs & Buttons */
label {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 4px;
    display: block;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"] {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

/* ADDED: Specific 12px font size for the lottery link in Demo */
#new-loto-link {
    font-size: 12px;
}

input[readonly] {
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}

/* Password Eye Icon Wrapper */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.password-toggle:hover {
    color: #333;
}


/* UPDATED: Specific size for Verify Email button */
#btn-send {
    font-size: 15px;
}


#play {
    background-color: transparent !important;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    padding: 10px;
}

#play:hover {
    background-color: #219150 !important;
    color: var(--white);
}

/* 4. Loto Grid */
.loto-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    min-height: 80px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    position: relative;
}

.player-id-label {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.count-label {
    position: absolute;
    bottom: -25px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #dc3545;
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 12px;
    width: 100%;
    max-width: 220px;
    margin: 10px auto;
}

.number-circle,
.result-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 4px #DDE2F1 inset;
    transition: transform 0.15s, background-color 0.2s;
    user-select: none;
    margin: 0 auto;
}

.number-circle.even,
.result-circle.even {
    background: #9BBB59;
}

.number-circle.odd,
.result-circle.odd {
    background: #4F81BD;
}

.result-circle.active-red {
    background-color: #dc3545 !important;
    box-shadow: 0 0 0 4px #c0392b inset !important;
    transform: scale(1.1);
}

.number-circle.selected {
    box-shadow: 0 0 0 4px #993333 inset;
    transform: scale(1.1);
}

.feedback-message {
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    min-height: 24px;
    margin: 5px 0;
}

.feedback-message.error {
    color: #dc3545;
}

.feedback-message.success {
    color: #27ae60;
}

.winner-message {
    margin-top: 25px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    display: none;
    padding: 10px;
    background-color: #e8f6e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    animation: fadeIn 0.5s;
}

.calculation-desc {
    margin-top: 15px;
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
    text-align: left;
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    font-family: 'Courier New', Courier, monospace;
    display: none;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.winner-announcement {
    color: #27ae60;
    font-weight: bold;
    font-size: 24px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.winner-red {
    color: #dc3545 !important;
    font-weight: bold;
}

#admin-initial-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

#admin-initial-buttons button {
    flex: 1;
}

.spinner {
    font-weight: bold;
    color: #27ae60;
    margin: 0 10px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

@media (max-height: 600px) {
    .modal-demo .lottery-form {
        margin: 10px auto;
        padding: 20px;
        max-width: 450px;
    }

    .lottery-form {
        gap: 6px;
    }

    input[type="text"],
    input[type="number"],
    input[type="password"] {
        padding: 4px 8px;
        height: 30px;
        font-size: 13px;
    }

    .ok-btn {
        margin-top: 5px;
        padding: 8px;
        font-size: 13px;
    }
}