
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
}
.card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 800px; /* 800px 이상으로 넓게 */
    text-align: center;
    box-sizing: border-box;
}
h1 {
    font-size: 2em;
    margin-bottom: 30px;
}
input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
}
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    margin-bottom: 10px;
}
.btn-primary { background-color: #007bff; color: white; }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-success { background-color: #28a745; color: white; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-google { background-color: #DB4437; color: white; } /* Google 버튼 색상 */
.btn-api-test { background-color: #ff9800; color: white; } /* API 테스트 버튼 색상 */
.btn-secondary-purple { background-color: #673AB7; color: white; } /* 보라색 계열 */

dialog {
    border: none;
    border-radius: 15px;
    padding: 2em;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 0 2em rgba(0, 0, 0, 0.2);
    position: relative; /* 추가 */
}
dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}
/* #close-login-btn 스타일 추가 */
#close-login-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}
#close-login-btn:hover {
    color: #000;
}
.hidden { display: none; }

/* 연금복권 번호 스타일 */
.lottery-ball {
    display: flex; /* 숫자 중앙 정렬 */
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* 공간이 좁아도 찌그러지지 않도록 */
    width: 55px; /* 정확한 원형 */
    height: 55px; /* 정확한 원형 */
    border-radius: 50%;
    background-color: white; /* 흰색 배경 */
    color: #000; /* 검정색 글자 */
    font-weight: bold;
    font-size: 1.2em; /* 폰트 크기 약간 키움 */
    margin: 0 3px; /* 여백 조정 */
    /* box-shadow 제거 */
    border: 4px solid transparent; /* 4px 고정 테두리, 색상은 JS에서 */
    box-sizing: border-box; /* 테두리가 굵어도 원 크기 유지 */
}
.lottery-group-ball {
    background-color: white; /* 흰색 배경 */
    color: #000; /* 검정색 숫자 */
    border-color: #bdc3c7; /* 굵은 회색 테두리 */
}
/* .lottery-number-ball 은 이제 getRandomRgbaColor()에 의해 개별적으로 스타일링되므로 이 클래스는 필요 없습니다. */
.lottery-history-entry {
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px dashed #eee;
    display: flex; /* 공들을 한 줄에 표시하기 위함 */
    justify-content: center; /* 중앙 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    gap: 10px; /* 공들 사이 간격 */
    flex-wrap: wrap; /* 내용이 길어지면 줄 바꿈 */
}
.lottery-group-text {
    font-weight: bold;
    color: #333; /* 검정색 */
    margin: 0 10px; /* 양옆 여백 */
}
.lottery-history-title {
    text-align: left;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
}
.lottery-history-container {
    margin-top: 20px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 10px;
    max-height: 500px; /* 스크롤을 위해 높이 제한 */
    max-height: 50vh; /* 모바일에서도 적절하게 */
    overflow-y: auto; /* 내용이 넘치면 스크롤 */
    -webkit-overflow-scrolling: touch; /* 모바일에서 부드러운 스크롤 */
    max-width: 800px; /* 메인 컨테이너 너비에 맞춰 확장 */
    margin: 0 auto; /* 중앙 정렬 */
}
#history-container .lottery-ball {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    margin: 0 4px !important;
    font-size: 16px !important;
    font-weight: bold !important;
}
.lottery-history-entry {
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap; /* 줄바꿈 방지 */
    overflow-x: auto; /* 가로 스크롤 */
    -webkit-overflow-scrolling: touch;
    justify-content: center; /* 중앙 정렬 */
}
.lottery-history-entry strong {
    margin-right: 15px; /* 시간 텍스트와 공 사이 간격 */
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 10px;
}
.history-header #clear-history-btn { /* #clear-history-btn으로 수정 */
    width: auto; /* 버튼의 너비 자동 조절 */
    margin-left: 10px; /* 제목과의 간격 */
    padding: 5px 10px; /* 버튼 패딩 조정 */
    font-size: 0.8em; /* 폰트 크기 조정 */
}
.round-badge {
    background-color: #34495e; /* 차분한 남색 배경 */
    color: white; /* 흰색 글씨 */
    padding: 2px 8px;
    border-radius: 12px; /* 둥근 뱃지 모양 */
    font-size: 12px;
    margin-right: 8px; /* 시간 텍스트와 간격 띄우기 */
    font-weight: bold;
}
