:root {
    --bg-color: #f0f0f0;
    --container-bg: white;
    --text-color: #333;
    --number-bg: #eee;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --btn-color: #4CAF50;
    --btn-hover: #45a049;
}

[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --container-bg: #16213e;
    --text-color: #eaeaea;
    --number-bg: #0f3460;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --btn-color: #4CAF50;
    --btn-hover: #45a049;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
    margin: 0;
    padding-top: 60px;
}

/* 상단 네비게이션 (fortune/lotto/about/privacy 페이지용) */
.site-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .site-top-nav {
    background: rgba(22, 33, 62, 0.95);
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
}

.nav-logo {
    color: #eaeaea;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 0.3rem;
}

.nav-links a {
    color: rgba(234, 234, 234, 0.7);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #eaeaea;
    background: rgba(234, 234, 234, 0.1);
}

.nav-links a.active {
    color: #333;
    background: #eaeaea;
    font-weight: 600;
}

[data-theme="dark"] .nav-links a.active {
    color: #16213e;
    background: #eaeaea;
}

/* 페이지 래퍼 */
.page-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
}

/* 콘텐츠 섹션 */
.content-section {
    text-align: left;
    margin-top: 1rem;
    max-width: 500px;
}

.content-section h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    padding-left: 0.8rem;
    border-bottom: 2px solid var(--number-bg);
    border-left: 4px solid var(--btn-color);
    letter-spacing: -0.02em;
}

.content-section h3 {
    color: var(--text-color);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.8rem;
    background: var(--number-bg);
    border-radius: 8px;
}

.content-section h4 {
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content-section p {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 2.1;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    word-spacing: 0.05em;
}

.content-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-section li {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 2.1;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

/* 정보 그리드 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-card {
    background: var(--number-bg);
    border-radius: 12px;
    padding: 1.4rem;
    transition: background-color 0.3s ease;
    border-left: 3px solid var(--btn-color);
}

.info-card h4 {
    color: var(--text-color);
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.info-card p {
    font-size: 0.9rem;
    line-height: 1.9;
    margin-bottom: 0;
    letter-spacing: 0.01em;
}

.info-list {
    padding-left: 1.5rem;
}

.info-list li {
    margin-bottom: 0.5rem;
}

.disclaimer-text {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--number-bg);
}

/* 최신성 표시 */
.update-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--btn-color);
    background: var(--number-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* FAQ 섹션 */
.faq-section {
    margin-top: 1.5rem;
}

.faq-item {
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--number-bg);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0;
}

.faq-item p {
    color: var(--text-color);
    opacity: 0.85;
    margin-top: 0.6rem;
    margin-bottom: 0;
    line-height: 2;
    font-size: 0.95rem;
}

/* 정책 페이지 */
.policy-container {
    text-align: left;
    max-width: 700px;
    width: 100%;
}

.policy-container h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.policy-date {
    text-align: center;
    opacity: 0.6;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.policy-container h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.policy-container h3 {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.policy-container p {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    font-size: 0.93rem;
}

.policy-container ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-container li {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 0.3rem;
    font-size: 0.93rem;
}

.policy-container a {
    color: var(--btn-color);
    text-decoration: underline;
}

/* 소개 페이지 */
.about-container {
    text-align: left;
    max-width: 700px;
    width: 100%;
}

.about-container h1 {
    text-align: center;
    margin-bottom: 0.3rem;
}

.about-tagline {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.about-section {
    margin-bottom: 2rem;
}

.about-section h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--number-bg);
}

.about-section h3 {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.about-section p {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.service-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--btn-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.service-link:hover {
    text-decoration: underline;
}

.policy-list {
    padding-left: 1.5rem;
}

.policy-list li {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* 사이트 푸터 */
.site-footer {
    width: 100%;
    margin-top: 2rem;
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid var(--number-bg);
}

.footer-inner {
    max-width: 700px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copy {
    color: var(--text-color);
    opacity: 0.5;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.footer-disclaimer {
    color: var(--text-color);
    opacity: 0.4;
    font-size: 0.75rem;
}

.container {
    text-align: center;
    padding: 2rem;
    background-color: var(--container-bg);
    border-radius: 10px;
    box-shadow: 0 0 20px var(--shadow-color);
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: var(--number-bg);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.icon-sun,
.icon-moon {
    position: absolute;
    transition: opacity 0.3s ease;
}

.icon-sun {
    opacity: 1;
    color: #f39c12;
}

.icon-moon {
    opacity: 0;
    color: #f1c40f;
}

[data-theme="dark"] .icon-sun {
    opacity: 0;
}

[data-theme="dark"] .icon-moon {
    opacity: 1;
}

h1 {
    color: var(--text-color);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

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

.lotto-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: var(--number-bg);
    margin: 0 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#generator-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    background-color: var(--btn-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* Money Rain Animation */
.money-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.money {
    position: absolute;
    top: -100px;
    font-size: 2rem;
    animation: fall linear forwards;
    opacity: 0;
}

.money.active {
    opacity: 1;
}

.money img {
    width: 50px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.7;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.container.celebrate {
    animation: shake 0.5s ease-in-out;
}

/* Contact Form */
.contact-form {
    margin-top: 2rem;
    max-width: 400px;
}

.contact-form h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.form-subtitle {
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
}

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

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

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

.submit-btn {
    width: 100%;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    background-color: var(--btn-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}
