/**
 * 오늘의 운세 - 스타일
 * Getin.kr
 */

/* 컨테이너 */
.fortune-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 1rem;
}

/* 2컬럼 레이아웃 (입력 폼 + 사이드바) */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .form-layout {
        grid-template-columns: 1fr;
    }
    .form-sidebar {
        order: -1;
    }
}

.form-main {
    min-width: 0;
}

/* 사이드바 */
.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}

@media (max-width: 768px) {
    .form-sidebar {
        position: static;
    }
}

.sidebar-card {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.dark .sidebar-card {
    background: linear-gradient(135deg, #422006, #78350f);
    border-color: rgba(245, 158, 11, 0.25);
}

.sidebar-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.75rem;
    text-align: center;
}

.dark .sidebar-title {
    color: #fde68a;
}

.sidebar-card p {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.dark .sidebar-card p {
    color: #fef3c7;
}

.sidebar-donate-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fee500;
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.sidebar-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
}

.sidebar-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.5rem;
}

.sidebar-items li {
    font-size: 0.8rem;
    color: #4b5563;
    padding: 0.2rem 0;
}

.dark .sidebar-items li {
    color: #fcd34d;
}

/* 후원 사이드바 강조 */
.donation-sidebar {
    background: linear-gradient(135deg, #fef3ff, #fae8ff);
    border-color: rgba(168, 85, 247, 0.25);
}

.dark .donation-sidebar {
    background: linear-gradient(135deg, #2d1a4a, #1a0f2e);
}

.donation-sidebar .sidebar-title {
    color: #7c3aed;
}

.dark .donation-sidebar .sidebar-title {
    color: #c4b5fd;
}

/* 헤더 */
.fortune-header {
    text-align: center;
    margin-bottom: 2rem;
}

.fortune-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.fortune-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.dark .fortune-title {
    color: #f3f4f6;
}

.fortune-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

.dark .fortune-subtitle {
    color: #9ca3af;
}

/* 카드 */
.fortune-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .fortune-card {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 폼 */
.form-section {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.dark .form-label {
    color: #e5e7eb;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #1f2937;
    background: white;
    cursor: pointer;
}

.dark .form-select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.calendar-type {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #4b5563;
    font-size: 0.9rem;
}

.dark .radio-label {
    color: #9ca3af;
}

/* 성별 버튼 */
.gender-buttons {
    display: flex;
    gap: 1rem;
}

.gender-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: #4b5563;
}

.dark .gender-btn {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

.gender-btn:hover {
    border-color: #f59e0b;
}

.gender-btn.active {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #d97706;
}

.dark .gender-btn.active {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.gender-icon {
    font-size: 1.25rem;
}

/* 분석 버튼 */
.analyze-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 로딩 */
.loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 사용자 정보 카드 */
.user-info-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.dark .user-info-card {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.zodiac-emoji {
    font-size: 2.5rem;
}

.user-zodiac {
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
}

.dark .user-zodiac {
    color: #fde68a;
}

.user-birth {
    font-size: 0.9rem;
    color: #a16207;
}

.dark .user-birth {
    color: #fcd34d;
}

/* 운세 탭 */
.fortune-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    padding: 0.625rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dark .tab-btn {
    background: #374151;
    color: #9ca3af;
}

.tab-btn:hover {
    background: #e5e7eb;
}

.dark .tab-btn:hover {
    background: #4b5563;
}

.tab-btn.active {
    background: #f59e0b;
    color: white;
}

/* 탭 콘텐츠 */
.tab-content {
    min-height: 200px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    color: #6b7280;
}

.dark .loading-state {
    color: #9ca3af;
}

.loading-state .loading-spinner {
    width: 2rem;
    height: 2rem;
    border-color: rgba(245, 158, 11, 0.2);
    border-top-color: #f59e0b;
}

/* 날짜 라벨 */
.fortune-date {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .fortune-date {
    color: #9ca3af;
    border-bottom-color: #374151;
}

/* 운세 요약 */
.fortune-summary {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.dark .fortune-summary {
    color: #f3f4f6;
}

/* 섹션 */
.fortune-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fortune-section {
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 0.75rem;
    padding: 1rem;
}

.dark .fortune-section {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-emoji {
    font-size: 1.25rem;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #92400e;
    margin: 0;
}

.dark .section-title {
    color: #fbbf24;
}

.section-content {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
}

.dark .section-content {
    color: #d1d5db;
}

/* 조언 박스 */
.advice-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.dark .advice-box {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

.advice-title {
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.5rem;
}

.dark .advice-title {
    color: #86efac;
}

.advice-content {
    font-size: 0.9rem;
    color: #15803d;
    line-height: 1.6;
}

.dark .advice-content {
    color: #bbf7d0;
}

/* 행운 요소 */
.lucky-elements {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.dark .lucky-elements {
    background: #111827;
}

.lucky-item {
    text-align: center;
}

.lucky-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.dark .lucky-label {
    color: #9ca3af;
}

.lucky-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f59e0b;
}

/* 로드 버튼 */
.load-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.load-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.reset-btn, .share-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.dark .reset-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.share-btn {
    background: #3b82f6;
    border: none;
    color: white;
}

.share-btn:hover {
    background: #2563eb;
}

/* 다른 도구 링크 */
.other-tools {
    text-align: center;
}

.other-title {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.dark .other-title {
    color: #9ca3af;
}

.other-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.other-link {
    padding: 0.625rem 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.dark .other-link {
    background: #374151;
    color: #d1d5db;
}

.other-link:hover {
    background: #e5e7eb;
}

.dark .other-link:hover {
    background: #4b5563;
}

/* 에러 메시지 */
.error-message {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* 반응형 */
@media (max-width: 480px) {
    .fortune-tabs {
        gap: 0.375rem;
    }

    .tab-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.8rem;
    }

    .lucky-elements {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .lucky-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

/* 후원 카드 */
.donation-card {
    text-align: center;
}

.donation-title {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 0.75rem;
}

.dark .donation-title {
    color: #e2e8f0;
}

.donation-content p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.dark .donation-content p {
    color: #9ca3af;
}

.donation-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #fee500;
    color: #000;
    font-weight: bold;
    border-radius: 0.5rem;
    text-decoration: none;
    margin: 1rem 0;
    transition: transform 0.2s;
}

.donation-btn:hover {
    transform: translateY(-2px);
}

.donation-note {
    font-size: 0.8rem !important;
    color: #9ca3af !important;
}

.dark .donation-note {
    color: #6b7280 !important;
}

/* PDF 버튼 */
.pdf-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.pdf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* PDF 전용 스타일 - 통일된 디자인 */
.pdf-content {
    background: #ffffff;
    color: #1f2937;
    padding: 2rem;
    font-family: 'Pretendard', sans-serif;
    max-width: 600px;
}

.pdf-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #8b5cf6;
}

.pdf-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.pdf-info {
    color: #6b7280;
    font-size: 0.9rem;
}

.pdf-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-section:last-of-type {
    border-bottom: none;
}

.pdf-section-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.75rem;
}

.pdf-date {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.pdf-summary {
    background: #fef3c7;
    color: #92400e;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.pdf-subsections {
    margin: 0.75rem 0;
}

.pdf-subsection {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 3px solid #8b5cf6;
}

.pdf-subsection-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4c1d95;
    margin-bottom: 0.5rem;
}

.pdf-subsection-content {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #4b5563;
}

.pdf-advice {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #92400e;
}

.pdf-lucky {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.pdf-lucky strong {
    color: #7c3aed;
}

.pdf-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.pdf-box {
    flex: 1;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.pdf-box-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.pdf-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdf-box li {
    font-size: 0.8rem;
    color: #6b7280;
    padding: 0.15rem 0;
}

.pdf-footer {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
