/* 수목선생 AI 사주 — 전용 스타일
   기존 main.css + color.css의 디자인 언어를 그대로 사용 */

/* ── CSS 변수 (color.css와 동일) ─────────────────────────────── */
:root {
    --primary-color:   #87A96B;
    --secondary-color: #F5E6D3;
    --accent-color:    #8B7D6B;
    --bg-primary:      #2a1f1a;
    --bg-secondary:    #1a1512;
    --bg-card:         rgba(255, 255, 255, 0.95);
    --text-primary:    #4a4a4a;
    --text-secondary:  #666;
    --btn-hover:       #7A6D5A;
    --gradient-accent: linear-gradient(135deg, #8B7D6B 0%, #7A6D5A 100%);
    --shadow-light:    0 4px 12px rgba(0, 0, 0, 0.10);
    --shadow-medium:   0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-heavy:    0 12px 40px rgba(0, 0, 0, 0.20);
    --border-light:    rgba(139, 125, 107, 0.10);
    --border-medium:   rgba(139, 125, 107, 0.20);
}

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

body {
    font-family: 'Noto Serif KR', serif;
    background:
        linear-gradient(315deg, rgba(42,31,26,0.45) 0%, rgba(26,21,18,0.45) 100%),
        url('/static/img/library-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.05) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none; z-index: -1;
}

/* ── 배경음악 버튼 ─────────────────────────────────────────────── */
.music-control { position: fixed; top: 20px; right: 20px; z-index: 1000; }
.music-btn {
    width: 50px; height: 50px; border-radius: 50%;
    border: 2px solid var(--accent-color);
    background: rgba(255,255,255,0.9);
    color: var(--accent-color); font-size: 18px;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}
.music-btn:hover { background: var(--accent-color); color: white; transform: scale(1.1); }

/* ── 네비게이션 (main.html 동일) ──────────────────────────────── */
.main-nav {
    background: var(--gradient-accent);
    padding: 1rem 0;
    box-shadow: var(--shadow-medium);
    position: sticky; top: 0; z-index: 100;
}
.nav-container {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2rem;
}
.logo { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.logo-image { width: 60px; height: 60px; object-fit: contain; }
.logo-text h1 { color: white; font-size: 1.8rem; font-weight: 600; margin-bottom: 0.2rem; }
.logo-text p  { color: #d4c4b0; font-size: 0.9rem; }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-menu a {
    color: #f8f6f2; text-decoration: none; font-weight: 500;
    padding: 0.5rem 1rem; border-radius: 20px; transition: all 0.3s ease;
}
.nav-menu a:hover, .nav-menu a.active { background: rgba(255,255,255,0.2); color: white; }

/* ── 페이지 공통 래퍼 ─────────────────────────────────────────── */
.page-wrap {
    max-width: 960px; margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

/* ── 카드 (글라스모피즘, main.css 동일) ───────────────────────── */
.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(248,246,242,0.82) 100%);
    border-radius: 24px;
    padding: 2.8rem;
    box-shadow:
        0 15px 45px rgba(0,0,0,0.18),
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.06);
    border: 1.5px solid var(--border-medium);
    backdrop-filter: blur(14px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.22);
}

/* ── 랜딩 페이지 ─────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 2rem 2.5rem;
}
.hero-badge {
    display: inline-block;
    background: rgba(135,169,107,0.18);
    color: #4a7a3a; border: 1px solid rgba(135,169,107,0.35);
    border-radius: 50px; padding: 0.4rem 1.2rem;
    font-size: 0.88rem; font-weight: 600; margin-bottom: 1.4rem;
    letter-spacing: 0.06em;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 16px rgba(0,0,0,0.5);
    line-height: 1.3;
}
.hero p {
    font-size: 1.15rem; color: #e8e0d5;
    max-width: 540px; margin: 0 auto 2.5rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
    line-height: 1.8;
}

/* 플랜 카드 두 개 */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
.plan-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,246,242,0.86) 100%);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 2px solid var(--border-medium);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(14px);
    transition: all 0.35s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.plan-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    border-radius: 24px; pointer-events: none;
}
.plan-card:hover {
    transform: perspective(600px) rotateY(0deg) translateY(-10px) scale(1.03);
    box-shadow: 0 20px 55px rgba(0,0,0,0.25);
}
.plan-card.featured { border-color: #87A96B; }
.plan-badge {
    display: inline-block;
    background: #87A96B; color: white;
    border-radius: 50px; padding: 0.25rem 0.9rem;
    font-size: 0.78rem; font-weight: 700;
    margin-bottom: 1rem; letter-spacing: 0.05em;
}
.plan-icon { font-size: 2.8rem; margin-bottom: 0.8rem; }
.plan-title { font-size: 1.35rem; font-weight: 700; color: #3a3a3a; margin-bottom: 0.5rem; }
.plan-price {
    font-size: 1.6rem; font-weight: 800;
    color: var(--accent-color); margin-bottom: 1.2rem;
}
.plan-price span { font-size: 0.9rem; font-weight: 400; color: #888; }
.plan-features { list-style: none; margin-bottom: 1.8rem; text-align: left; }
.plan-features li {
    padding: 0.4rem 0; font-size: 0.92rem; color: #555;
    display: flex; align-items: center; gap: 0.6rem;
}
.plan-features li::before { content: '✓'; color: #87A96B; font-weight: 700; }
.plan-btn {
    width: 100%; padding: 0.9rem;
    border: none; border-radius: 50px;
    font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
}
.plan-btn.free  { background: var(--gradient-accent); color: white; }
.plan-btn.paid  { background: linear-gradient(135deg, #87A96B, #5a8a4a); color: white; }
.plan-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* 서비스 소개 (하단) */
.info-strip {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
    margin-top: 1rem;
}
.info-item {
    background: rgba(255,255,255,0.12);
    border-radius: 16px; padding: 1.5rem;
    text-align: center; border: 1px solid rgba(255,255,255,0.2);
}
.info-item i   { font-size: 1.8rem; color: #d4c4b0; margin-bottom: 0.7rem; display: block; }
.info-item h4  { color: white; font-size: 0.95rem; margin-bottom: 0.4rem; }
.info-item p   { color: #c8b8a8; font-size: 0.82rem; }

/* ── 입력 폼 ─────────────────────────────────────────────────── */
.form-header { text-align: center; margin-bottom: 2.5rem; }
.form-header .plan-tag {
    display: inline-block;
    padding: 0.3rem 1rem; border-radius: 50px;
    font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem;
}
.plan-tag.free { background: rgba(139,125,107,0.15); color: var(--accent-color); border: 1px solid var(--border-medium); }
.plan-tag.paid { background: rgba(135,169,107,0.15); color: #4a7a3a; border: 1px solid rgba(135,169,107,0.3); }
.form-header h2 { font-size: 1.7rem; color: #3a3a3a; margin-bottom: 0.5rem; }
.form-header p  { color: var(--text-secondary); font-size: 0.95rem; }

.form-group { margin-bottom: 1.6rem; }
.form-group label {
    display: block; font-size: 0.9rem; font-weight: 700;
    color: var(--accent-color); margin-bottom: 0.5rem; letter-spacing: 0.03em;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%; padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--border-medium);
    border-radius: 12px; font-size: 1rem;
    font-family: 'Noto Serif KR', serif;
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(139,125,107,0.12);
}
.date-row { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr; gap: 0.8rem; }

/* 라디오/토글 버튼 */
.radio-group { display: flex; gap: 0.8rem; }
.radio-btn {
    flex: 1; padding: 0.75rem;
    border: 1.5px solid var(--border-medium);
    border-radius: 12px; text-align: center;
    cursor: pointer; transition: all 0.25s;
    font-size: 0.95rem; color: var(--text-secondary);
    background: rgba(255,255,255,0.85);
    user-select: none;
}
.radio-btn input { display: none; }
.radio-btn.selected,
.radio-btn:has(input:checked) {
    border-color: var(--accent-color);
    background: rgba(139,125,107,0.1);
    color: var(--accent-color); font-weight: 700;
}

.hint { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.4rem; }

.submit-btn {
    width: 100%; padding: 1.1rem;
    background: var(--gradient-accent);
    color: white; border: none; border-radius: 50px;
    font-size: 1.1rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
    margin-top: 0.5rem;
    box-shadow: 0 6px 20px rgba(139,125,107,0.3);
}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(139,125,107,0.4); }
.submit-btn:active { transform: translateY(-1px); }

/* ── 대기 페이지 ─────────────────────────────────────────────── */
.waiting-wrap {
    max-width: 560px; margin: 5rem auto;
    padding: 0 2rem; text-align: center;
}
.waiting-wrap .glass-card { padding: 3.5rem 2.5rem; }

.spinner-ring {
    width: 90px; height: 90px; margin: 0 auto 2.5rem;
    border-radius: 50%;
    border: 6px solid rgba(139,125,107,0.15);
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.waiting-title { font-size: 1.5rem; color: #3a3a3a; font-weight: 700; margin-bottom: 0.7rem; }
.waiting-sub   { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 2rem; }
.waiting-msg {
    background: rgba(139,125,107,0.08);
    border-radius: 12px; padding: 1rem 1.4rem;
    color: var(--accent-color); font-size: 0.92rem;
    min-height: 2.8rem; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-light);
    transition: opacity 0.4s ease;
}
.dots::after {
    content: '';
    animation: dots 1.5s steps(3, end) infinite;
}
@keyframes dots {
    0%   { content: ''; }
    33%  { content: '.'; }
    66%  { content: '..'; }
    100% { content: '...'; }
}
.progress-bar-wrap {
    background: rgba(139,125,107,0.12);
    border-radius: 50px; height: 6px; margin-top: 2rem; overflow: hidden;
}
.progress-bar {
    height: 100%; background: var(--gradient-accent);
    border-radius: 50px;
    animation: progress 60s linear forwards;
    width: 0%;
}
@keyframes progress { to { width: 92%; } }

/* ── 결과 페이지 ─────────────────────────────────────────────── */
.result-wrap {
    max-width: 600px; margin: 4rem auto;
    padding: 0 2rem; text-align: center;
}
.result-wrap .glass-card { padding: 3.5rem 2.5rem; }

.result-icon { font-size: 4rem; margin-bottom: 1.2rem; }
.result-title { font-size: 1.8rem; color: #3a3a3a; font-weight: 700; margin-bottom: 0.6rem; }
.result-name  { font-size: 1.1rem; color: var(--accent-color); margin-bottom: 0.5rem; font-weight: 600; }
.result-desc  { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.8; }

.download-btn {
    display: inline-flex; align-items: center; gap: 0.7rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #87A96B, #5a8a4a);
    color: white; border: none; border-radius: 50px;
    font-size: 1.05rem; font-weight: 700;
    cursor: pointer; text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
    box-shadow: 0 6px 20px rgba(135,169,107,0.35);
    margin-bottom: 1rem;
}
.download-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(135,169,107,0.45); color: white; }

.payment-box {
    background: rgba(135,169,107,0.08);
    border: 1.5px solid rgba(135,169,107,0.25);
    border-radius: 16px; padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.payment-box p { color: #4a7a3a; font-size: 0.92rem; line-height: 1.7; }
.pay-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: #FEE500; color: #3a1d1d;
    border: none; border-radius: 50px;
    font-size: 1rem; font-weight: 800;
    cursor: pointer; transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
    margin-top: 0.8rem;
    box-shadow: 0 4px 14px rgba(254,229,0,0.4);
}
.pay-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(254,229,0,0.5); }

.back-link {
    display: inline-block; margin-top: 1.5rem;
    color: var(--text-secondary); font-size: 0.88rem;
    text-decoration: none; transition: color 0.2s;
}
.back-link:hover { color: var(--accent-color); }

/* ── 푸터 (main.css 동일) ─────────────────────────────────────── */
.main-footer {
    background: linear-gradient(135deg, #5d4e47 0%, #6b5d56 100%);
    color: #f8f6f2; padding: 3rem 0 1rem; margin-top: 4rem;
}
.footer-content {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; padding: 0 2rem;
}
.footer-section h4 { color: #d4c4b0; margin-bottom: 1rem; }
.footer-section p  { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-logo { display: flex; align-items: center; gap: 1rem; }
.footer-logo-image { width: 50px; height: 50px; object-fit: contain; }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: #d4c4b0; font-size: 1.5rem; transition: color 0.3s; }
.social-links a:hover { color: #f8f6f2; }
.footer-bottom {
    text-align: center; margin-top: 2rem; padding-top: 2rem;
    border-top: 1px solid rgba(212,196,176,0.3);
}
.footer-bottom p { color: #d4c4b0; font-size: 0.8rem; }

/* ── 반응형 ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-container  { flex-direction: column; gap: 1rem; padding: 0 1rem; }
    .logo-text h1   { font-size: 1.4rem; }
    .nav-menu       { flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
    .plan-grid      { grid-template-columns: 1fr; }
    .date-row       { grid-template-columns: 1fr 1fr; }
    .date-row > :first-child { grid-column: 1 / -1; }
    .info-strip     { grid-template-columns: 1fr; }
    .page-wrap      { padding: 2rem 1rem 4rem; }
    .glass-card     { padding: 2rem 1.4rem; }
}

/* ── 애니메이션 ──────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.plan-card, .glass-card, .info-item {
    animation: fadeUp 0.65s ease-out both;
}
.plan-card:nth-child(2) { animation-delay: 0.1s; }
