/* 토정비결 고도화 스타일 */

/* CSS 변수 정의 */
:root {
    --primary-purple: #8b5cf6;
    --primary-purple-dark: #4c1d95;
    --primary-purple-light: #a78bfa;
    --lucky-green: #10b981;
    --caution-orange: #f59e0b;
    --bg-gradient-start: #ffffff;
    --bg-gradient-end: #f3f0ff;
    --border-light: #e9d5ff;
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-tertiary: #6b7280;
    --text-muted: #4b5563;
}

.yearly-summary-card {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    border: 2px solid var(--border-light);
    padding: 2.5rem;
    border-radius: 24px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.card-header-area {
    text-align: center;
    margin-bottom: 2rem;
}

.year-badge {
    background: var(--primary-purple);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.gwae-visual {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 2rem;
}

.gwae-symbol {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.trigram {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.trigram:last-child {
    border-bottom: none;
}

.trigram-name {
    font-weight: 700;
    color: var(--primary-purple-dark);
    font-size: 1.1rem;
}

.trigram-desc {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.total-score-circle {
    width: 150px;
    height: 150px;
    position: relative;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke: var(--primary-purple);
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
    100% {
        stroke-dasharray: var(--progress-value, 75) 100;
    }
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-text .score-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-purple-dark);
}

.yearly-desc {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    margin-top: 2rem;
    border: 1px solid #e5e7eb;
}

/* 월별 카드 스타일 개선 */
.month-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.month-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.month-card.lucky {
    border-left-color: var(--lucky-green); /* 길운: 초록 */
    background: linear-gradient(to right, #ecfdf5, #fff);
}

.month-card.caution {
    border-left-color: var(--caution-orange); /* 주의: 주황 */
    background: linear-gradient(to right, #fffbeb, #fff);
}

.month-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.month-number {
    background: var(--primary-purple);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.month-theme {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-left: 1rem;
}

.fortune-content {
    margin: 1.5rem 0;
}

.fortune-poem {
    font-family: 'Noto Serif KR', 'Times New Roman', Georgia, serif;
    font-style: italic;
    color: var(--text-muted);
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.fortune-interpretation {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* 점수 바 스타일 */
.score-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-item .score-label {
    min-width: 80px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.score-bar {
    flex: 1;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-purple-light));
    border-radius: 12px;
    transition: width 1s ease-out;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.score-num {
    min-width: 50px;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-purple-dark);
}

.monthly-timeline h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .yearly-summary-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .gwae-visual {
        flex-direction: column;
        gap: 1rem;
    }

    .gwae-symbol {
        width: 100%;
    }

    .total-score-circle {
        width: 120px;
        height: 120px;
    }

    .month-card {
        padding: 1.5rem;
    }

    .month-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .month-theme {
        margin-left: 0;
    }

    .score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .score-item .score-label {
        min-width: auto;
    }

    .score-bar {
        width: 100%;
    }

    .monthly-timeline h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .yearly-summary-card {
        padding: 1rem;
    }

    .year-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .total-score-circle {
        width: 100px;
        height: 100px;
    }

    .score-value {
        font-size: 1.2rem;
    }

    .month-number {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .month-theme {
        font-size: 1.1rem;
    }

    .monthly-timeline h3 {
        font-size: 1.3rem;
    }
}