* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #fff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

a { color: #fff; }
a:hover { opacity: 0.85; }

code {
    background: rgba(0, 0, 0, 0.25);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.95em;
}

/* Header / Nav */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
}
.brand {
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    color: #fff;
}
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.site-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.85;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
    opacity: 1;
    text-decoration: underline;
}

/* Main / Page */
.page {
    flex: 1;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Hero (lotto generator) */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 32px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.hero h1 {
    margin: 0 0 12px;
    font-size: 2.2rem;
}
.hero .lead {
    margin: 0 0 24px;
    max-width: 560px;
    opacity: 0.95;
}

#numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    min-height: 60px;
}
.ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.ball-1  { background: #fbc400; }
.ball-2  { background: #69c8f2; }
.ball-3  { background: #ff7272; }
.ball-4  { background: #aaa; }
.ball-5  { background: #b0d840; }

button {
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    background: #fff;
    color: #764ba2;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}
button:hover { transform: translateY(-2px); }
button:active { transform: translateY(0); }

.hero .hint {
    margin: 14px 0 0;
    font-size: 0.85rem;
    opacity: 0.8;
}
.hero .updated {
    margin: 8px 0 0;
    font-size: 0.8rem;
    opacity: 0.75;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Content sections */
.content-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.content-section h1 {
    margin-top: 0;
    font-size: 1.9rem;
}
.content-section h2 {
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 6px;
}
.content-section h2:first-of-type { margin-top: 0; }
.content-section ul,
.content-section ol { padding-left: 22px; }
.content-section li { margin-bottom: 4px; }
.content-section .meta {
    margin-top: -6px;
    font-size: 0.9rem;
    opacity: 0.75;
}
.content-section .note {
    margin-top: 8px;
    font-size: 0.9rem;
    opacity: 0.85;
}
.content-section.disclaimer {
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.article a { color: #ffe57a; }

details {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
details summary {
    cursor: pointer;
    font-weight: 600;
}
details[open] summary { margin-bottom: 8px; }

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.95rem;
}
.info-table th,
.info-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.info-table th { background: rgba(0, 0, 0, 0.2); }

/* Contact form */
.contact-form {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}
.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #333;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.contact-form textarea { resize: vertical; }
.contact-form button { align-self: stretch; }

.form-status {
    margin: 4px 0 0;
    font-size: 0.95rem;
    text-align: center;
}
.form-status.success { color: #d4ffd4; }
.form-status.error { color: #ffd4d4; }

/* Footer */
.site-footer {
    background: rgba(0, 0, 0, 0.25);
    padding: 20px 24px;
    text-align: center;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 8px;
}
.footer-nav a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    font-size: 0.9rem;
}
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.copyright {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 18px;
    }
    .site-nav { gap: 10px; }
    .hero h1 { font-size: 1.8rem; }
    .ball {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }
    .content-section { padding: 18px 18px; }
}
