/* 기본 레이아웃 초기화 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s;
    position: relative;
}

body.dark-mode .container {
    background: #34495e;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

body.dark-mode header h1 {
    color: #ecf0f1;
}

header p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

body.dark-mode header p {
    color: #bdc3c7;
}

.top-right-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

#theme-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    background: transparent;
    border: none;
    padding: 5px;
}

body.dark-mode #theme-toggle {
    color: #ecf0f1;
}

.lang-buttons {
    display: flex;
}

.lang-btn {
    padding: 5px 10px;
    font-size: 0.9rem;
    border: 1px solid #7f8c8d;
    background: transparent;
    color: #7f8c8d;
    cursor: pointer;
}

.lang-btn.active {
    background: #7f8c8d;
    color: white;
}

body.dark-mode .lang-btn {
    border-color: #bdc3c7;
    color: #bdc3c7;
}

body.dark-mode .lang-btn.active {
    background: #bdc3c7;
    color: #2c3e50;
}

/* 로또 번호 표시 영역 */
.lotto-numbers-display {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    min-height: 80px;
    margin: 20px 0 30px 0;
}

/* 로또 공 스타일 */
.ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2), 0 5px 10px rgba(0,0,0,0.1);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: popIn 0.5s ease-out forwards;
}

/* 버튼을 큼직하게 스타일링 */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.btn {
    padding: 18px 24px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-secondary {
    background-color: #e67e22;
    color: white;
}

/* 자주 나오는 번호 영역 */
.frequent-numbers-info {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

body.dark-mode .frequent-numbers-info {
    background-color: #2c3e50;
}

.frequent-numbers-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

body.dark-mode .frequent-numbers-info h3 {
    color: #ecf0f1;
}

.frequent-numbers-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

body.dark-mode .frequent-numbers-info p {
    color: #bdc3c7;
}

.frequent-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.frequent-list .ball {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* 공 나타나는 애니메이션 */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
