/* ── 테마 변수 ── */
:root {
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.15);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --title-color: #fff;
    --subtitle-color: #ccc;
    --btn-bg: #fff;
    --btn-color: #333;
    --btn-hover-shadow: rgba(255, 255, 255, 0.4);
    --toggle-bg: rgba(255, 255, 255, 0.12);
    --toggle-border: rgba(255, 255, 255, 0.3);
    --toggle-color: #fff;
    --navbar-bg: rgba(0, 0, 0, 0.3);
    --footer-bg: rgba(0, 0, 0, 0.3);
    --link-color: #a29bfe;
}

body.light-mode {
    --bg-gradient: linear-gradient(135deg, #e0e7ff, #f0f4ff, #dde8ff);
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(100, 100, 200, 0.18);
    --card-shadow: rgba(0, 0, 0, 0.1);
    --title-color: #1e1b4b;
    --subtitle-color: #4338ca;
    --btn-bg: #4f46e5;
    --btn-color: #fff;
    --btn-hover-shadow: rgba(79, 70, 229, 0.4);
    --toggle-bg: rgba(255, 255, 255, 0.7);
    --toggle-border: rgba(100, 100, 200, 0.3);
    --toggle-color: #4f46e5;
    --navbar-bg: rgba(255, 255, 255, 0.6);
    --footer-bg: rgba(255, 255, 255, 0.5);
    --link-color: #4f46e5;
}

/* ── 기본 ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Gowun Dodum', sans-serif;
    min-height: 100vh;
    background: var(--bg-gradient);
    background-attachment: fixed;
    transition: background 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

a { color: var(--link-color); }

/* ── 네비게이션 ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--navbar-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
    transition: background 0.4s ease;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--title-color);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-menu a {
    color: var(--subtitle-color);
    text-decoration: none;
    font-size: 0.97rem;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--title-color);
}

/* ── 테마 토글 ── */
#theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-bg);
    color: var(--toggle-color);
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(20deg);
}

/* ── 페이지 래퍼 ── */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 720px;
    padding: 40px 20px 60px;
    gap: 32px;
}

/* ── 히어로 섹션 ── */
.hero-section {
    text-align: center;
    padding: 20px 0 0;
}

.hero-section h1 {
    font-size: 2.8rem;
    color: var(--title-color);
    margin-bottom: 10px;
    transition: color 0.4s;
}

.hero-section p {
    font-size: 1.1rem;
    color: var(--subtitle-color);
    transition: color 0.4s;
}

/* ── 메인 카드 ── */
.container {
    background-color: var(--card-bg);
    padding: 36px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px var(--card-shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    width: 100%;
    transition: background-color 0.4s ease;
}

.section-label {
    font-size: 0.85rem;
    color: var(--subtitle-color);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.container h2 {
    font-size: 1.6rem;
    color: var(--title-color);
    margin-bottom: 8px;
    transition: color 0.4s;
}

.container .sub {
    font-size: 0.95rem;
    color: var(--subtitle-color);
    margin-bottom: 28px;
    transition: color 0.4s;
}

/* ── 번호 공 ── */
.numbers-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    min-height: 70px;
}

.number {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ── 생성 버튼 ── */
#generate-btn {
    padding: 14px 32px;
    font-size: 1.3rem;
    font-family: 'Gowun Dodum', sans-serif;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    background-color: var(--btn-bg);
    color: var(--btn-color);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--btn-hover-shadow);
}

#generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── 콘텐츠 섹션 ── */
.content-section {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px 36px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px var(--card-shadow);
    transition: background-color 0.4s ease;
}

.content-section h2 {
    font-size: 1.4rem;
    color: var(--title-color);
    margin-bottom: 14px;
    transition: color 0.4s;
}

.content-section p {
    font-size: 0.97rem;
    color: var(--subtitle-color);
    line-height: 1.8;
    transition: color 0.4s;
}

/* 정보 그리드 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.info-card {
    background: var(--toggle-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}

.info-card .info-icon { font-size: 1.8rem; margin-bottom: 8px; }
.info-card h3 { font-size: 0.9rem; color: var(--title-color); margin-bottom: 4px; }
.info-card p { font-size: 0.85rem; color: var(--subtitle-color); }

/* 행운 번호 의미 */
.meaning-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.meaning-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.meaning-num {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--btn-bg);
    min-width: 44px;
    text-align: center;
    background: var(--toggle-bg);
    border-radius: 10px;
    padding: 6px;
    border: 1px solid var(--card-border);
}

.meaning-item strong {
    display: block;
    color: var(--title-color);
    margin-bottom: 4px;
    font-size: 1rem;
}

.meaning-item p {
    font-size: 0.9rem;
}

/* 팁 리스트 */
.tips-list {
    list-style: none;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tips-list li {
    display: flex;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--subtitle-color);
    line-height: 1.6;
}

/* ── Disqus ── */
.disqus-wrapper {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 15px 35px var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: background-color 0.4s ease;
}

.disqus-title {
    font-size: 1.2rem;
    color: var(--title-color);
    margin-bottom: 20px;
}

/* ── 푸터 ── */
.footer {
    width: 100%;
    margin-top: auto;
    background: var(--footer-bg);
    border-top: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    padding: 28px 20px;
    transition: background 0.4s ease;
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--title-color);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav a {
    color: var(--subtitle-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-nav a:hover { color: var(--title-color); }

.footer-copy {
    font-size: 0.85rem;
    color: var(--subtitle-color);
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: var(--subtitle-color);
    opacity: 0.7;
}

/* ── contact.html 전용 ── */
.contact-link {
    display: none;
}

/* ── 애니메이션 ── */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── 반응형 ── */
@media (max-width: 600px) {
    .navbar { padding: 12px 16px; }
    .nav-menu { gap: 16px; }
    .hero-section h1 { font-size: 2rem; }
    .container { padding: 28px 20px; }
    .content-section { padding: 24px 20px; }
    .info-grid { grid-template-columns: 1fr 1fr; }
}
