/* 궁합 분석 페이지 전용 스타일 */

/* 하트 아이콘 */
.hearts-icon {
    font-size: 4rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* 네비게이션 */
/* 네비게이션 스타일은 style.css의 공통 스타일을 따릅니다 */

/* 궁합 폼 카드 */
.gunghap-form-card {
    max-width: 900px;
    margin: 0 auto;
}

.person-inputs {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 30px;
}

.person-card {
    flex: 1;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    padding: 25px;
}

.person-card.person1 {
    border-top: 4px solid #4A90D9;
}

.person-card.person2 {
    border-top: 4px solid #E85D75;
}

.person-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.person-icon {
    font-size: 1.5rem;
}

.person-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.heart-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: pulse 1.5s infinite;
}

/* 간단한 입력 */
.date-inputs.compact {
    grid-template-columns: 1.5fr 1fr 1fr;
}

.date-inputs.compact select {
    padding: 12px;
    font-size: 0.95rem;
}

/* 성별 토글 */
.gender-toggle {
    display: flex;
    gap: 10px;
}

.toggle-item {
    flex: 1;
    cursor: pointer;
}

.toggle-item input {
    display: none;
}

.toggle-item span {
    display: block;
    padding: 12px;
    text-align: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.toggle-item input:checked+span {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ===== 결과 페이지 ===== */

/* 궁합 요약 카드 */
.gunghap-summary {
    background: linear-gradient(135deg, #E85D75 0%, #4A90D9 100%) !important;
}

.couple-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.person-badge {
    text-align: center;
}

.person-badge .animal-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 10px;
}

.person-badge .person-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.person-badge .person-animal {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.heart-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.total-grade {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-serif);
}

.heart-icon {
    font-size: 2rem;
}

/* 점수 원형 */
.total-score-display {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

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

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-circle svg circle:last-child {
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

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

.score-number .number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.score-number .unit {
    font-size: 1rem;
    opacity: 0.8;
}

.summary-text {
    text-align: center;
}

.summary-text h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.summary-text .main-text {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 상세 점수 */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-row {
    display: grid;
    grid-template-columns: 120px 1fr 50px;
    align-items: center;
    gap: 15px;
}

.score-label {
    font-weight: 500;
}

.score-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-bar-bg {
    flex: 1;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.score-bar-fill.ddi {
    background: linear-gradient(90deg, #FF9A8B, #FF6B6B);
}

.score-bar-fill.ilgan {
    background: linear-gradient(90deg, #667EEA, #764BA2);
}

.score-bar-fill.oheng {
    background: linear-gradient(90deg, #11998E, #38EF7D);
}

.score-bar-fill.hapchung {
    background: linear-gradient(90deg, #F093FB, #F5576C);
}

.score-bar-fill.sipsin {
    background: linear-gradient(90deg, #4FACFE, #00F2FE);
}

.score-value {
    font-weight: 500;
    width: 50px;
    text-align: right;
}

.score-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.9rem;
}

.score-grade.grade-SS {
    background: #FFD700;
    color: #8B6914;
}

.score-grade.grade-S {
    background: #C0C0C0;
    color: #555;
}

.score-grade.grade-A {
    background: #CD7F32;
    color: #fff;
}

.score-grade.grade-B {
    background: #87CEEB;
    color: #1E4D6B;
}

.score-grade.grade-C {
    background: #DDA0DD;
    color: #553355;
}

.score-grade.grade-D {
    background: #F0F0F0;
    color: #666;
}

/* 띠 궁합 */
.ddi-display {
    text-align: center;
    margin-bottom: 20px;
}

.ddi-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.ddi-animal {
    text-align: center;
}

.ddi-animal .emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 5px;
}

.ddi-animal .name {
    font-weight: 500;
}

.ddi-and {
    font-size: 2rem;
    color: var(--primary-color);
}

.ddi-relations {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.relation-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    background: #f8f9fa;
}

.relation-badge.육합 {
    background: #ffe4ec;
}

.relation-badge.삼합 {
    background: #e4f5ff;
}

.relation-badge.충 {
    background: #fff4e4;
}

.relation-badge.형 {
    background: #f5e4ff;
}

.rel-emoji {
    font-size: 1.5rem;
}

.rel-type {
    font-weight: 600;
    margin-top: 5px;
}

.rel-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 3px;
}

/* 일간 궁합 */
.ilgan-display {
    margin-bottom: 20px;
}

.ilgan-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.ilgan-item {
    text-align: center;
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    color: white;
}

.ilgan-item .gan {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    font-weight: 700;
    display: block;
}

.ilgan-item .meaning {
    display: block;
    font-size: 0.9rem;
    margin-top: 5px;
}

.ilgan-item .element {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 5px;
}

.relation-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.arrow-emoji {
    font-size: 2rem;
}

.arrow-text {
    font-weight: 600;
    color: var(--primary-color);
}

/* 오행 보완 */
.complement-section,
.conflict-section {
    margin-bottom: 20px;
}

.complement-section h4,
.conflict-section h4 {
    margin-bottom: 15px;
}

.complement-list,
.conflict-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.complement-item,
.conflict-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.complement-item {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
}

.conflict-item {
    background: #fff8e1;
    border-left: 4px solid #FFC107;
}

.comp-emoji,
.conf-emoji {
    font-size: 1.5rem;
}

/* 십신 표시 */
.sipsin-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.sipsin-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    flex: 1;
    max-width: 200px;
}

.sipsin-item .person-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

.sipsin-item .person-label.sub {
    margin-bottom: 10px;
}

.sipsin-badge {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.sipsin-name {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

.sipsin-divider {
    font-size: 2rem;
}

/* 합충 */
.hap-section,
.chung-section {
    margin-bottom: 20px;
}

.hap-section h4,
.chung-section h4 {
    margin-bottom: 15px;
}

.hap-list,
.chung-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hap-item,
.chung-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
}

.hap-item {
    background: #ffe4ec;
}

.chung-item {
    background: #fff4e4;
}

.hap-heart,
.chung-bolt {
    font-size: 1.2rem;
}

/* 조언 카드 */
.advice-card {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
}

.advice-card .card-header h3 {
    color: white;
}

.advice-main {
    text-align: center;
    font-size: 1.2rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 25px;
}

.advice-tips h4 {
    margin-bottom: 15px;
}

.advice-tips ul {
    list-style: none;
    padding: 0;
}

.advice-tips li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.advice-tips li:before {
    content: '♥';
    position: absolute;
    left: 0;
}

.date-suggestion {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.date-suggestion h4 {
    margin-bottom: 15px;
}

.date-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.date-tag {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 최종 카드 */
.final-card {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.final-message {
    text-align: center;
}

.final-message .main {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.final-message .reminder {
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.detail-desc {
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    margin-top: 20px;
    line-height: 1.8;
}

/* 반응형 */
@media (max-width: 768px) {
    .person-inputs {
        flex-direction: column;
    }

    .heart-divider {
        padding: 10px 0;
    }

    .couple-display {
        flex-direction: column;
        gap: 20px;
    }

    .heart-center {
        order: -1;
    }

    .score-row {
        grid-template-columns: 100px 1fr 40px;
    }

    .ilgan-pair {
        flex-direction: column;
    }

    .relation-arrow {
        flex-direction: row;
    }

    .sipsin-display {
        flex-direction: column;
    }

    .sipsin-divider {
        transform: rotate(90deg);
    }
}

/* ===== 스마트폰 최적화 (max-width: 480px) ===== */
@media (max-width: 480px) {

    /* 입력 폼 */
    .person-card {
        padding: 20px 15px;
    }

    .date-inputs.compact {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gender-toggle {
        flex-direction: column;
    }

    /* 결과 요약 */
    .couple-display {
        gap: 15px;
    }

    .person-badge .animal-emoji {
        font-size: 3rem;
    }

    .total-grade {
        font-size: 2rem;
    }

    /* 점수 차트 */
    .score-row {
        grid-template-columns: 1fr;
        /* 스택형으로 변경 */
        gap: 5px;
        margin-bottom: 15px;
    }

    .score-label {
        margin-bottom: 5px;
    }

    .score-bar-wrapper {
        width: 100%;
    }

    /* 띠 궁합 */
    .ddi-pair {
        gap: 10px;
    }

    .ddi-animal .emoji {
        font-size: 2.5rem;
    }

    .ddi-and {
        font-size: 1.5rem;
    }

    /* 일간 궁합 */
    .ilgan-item {
        padding: 15px;
        width: 100%;
    }

    .ilgan-item .gan {
        font-size: 2rem;
    }

    /* 십신 */
    .sipsin-item {
        width: 100%;
        max-width: none;
        padding: 15px;
    }

    /* 합충 리스트 */
    .hap-item,
    .chung-item {
        width: 100%;
        justify-content: center;
    }

    /* 조언 및 기타 */
    .advice-main {
        font-size: 1rem;
        padding: 15px;
    }

    .date-tags {
        justify-content: center;
    }
}