/* ===== 기본 설정 ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: #121212;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.7;
}

body.light {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== 네비게이션 ===== */
.site-header {
    width: 100%;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

body.light .site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}

.navbar {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.nav-links a {
    color: inherit;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
    text-decoration: none;
}

#theme-toggle {
    margin-left: auto;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

body.light #theme-toggle {
    background-color: #e0e0e0;
    color: #1a1a1a;
}

/* ===== 메인 콘텐츠 ===== */
main {
    width: 100%;
    max-width: 900px;
    padding: 2rem 1.5rem;
    flex: 1;
}

/* ===== 추첨기 섹션 ===== */
.container {
    text-align: center;
    padding: 2.5rem 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #aaa;
    margin-bottom: 2rem;
    font-size: 1rem;
}

body.light .subtitle {
    color: #666;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.number {
    background-color: #1e1e1e;
    border: 2px solid #333;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: bold;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
}

body.light .number {
    background-color: #ffffff;
    border-color: #ddd;
    color: #1a1a1a;
}

#generate-btn {
    background-color: #4CAF50;
    color: white;
    padding: 0.9rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#generate-btn:hover {
    background-color: #45a049;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.number.pop {
    transform: scale(1.15);
    background-color: #FFC107;
    color: #121212;
    border-color: #FFC107;
}

/* ===== 정보 섹션 ===== */
.info-section,
.faq-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

body.light .info-section,
body.light .faq-section {
    border-top-color: #ddd;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.info-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: background-color 0.3s;
}

body.light .info-card {
    background-color: #ffffff;
    border-color: #ddd;
}

.info-card h3 {
    font-size: 1.05rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prize-table th,
.prize-table td {
    padding: 0.4rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

body.light .prize-table th,
body.light .prize-table td {
    border-bottom-color: #eee;
}

.prize-table th {
    color: #4CAF50;
    font-weight: 600;
}

.tip-list {
    padding-left: 1.2rem;
    margin: 0;
    font-size: 0.9rem;
}

.tip-list li {
    margin-bottom: 0.4rem;
}

/* ===== FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.faq-item {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

body.light .faq-item {
    background-color: #ffffff;
    border-color: #ddd;
}

.faq-item summary {
    font-weight: 600;
    font-size: 0.95rem;
    outline: none;
}

.faq-item p {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #bbb;
    line-height: 1.6;
}

body.light .faq-item p {
    color: #555;
}

/* ===== 제휴 문의 ===== */
.contact-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    max-width: 500px;
}

body.light .contact-section {
    border-top-color: #ddd;
}

.section-desc {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

body.light .section-desc {
    color: #666;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#contact-form input,
#contact-form textarea {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #333;
    background-color: #1e1e1e;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body.light #contact-form input,
body.light #contact-form textarea {
    background-color: #ffffff;
    color: #1a1a1a;
    border-color: #ddd;
}

#contact-form button[type="submit"] {
    padding: 0.75rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contact-form button[type="submit"]:hover {
    background-color: #45a049;
}

#form-success {
    margin-top: 1rem;
    color: #4CAF50;
    font-size: 1rem;
}

/* ===== Disqus ===== */
.disqus-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    width: 100%;
}

body.light .disqus-section {
    border-top-color: #ddd;
}

/* ===== 개별 페이지 콘텐츠 ===== */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.last-updated {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

body.light .last-updated {
    color: #888;
}

.page-content section {
    margin-bottom: 2rem;
}

.page-content h2 {
    font-size: 1.2rem;
    border-left: 3px solid #4CAF50;
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
}

.page-content ul {
    padding-left: 1.25rem;
}

.page-content li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

/* ===== 푸터 ===== */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: #aaa;
    margin-top: auto;
    transition: border-color 0.3s;
}

body.light .site-footer {
    border-top-color: #ddd;
    color: #888;
}

.site-footer a {
    color: #aaa;
}

body.light .site-footer a {
    color: #888;
}

.disclaimer {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ===== 반응형 ===== */
@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .number { width: 50px; height: 50px; font-size: 1.3rem; }
    .navbar { flex-wrap: wrap; gap: 0.75rem; }
    .nav-links { gap: 1rem; }
}
