/* games/lotto/lotto.css */

/* Remove body and .game-container styles that conflict with games.css */
* {
    box-sizing: border-box; /* Added to ensure consistent box model */
}


/* header .game-title styles are now handled by games.css for consistency */

.lotto-machine-area {
    position: relative;
    width: 100%;
    height: 400px; /* Adjusted for better visibility of canvas content */
    background-color: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#lottoCanvas {
    width: 100%;
    height: 100%;
    background-color: #f8f8f8; /* Placeholder for machine background */
    border-radius: 10px;
}

.drawn-balls-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 80px;
    margin-top: 20px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 10px;
}

.lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #333;
    font-size: 1.8em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Ball colors based on ranges */
.ball-1-9 { background-color: #FFEB3B; } /* Yellow */
.ball-10-19 { background-color: #2196F3; } /* Blue */
.ball-20-29 { background-color: #F44336; } /* Red */
.ball-30-39 { background-color: #607D8B; } /* Grey/Black */
.ball-40-45 { background-color: #4CAF50; } /* Green */

.final-result-area {
    margin: 0; /* Removed margin */
    padding: 0; /* Removed padding */
    /* border-top: 1px solid #eee; Removed border */
}

.final-result-area h2 {
    color: #3F51B5;
    margin-bottom: 5px; /* Reduced margin */
    font-size: 1.5em; /* Reduced font size */
}

.final-balls {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Enable horizontal scroll if needed */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 5px; /* Add some padding for scrollbar */
}

.final-balls::-webkit-scrollbar {
    height: 8px;
}

.final-balls::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.final-balls::-webkit-scrollbar-track {
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.final-balls .lotto-ball {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    margin: 3px;
}

.gray-button{
    background-color : #aaaaaa !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .setup-controls {
        flex-wrap: nowrap; /* 줄바꿈 방지 */
        justify-content: center; /* 중앙 정렬 */
        gap: 10px; /* 요소들 사이의 간격 */
    }

    .setup-controls label,
    .setup-controls select,
    .setup-controls button {
        flex-shrink: 0; /* 요소가 줄어들지 않도록 */
    }


    .lotto-ball {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .final-balls .lotto-ball {
        width: 60px;
        height: 60px;
        font-size: 1.8em;
    }
}

@media (max-width: 600px) {
    .setup-controls {
        flex-wrap: wrap;
    }

    .setup-controls label,
    .setup-controls select,
    .setup-controls button {
        flex-basis: 100%;
        text-align: center;
    }

    .lotto-ball {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }

    .final-balls .lotto-ball {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
}

.setup-controls {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}