:root {
    --bg-color: #f0f0f0;
    --container-bg: #ffffff;
    --text-color: #333333;
    --ball-bg: #eeeeee;
    --button-bg: #007bff;
    --button-hover: #0056b3;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --ball-bg: #444444;
    --button-bg: #375a7f;
    --button-hover: #2b4764;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 상단부터 정렬 */
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    text-align: center;
    background-color: var(--container-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    transition: background-color 0.3s ease;
    max-width: 650px;
    width: 100%;
}

/* 댓글 섹션 스타일 */
.comments-section {
    margin-top: 40px;
}

.comments-section hr {
    border: 0;
    border-top: 1px solid #eee;
    margin-bottom: 30px;
}

[data-theme="dark"] .comments-section hr {
    border-top: 1px solid #444;
}

h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* 테마 스위치 스타일 */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
    margin-right: 10px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: #375a7f;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

#theme-text {
    font-size: 0.9rem;
    font-weight: bold;
}

.lotto-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.lotto-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.bonus-plus {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0 2px;
    opacity: 0.5;
}

.ball.bonus {
    border: 2px solid var(--button-bg);
    box-sizing: border-box;
}

.row-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-color);
    width: 30px;
    text-align: right;
    margin-right: 5px;
    opacity: 0.7;
}

.ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--ball-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: inset -3px -3px 7px rgba(0,0,0,0.1), 2px 2px 7px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

#generator-btn {
    background-color: var(--button-bg);
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    transition: all 0.3s ease 0s;
    border: none;
}

#generator-btn:hover {
    background-color: var(--button-hover);
}

/* 제휴 문의 폼 스타일 */
.contact-section {
    margin-top: 40px;
    text-align: left;
}

.contact-section hr {
    border: 0;
    border-top: 1px solid #eee;
    margin-bottom: 30px;
}

[data-theme="dark"] .contact-section hr {
    border-top: 1px solid #444;
}

.contact-section h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--container-bg);
    color: var(--text-color);
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--button-bg);
}

#submit-btn {
    width: 100%;
    background-color: #28a745;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submit-btn:hover {
    background-color: #218838;
}

[data-theme="dark"] #submit-btn {
    background-color: #1e7e34;
}

[data-theme="dark"] #submit-btn:hover {
    background-color: #155d27;
}
