/* style.css */

/* 전체 페이지에 적용될 기본 스타일 */
body {
    font-family: '맑은 고딕', 'Malgun Gothic', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    background-color: #f4f7f6;
    padding: 20px;
    box-sizing: border-box;
}

/* 게임 전체를 감싸는 컨테이너 스타일 */
.container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 750px;
    text-align: center;
}

/* 제목 스타일 (h1, h2) */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h2 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 10px;
}

/* 숫자 버튼들을 담고 있는 컨테이너 스타일 */
#number-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px; /* 버튼(공)들 사이의 간격 */
    margin-bottom: 20px;
}

/* ⭐⭐⭐ 개별 숫자 버튼 스타일 (로또 공 모양으로 변경) ⭐⭐⭐ */
.number-button {
    width: 42px; /* 공의 너비 */
    height: 42px; /* 공의 높이 */
    border-radius: 50%; /* 완벽한 원 모양 */
    border: 1px solid #cccccc; /* 공의 테두리 */
    background-color: #ffffff; /* 공의 기본 배경색 */
    color: #333333; /* 공 안의 글자색 */
    font-size: 0.95em; /* 글자 크기 */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.15s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15); /* 입체감 */
}

.number-button:hover {
    background-color: #f0f0f0; /* 마우스 오버 시 배경색 */
    transform: scale(1.08); /* 살짝 커지는 효과 */
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2); /* 마우스 오버 시 그림자 강조 */
}

.number-button.selected {
    background-color: #4CAF50; /* 선택 시 배경색 (초록색 계열) */
    color: white; /* 선택 시 글자색 */
    border-color: #3e8e41; /* 선택 시 테두리색 */
    transform: scale(1.02); /* 선택 시 크기 변화 */
    box-shadow: inset 0px 1px 3px rgba(0,0,0,0.3), 0px 1px 2px rgba(0,0,0,0.1); /* 선택 시 안쪽 그림자 */
}

/* 선택한 번호 개수 표시 스타일 */
#selected-count {
    font-weight: bold;
    color: #e74c3c;
}
.number-selector p {
    font-size: 0.9em;
    color: #555;
}

/* "번호 생성!", "다시하기" 버튼을 담는 컨테이너 스타일 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 30px;
}

.controls button {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}
.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

#generate-button {
    background-color: #2ecc71;
}
#generate-button:hover {
    background-color: #27ae60;
}

#reset-button {
    background-color: #e74c3c;
}
#reset-button:hover {
    background-color: #c0392b;
}

/* 생성된 로또 번호(공)들을 담는 컨테이너 스타일 */
#lotto-balls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 70px;
    margin-bottom: 30px;
    padding: 10px;
    background-color: #e9e9e9;
    border-radius: 8px;
}

.lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset -3px -3px 5px rgba(0,0,0,0.2), 2px 2px 8px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* 이전 생성 번호 목록 스타일 */
.history h2 {
    margin-top: 20px;
}
.history ul {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 10px;
}

.history li {
    background-color: #f9f9f9;
    border: 1px solid #eeeeee;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 1em;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}
.history li:last-child {
    margin-bottom: 0;
}