/* Traditional Fortune Teller Design - Professional & Authentic */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css');

:root {
    /* Traditional Fortune Theme - Premium Design Polish */
    --bg-color: #FDFBF7;
    /* Mystic Cream - Hanji feel */
    --card-bg: #FFFFFF;
    --primary-color: #8B4513;
    --accent-color: #C41E3A;
    --gold-accent: #D4AF37;
    --text-primary: #2C1810;
    --text-secondary: #6B5D52;
    --border-color: #E8DCC8;
    --shadow-sm: 0 2px 8px rgba(139, 69, 19, 0.08);
    --shadow-md: 0 4px 16px rgba(139, 69, 19, 0.12);
    --shadow-premium: 0 8px 32px rgba(139, 69, 19, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-serif: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --primary-red: #C41E3A;
    --action-orange: #FF7043;
    --glass-white: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(139, 69, 19, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: linear-gradient(135deg, #FDFBF7 0%, #F5F1E8 100%);
    /* Mystic Cream gradient */
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    padding-bottom: 100px;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.02) 2px, rgba(139, 69, 19, 0.02) 4px);
    pointer-events: none;
    z-index: 0;
}

/* Ensure mobile bottom nav is visible */
.mobile-bottom-nav {
    z-index: 1030 !important;
}

/* --- Layout --- */
.fortune-container {
    max-width: 480px;
    /* Mobile-optimized width */
    margin: 0 auto;
    padding: 16px;
    background: transparent;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .fortune-container {
        max-width: 520px;
        /* PC에서도 모바일 최적화 폭 유지 */
        padding: 20px;
    }

    /* PC에서 결과 카드 폭 제한 */
    #resultCard {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* PC에서 결과창 폭 제한 - 모바일 디자인 유지 */
@media (min-width: 1024px) {
    .fortune-container {
        max-width: 520px;
        /* 데스크톱에서도 동일한 폭 유지 */
    }

    #resultCard {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Header --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 30px;
}

.btn-icon-simple {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-icon-simple:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.brand-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(196, 30, 58, 0.05) 100%);
    border-radius: var(--radius-md);
    border: 2px solid var(--gold-accent);
    box-shadow: var(--shadow-premium);
    position: relative;
}

.brand-section::before {
    content: '✦';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 20px;
    color: var(--gold-accent);
    opacity: 0.6;
}

.brand-section::after {
    content: '✦';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    color: var(--gold-accent);
    opacity: 0.6;
}

/* --- Logo --- */
.logo-wrap {
    width: auto;
    height: 80px;
    margin: 0 auto 20px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clean-logo {
    width: auto;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    display: block;
}

.brand-title {
    font-family: var(--font-main);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(139, 69, 19, 0.08);
}

.brand-desc {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* --- Cards & Forms --- */
.clean-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 2px solid var(--border-color);
    position: relative;
    transition: var(--transition-smooth);
}

.clean-card:hover {
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-premium);
}

.section-label {
    font-family: var(--font-main);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: '◆';
    color: var(--gold-accent);
    font-size: 12px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-color), transparent);
    margin-left: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.input-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.clean-input,
.clean-select {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #FDFBF7;
    color: var(--text-primary);
    transition: all 0.3s;
    font-family: var(--font-main);
    appearance: none;
}

.clean-input:focus,
.clean-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.08);
}

/* --- Gender Toggle --- */
.gender-toggle {
    display: flex;
    gap: 0;
    background: #F5F1E8;
    border-radius: var(--radius-sm);
    padding: 4px;
}

.gender-toggle input[type="radio"] {
    display: none;
}

.gender-label-radio {
    flex: 1;
    text-align: center;
    padding: 14px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

input[type="radio"]:checked+.gender-label-radio {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15);
    border-color: var(--gold-accent);
}

/* --- Topic Selection --- */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.topic-item input {
    display: none;
}

.topic-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #FFFFFF 0%, #FDFBF7 100%);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.topic-icon {
    font-size: 28px;
    color: var(--text-secondary);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.topic-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.topic-item input:checked+.topic-card {
    border-color: var(--gold-accent);
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF5DC 100%);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.topic-item input:checked+.topic-card .topic-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.topic-item input:checked+.topic-card .topic-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Action Button --- */
.btn-primary-modern {
    width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6B3410 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary-modern:hover::before {
    left: 100%;
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.btn-primary-modern:active {
    transform: translateY(-1px);
}

/* --- Fortune Result Visuals --- */
.result-content-clean {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.result-content-clean h3,
.result-content-clean h4 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin-top: 32px;
    margin-bottom: 16px;
}

.result-content-clean p {
    margin-bottom: 16px;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, #FDFBF7 0%, #F5F1E8 100%);
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
}

/* Elements Colors */
.bg-wood {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

.bg-fire {
    background: linear-gradient(135deg, #FF5252 0%, #D32F2F 100%);
}

.bg-earth {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
}

.bg-metal {
    background: linear-gradient(135deg, #9E9E9E 0%, #616161 100%);
}

.bg-water {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

/* Section Cards in Results - ENHANCED */
.section-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold-accent), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.section-card:hover::before {
    opacity: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-card:hover {
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-premium);
    transform: translateY(-2px);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
}

.section-title i,
.section-title svg {
    font-size: 24px;
    color: var(--gold-accent);
}

.section-title::before {
    content: '◆';
    color: var(--gold-accent);
    font-size: 16px;
    margin-right: -2px;
}

.section-body {
    line-height: 2.0;
    color: var(--text-secondary);
    font-size: 15px;
}

/* --- Language Toggle --- */
.lang-switch {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 16px;
    background: #fff;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.lang-switch:hover {
    border-color: var(--gold-accent);
    background: #FFF9E6;
}

/* --- Textarea --- */
.text-area-clean,
textarea.clean-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #FDFBF7;
    font-family: var(--font-main);
    resize: vertical;
    min-height: 100px;
    font-size: 15px;
    line-height: 1.6;
}

.text-area-clean:focus,
textarea.clean-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.08);
}

/* Textarea with Character Counter */
.textarea-wrapper {
    position: relative;
}

.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    font-family: var(--font-main);
}

.char-counter.warning {
    color: #ff9800;
    font-weight: 600;
}

.char-counter.danger {
    color: #f44336;
    font-weight: 700;
}

/* --- Loading Overlay --- */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 241, 232, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay h5 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin-top: 20px;
}

/* Loading Icon Animation */
.loading-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.fortune-spinner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: var(--gold-accent);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-circle:nth-child(2) {
    width: 60px;
    height: 60px;
    border-top-color: var(--primary-color);
    animation: spin 1.5s linear infinite reverse;
}

.spinner-circle:nth-child(3) {
    width: 40px;
    height: 40px;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-steps {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.loading-step {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.loading-step.active {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(212, 175, 55, 0.15);
    transform: translateX(5px);
}

.loading-step.completed {
    color: var(--gold-accent);
    background: rgba(212, 175, 55, 0.08);
}

.loading-step i {
    font-size: 16px;
    flex-shrink: 0;
}

.loading-icon-pulse {
    font-size: 3.5rem;
    color: var(--gold-accent);
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {

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

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* Use GPU acceleration for animations */
.loading-icon-pulse,
.progress-bar-fill,
.btn-primary-modern {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Progress Bar */
.progress-bar-container {
    width: 280px;
    height: 8px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-accent), var(--primary-color));
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.progress-percentage {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-main);
    margin: 0;
}

/* KakaoTalk Browser Compatibility Fixes */
@supports not (display: grid) {
    .topic-grid {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    .topic-item {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 calc(50% - 8px);
        flex: 0 0 calc(50% - 8px);
        margin: 4px;
    }
}

/* Font Loading Optimization for KakaoTalk */
/* Pretendard is loaded via CDN link in HTML, no need for @font-face */

/* Flexbox Fallbacks */
.d-flex {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
}

.align-items-center {
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
}

.justify-content-between {
    -webkit-box-pack: justify !important;
    -ms-flex-pack: justify !important;
    justify-content: space-between !important;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .fortune-container {
        padding: 16px;
    }

    .brand-title {
        font-size: 24px;
    }

    .clean-card {
        padding: 24px 20px;
    }

    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 150px;
        padding: 16px;
    }

    .progress-bar-container {
        width: 240px;
    }
}

/* Profile description text */
.profile-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.form-text {
    font-size: 13px;
    color: var(--text-secondary);
}


/* --- Additional Result Styles --- */
.result-content-clean ul,
.result-content-clean ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.result-content-clean li {
    margin-bottom: 8px;
}

.result-content-clean strong {
    color: var(--primary-color);
    font-weight: 700;
}

.result-content-clean em {
    color: var(--accent-color);
    font-style: normal;
    font-weight: 600;
}

.result-content-clean blockquote {
    border-left: 4px solid var(--gold-accent);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Markdown body styles for history */
.markdown-body-1,
.markdown-body-2,
.markdown-body-3,
.markdown-body-4,
.markdown-body-5,
.markdown-body-6,
.markdown-body-7,
.markdown-body-8,
.markdown-body-9,
.markdown-body-10 {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
}

.markdown-body-1 h3,
.markdown-body-2 h3,
.markdown-body-3 h3,
.markdown-body-4 h3,
.markdown-body-5 h3,
.markdown-body-6 h3,
.markdown-body-7 h3,
.markdown-body-8 h3,
.markdown-body-9 h3,
.markdown-body-10 h3,
.markdown-body-1 h4,
.markdown-body-2 h4,
.markdown-body-3 h4,
.markdown-body-4 h4,
.markdown-body-5 h4,
.markdown-body-6 h4,
.markdown-body-7 h4,
.markdown-body-8 h4,
.markdown-body-9 h4,
.markdown-body-10 h4 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin-top: 24px;
    margin-bottom: 12px;
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Select dropdown arrow */
.clean-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B4513' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}


/* Phase 9: Typography - Nanum Myeongjo for Headings (Saju Authority) */
h1,
h2,
.h1,
.h2 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: 0.5px;
}

h1,
.h1 {
    font-size: 28px;
    font-weight: 800;
}

h2,
.h2 {
    font-size: 24px;
    font-weight: 700;
}

h3,
h4,
.h3,
.h4 {
    font-family: var(--font-serif);
    font-weight: 600;
}


/* --- Enhanced Five Elements Chart --- */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 0;
}

.chart-bar-group {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 14px;
}

.chart-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    font-family: var(--font-main);
}

.chart-bar-wrapper {
    height: 36px;
    background: #F5F1E8;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.chart-bar {
    height: 100%;
    border-radius: 18px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.8s ease-out;
    min-width: 2%;
}

@keyframes slideIn {
    from {
        width: 0 !important;
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.chart-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 18px 18px 0 0;
}

.chart-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    font-family: var(--font-main);
    min-width: 50px;
}

/* Element Colors */
.bg-wood {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
}

.bg-fire {
    background: linear-gradient(135deg, #F44336 0%, #EF5350 100%);
}

.bg-earth {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
}

.bg-metal {
    background: linear-gradient(135deg, #9E9E9E 0%, #BDBDBD 100%);
}

.bg-water {
    background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
}

/* Element Legend */
.element-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.legend-text {
    font-size: 13px;
    line-height: 1.4;
}

.legend-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.legend-text small {
    color: var(--text-secondary);
    font-size: 11px;
}

/* --- Energy Grid --- */
.energy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.energy-item {
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: var(--transition-smooth);
}

.energy-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.energy-dominant {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(102, 187, 106, 0.05) 100%);
    border-color: #4CAF50;
}

.energy-lacking {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(239, 83, 80, 0.05) 100%);
    border-color: #F44336;
}

.energy-icon {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.energy-dominant .energy-icon {
    color: #4CAF50;
}

.energy-lacking .energy-icon {
    color: #F44336;
}

.energy-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.energy-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

/* --- Daewoon Timeline --- */
.daewoon-timeline {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-accent) var(--border-color);
}

.daewoon-timeline::-webkit-scrollbar {
    height: 6px;
}

.daewoon-timeline::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.daewoon-timeline::-webkit-scrollbar-thumb {
    background: var(--gold-accent);
    border-radius: 3px;
}

.daewoon-item {
    min-width: 100px;
    padding: 16px;
    background: #F5F1E8;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.daewoon-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-accent);
}

.daewoon-item.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(196, 30, 58, 0.1) 100%);
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-md);
}

.daewoon-age {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.daewoon-ganji {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.daewoon-god {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Section title already defined above, removing duplicate */

.section-subtitle {
    font-family: var(--font-main);
    font-size: 19px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-body {
    font-size: 15px;
    line-height: 2.0;
    color: var(--text-primary);
    word-break: keep-all;
    word-wrap: break-word;
}

.section-body p {
    margin-bottom: 20px;
    text-align: left;
    white-space: pre-wrap;
    line-height: 2.0;
}

.section-body p:last-child {
    margin-bottom: 0;
}

/* Fortune-specific paragraph styling - ENHANCED */
.fortune-paragraph {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.03) 0%, rgba(139, 69, 19, 0.02) 100%);
    border-left: 3px solid var(--gold-accent);
    border-radius: 4px;
    margin-bottom: 18px;
    line-height: 2.0;
    font-size: 15px;
}

.fortune-paragraph:last-child {
    margin-bottom: 0;
}

/* Fortune list styling - ENHANCED */
.fortune-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.fortune-list li {
    padding: 12px 16px 12px 40px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    position: relative;
    line-height: 1.9;
}

.fortune-list li::before {
    content: '✦';
    position: absolute;
    left: 16px;
    color: var(--gold-accent);
    font-size: 14px;
}

/* Fortune subheading - ENHANCED */
.fortune-subheading {
    color: var(--primary-color);
    font-size: 17px;
    font-weight: 700;
    margin: 28px 0 18px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-serif);
    display: flex;
    align-items: center;
}

.fortune-subheading i,
.fortune-subheading svg {
    color: var(--gold-accent);
}

.section-body strong {
    color: var(--primary-color);
    font-weight: 600;
}

.section-body ul,
.section-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.section-body li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* --- Result Card Specific --- */
#resultCard {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 480px) {
    .fortune-container {
        padding: 12px;
    }

    .brand-title {
        font-size: 24px;
    }

    .clean-card {
        padding: 24px 18px;
    }

    .section-card {
        padding: 24px 18px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .section-subtitle {
        font-size: 17px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .fortune-paragraph {
        padding: 14px 16px;
        font-size: 14px;
        line-height: 1.9;
        margin-bottom: 16px;
    }

    .fortune-list li {
        padding: 10px 14px 10px 36px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .fortune-subheading {
        font-size: 16px;
        margin: 24px 0 14px 0;
    }

    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .energy-grid {
        grid-template-columns: 1fr;
    }

    .element-legend {
        grid-template-columns: 1fr;
    }

    .daewoon-item {
        min-width: 90px;
        padding: 14px;
    }

    .daewoon-age {
        font-size: 18px !important;
    }

    .daewoon-ganji {
        font-size: 15px !important;
    }

    .daewoon-god {
        font-size: 12px !important;
    }

    .chart-container {
        padding: 18px;
        gap: 14px;
    }
}


/* --- History Page Styles --- */
.history-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 60px 20px 20px 20px;
    /* 상단 패딩 증가로 삭제 버튼 공간 확보 */
    margin-bottom: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* Detail Concern Box - Used in both results and history */
.detail-concern-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-left: 4px solid var(--gold-accent);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 20px;
}

.concern-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.concern-label i {
    color: var(--gold-accent);
}

.concern-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: keep-all;
}

.history-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-md);
}

.history-card.expanded {
    border-color: var(--primary-color);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* 상단 정렬로 변경 */
    margin-bottom: 12px;
    gap: 12px;
    /* 간격 추가 */
    flex-wrap: wrap;
    /* 줄바꿈 허용 */
}

.history-date {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    flex: 1;
    /* 공간 차지 */
    min-width: 150px;
    /* 최소 너비 */
}

.history-name {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6B3410 100%);
    color: white;
    padding: 6px 16px;
    /* 패딩 증가 */
    border-radius: 18px;
    /* 더 둥글게 */
    font-size: 14px;
    /* 폰트 크기 증가 */
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(139, 69, 19, 0.2);
    white-space: nowrap;
    /* 줄바꿈 방지 */
    max-width: 200px;
    /* 최대 너비 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-topics {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-tag-premium {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF5DC 100%);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    border: 1.5px solid var(--gold-accent);
}

.btn-view-result {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    margin-top: 16px;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.3);
    color: white;
}

.btn-view-result:active {
    transform: translateY(0);
}

.history-toggle {
    text-align: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.history-toggle i {
    transition: transform 0.3s;
}

.history-card.expanded .history-toggle i {
    transform: rotate(180deg);
}

.toggle-text {
    font-weight: 500;
}

.history-detail-section {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-content-wrap {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
}

.result-content-wrap p {
    margin-bottom: 12px;
}

.result-content-wrap strong {
    color: var(--primary-color);
    font-weight: 600;
}

.back-btn-premium {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    color: var(--primary-color);
    transition: var(--transition-smooth);
    border: 2px solid var(--border-color);
}

.back-btn-premium:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.btn-delete-history {
    position: absolute;
    top: 12px;
    /* 상단에서 12px */
    right: 12px;
    /* 우측에서 12px */
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #e0e0e0;
    color: #999;
    width: 36px;
    /* 크기 증가 */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
    font-size: 16px;
    /* 아이콘 크기 증가 */
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-delete-history:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

.premium-glass {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 24px;
    box-shadow: var(--shadow-md);
}

.btn-outline-custom-premium {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 28px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-outline-custom-premium:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Optimization for History */
@media (max-width: 768px) {
    .history-card {
        padding: 50px 16px 16px 16px;
        /* 모바일에서도 상단 패딩 유지 */
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-date {
        font-size: 12px;
        min-width: auto;
    }

    .history-name {
        font-size: 13px;
        padding: 5px 14px;
        max-width: calc(100% - 60px);
        /* 삭제 버튼 공간 확보 */
    }

    .badge-tag-premium {
        font-size: 11px;
        padding: 3px 10px;
    }

    .btn-delete-history {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .detail-concern-box {
        padding: 12px;
    }

    .concern-label {
        font-size: 11px;
    }

    .concern-text {
        font-size: 14px;
    }
}

/* PC 최적화 */
@media (min-width: 769px) {
    .history-card {
        padding: 60px 24px 24px 24px;
    }

    .history-header {
        align-items: center;
    }

    .history-name {
        max-width: 250px;
    }
}


/* ========================================
   REDESIGNED FORTUNE RESULT STYLES
   ======================================== */

/* User Info Card */
.user-info-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 2px solid #D4AF37;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.user-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E5C3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    flex-shrink: 0;
}

.user-info-text {
    flex: 1;
}

.user-name {
    font-size: 24px;
    font-weight: 700;
    color: #8B4513;
    margin: 0 0 6px 0;
    font-family: 'Nanum Myeongjo', serif;
}

.user-subtitle {
    font-size: 14px;
    color: #6B5D52;
    margin: 0;
}

.topics-section {
    margin-bottom: 20px;
}

.topics-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 12px;
}

.topics-label i {
    color: #D4AF37;
}

.topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-badge {
    background: linear-gradient(135deg, #D4AF37 0%, #F4E5C3 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.concern-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    padding: 20px;
}

.concern-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 12px;
}

.concern-label i {
    color: #D4AF37;
}

.concern-text {
    font-size: 15px;
    line-height: 1.8;
    color: #2C1810;
}

/* Analysis Section Base */
.analysis-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.15);
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.section-icon i {
    font-size: 28px;
}

.section-title-group {
    flex: 1;
}

.section-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #8B4513;
    background: rgba(212, 175, 55, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-main-title {
    font-size: 26px;
    font-weight: 700;
    color: #8B4513;
    margin: 0 0 6px 0;
    font-family: 'Nanum Myeongjo', serif;
}

.section-subtitle {
    font-size: 14px;
    color: #6B5D52;
    margin: 0;
}

/* Five Elements Section */
.five-elements-chart {
    margin-bottom: 32px;
}

.element-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(245, 241, 232, 0.3);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.element-row:hover {
    background: rgba(245, 241, 232, 0.5);
    transform: translateX(4px);
}

.element-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.element-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.element-text {
    flex: 1;
}

.element-name {
    font-size: 16px;
    font-weight: 700;
    color: #2C1810;
    margin-bottom: 2px;
}

.element-desc {
    font-size: 12px;
    color: #6B5D52;
}

.element-bar-container {
    flex: 1;
    height: 40px;
    background: rgba(245, 241, 232, 0.5);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.element-bar {
    height: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.element-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 20px 20px 0 0;
}

.element-value {
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.elements-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding-top: 24px;
    border-top: 2px solid rgba(212, 175, 55, 0.15);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.summary-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.summary-text {
    flex: 1;
}

.summary-label {
    font-size: 12px;
    color: #6B5D52;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #8B4513;
}

/* Energy Section */
.energy-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.energy-card {
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.energy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dominant-energy {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    color: white;
}

.lacking-energy {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
}

.energy-card-icon {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.energy-card-label {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.energy-card-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.energy-card-desc {
    font-size: 13px;
    opacity: 0.85;
}

/* Daewoon Timeline */
.daewoon-timeline-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
}

.daewoon-cycle {
    min-width: 140px;
    padding: 20px;
    background: rgba(245, 241, 232, 0.3);
    border-radius: 14px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.daewoon-cycle:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.daewoon-cycle.active-cycle {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-color: #D4AF37;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.daewoon-age-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.daewoon-content {
    margin-bottom: 8px;
}

.daewoon-ganji {
    font-size: 18px;
    font-weight: 700;
    color: #2C1810;
    margin-bottom: 6px;
}

.daewoon-god {
    font-size: 13px;
    color: #6B5D52;
}

.daewoon-desc {
    font-size: 12px;
    color: #6B5D52;
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
    word-break: keep-all;
    font-family: 'Pretendard', sans-serif;
}

.current-indicator {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #FF6B6B;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Content Section */
.section-content {
    font-size: 15px;
    line-height: 1.9;
    color: #2C1810;
}

.content-list {
    margin: 24px 0;
}

.list-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 241, 232, 0.5) 100%);
    border-radius: 14px;
    border-left: 4px solid #D4AF37;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.list-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.list-content {
    flex: 1;
    padding-top: 6px;
}

.content-subheading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    margin: 32px 0 20px 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 14px;
    border-left: 6px solid #D4AF37;
    font-size: 18px;
    font-weight: 700;
    color: #8B4513;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.content-subheading i {
    color: #D4AF37;
    font-size: 20px;
}

.content-paragraph {
    padding: 20px 24px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(139, 69, 19, 0.08);
}

.content-paragraph.first-paragraph {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 241, 232, 0.7) 100%);
    border-left: 6px solid #D4AF37;
    border: 2px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    padding: 24px 28px;
}

.paragraph-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.paragraph-badge i {
    font-size: 13px;
}

.paragraph-text {
    line-height: 2.0;
}

.highlight-text {
    color: #8B4513;
    font-weight: 700;
    background: rgba(212, 175, 55, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .analysis-section {
        padding: 24px 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
    }

    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .section-main-title {
        font-size: 22px;
    }

    .element-row {
        flex-direction: column;
        gap: 12px;
    }

    .element-info {
        width: 100%;
        min-width: auto;
    }

    .element-bar-container {
        width: 100%;
    }

    .daewoon-cycle {
        min-width: 120px;
    }

    .user-info-card {
        padding: 20px;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .user-name {
        font-size: 20px;
    }
}

/* ========================================
   V2 REDESIGN - SCORE HERO CARD
   ======================================== */

.score-hero-content {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.score-circle-wrap {
    position: relative;
    width: 160px;
    height: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-circle-svg {
    width: 160px;
    height: 160px;
}

.score-ring-animated {
    animation: scoreRingDraw 2s ease-out forwards;
}

@keyframes scoreRingDraw {
    from {
        stroke-dashoffset: 440;
    }
}

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

.score-big-number {
    font-size: 44px;
    font-weight: 800;
    color: #2C1810;
    font-family: 'Inter', 'Pretendard', sans-serif;
    line-height: 1;
}

.score-unit {
    font-size: 16px;
    color: #6B5D52;
    font-weight: 600;
    margin-left: 2px;
}

.score-label {
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-categories {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(245, 241, 232, 0.4);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.score-cat-card:hover {
    background: rgba(245, 241, 232, 0.7);
    transform: translateX(4px);
}

.score-cat-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.score-cat-info {
    flex: 1;
    min-width: 0;
}

.score-cat-label {
    font-size: 13px;
    font-weight: 700;
    color: #2C1810;
    margin-bottom: 6px;
}

.score-cat-bar-wrap {
    height: 8px;
    background: rgba(139, 69, 19, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.score-cat-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease-out;
    min-width: 5%;
}

.score-cat-desc {
    font-size: 11px;
    color: #6B5D52;
    line-height: 1.3;
}

.score-cat-number {
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
    font-family: 'Inter', 'Pretendard', sans-serif;
}

/* ========================================
   V2 REDESIGN - RADAR CHART
   ======================================== */

.five-elements-visual {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 24px;
}

.radar-chart-container {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
}

.radar-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.elements-legend-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.element-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(245, 241, 232, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.element-legend-item:hover {
    background: rgba(245, 241, 232, 0.6);
    transform: translateX(4px);
}

.element-legend-emoji {
    font-size: 24px;
    flex-shrink: 0;
}

.element-legend-info {
    flex: 1;
}

.element-legend-name {
    font-size: 14px;
    font-weight: 700;
    color: #2C1810;
}

.element-legend-desc {
    font-size: 11px;
    color: #6B5D52;
}

.element-legend-value {
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    font-family: 'Inter', 'Pretendard', sans-serif;
}

/* ========================================
   V2 REDESIGN - MONTHLY FORECAST
   ======================================== */

.monthly-chart-container {
    margin-bottom: 28px;
    padding: 12px;
    background: rgba(245, 241, 232, 0.2);
    border-radius: 14px;
}

.monthly-chart-container canvas {
    width: 100% !important;
    max-height: 250px;
}

.monthly-keywords-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.monthly-keyword-card {
    text-align: center;
    padding: 14px 8px;
    background: rgba(245, 241, 232, 0.3);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.monthly-keyword-card:hover {
    background: rgba(245, 241, 232, 0.6);
    transform: translateY(-2px);
}

.monthly-keyword-card.current-month {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-color: #FF6B6B;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.monthly-month {
    font-size: 12px;
    font-weight: 700;
    color: #6B5D52;
    margin-bottom: 4px;
}

.monthly-score-mini {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Inter', 'Pretendard', sans-serif;
    margin-bottom: 4px;
}

.monthly-keyword {
    font-size: 11px;
    color: #6B5D52;
    line-height: 1.3;
    word-break: keep-all;
}

.monthly-current-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF6B6B;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

/* ========================================
   V2 REDESIGN - LUCKY ITEMS
   ======================================== */

.lucky-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.lucky-item-card {
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 241, 232, 0.5) 100%);
    border-radius: 16px;
    border: 2px solid rgba(212, 175, 55, 0.15);
    text-align: center;
    transition: all 0.3s ease;
}

.lucky-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
}

.lucky-item-emoji {
    font-size: 36px;
    margin-bottom: 12px;
}

.lucky-item-label {
    font-size: 13px;
    font-weight: 600;
    color: #8B7355;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    font-family: 'Pretendard', sans-serif;
}

.lucky-item-value {
    font-size: 22px;
    font-weight: 800;
    color: #2C1810;
    margin-bottom: 10px;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.lucky-item-desc {
    font-size: 13px;
    color: #6B5D52;
    line-height: 1.6;
    font-family: 'Pretendard', sans-serif;
}

/* ========================================
   V2 REDESIGN - COMPATIBILITY
   ======================================== */

.compat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.compat-card {
    padding: 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.compat-card:hover {
    transform: translateY(-4px);
}

.compat-best {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.08) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(233, 30, 99, 0.2);
}

.compat-caution {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(255, 152, 0, 0.2);
}

.compat-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.compat-best .compat-card-icon {
    color: #E91E63;
}

.compat-caution .compat-card-icon {
    color: #FF9800;
}

.compat-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #8B4513;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.compat-card-text {
    font-size: 14px;
    line-height: 1.7;
    color: #2C1810;
}

/* ========================================
   V2 RESPONSIVE OVERRIDES
   ======================================== */

@media (max-width: 768px) {
    .score-hero-content {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .score-circle-wrap {
        width: 140px;
        height: 180px;
    }

    .score-circle-svg {
        width: 140px;
        height: 140px;
    }

    .score-big-number {
        font-size: 36px;
    }

    .score-circle-number {
        top: 42px;
    }

    .score-categories {
        width: 100%;
    }

    .five-elements-visual {
        flex-direction: column;
        align-items: center;
    }

    .radar-chart-container {
        width: 240px;
        height: 240px;
    }

    .elements-legend-grid {
        width: 100%;
    }

    .monthly-keywords-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lucky-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .compat-cards {
        grid-template-columns: 1fr;
    }

    .score-cat-number {
        font-size: 20px;
    }

    .monthly-score-mini {
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .monthly-keywords-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .monthly-keyword-card {
        padding: 10px 6px;
    }

    .monthly-score-mini {
        font-size: 14px;
    }

    .monthly-keyword {
        font-size: 10px;
    }

    .lucky-items-grid {
        gap: 10px;
    }

    .lucky-item-card {
        padding: 18px 14px;
    }

    .lucky-item-emoji {
        font-size: 28px;
    }

    .lucky-item-value {
        font-size: 18px;
    }
}

/* ========================================
   V3 - TOPIC CARD VISUAL LAYOUT
   ======================================== */

.topic-card-visual {
    background: #FDFBF7;
    border-radius: 16px;
    border-left: 4px solid #D4AF37;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.topic-card-visual:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.topic-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.topic-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.topic-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #2C1810;
    margin: 0;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -0.3px;
}

.topic-card-body {
    font-size: 15px;
    line-height: 1.85;
    color: #3D2E22;
    font-family: 'Pretendard', sans-serif;
}

/* Readable paragraph spacing */
.readable-para {
    margin: 0 0 16px 0;
    line-height: 1.85;
    word-break: keep-all;
    font-size: 15px;
    color: #3D2E22;
}

.readable-para:last-child {
    margin-bottom: 0;
}

/* ========================================
   V3 - CONTENT SECTION IMPROVEMENTS
   ======================================== */

.content-paragraph .paragraph-text {
    font-size: 15px;
    line-height: 1.85;
    color: #3D2E22;
    word-break: keep-all;
}

.first-paragraph .paragraph-text {
    font-size: 15px;
    line-height: 1.85;
}

.section-content {
    padding: 0 4px;
}

/* ========================================
   V3 - PC DESKTOP LAYOUT OPTIMIZATION
   ======================================== */

@media (min-width: 768px) {

    /* Constrain result width for readability */
    .result-card,
    #resultCard {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Score hero - keep column layout on PC too for clean display */
    .score-hero-content {
        display: flex;
        align-items: center;
        gap: 32px;
        flex-direction: column;
    }

    .score-circle-wrap {
        flex-shrink: 0;
    }

    .score-categories {
        width: 100%;
        max-width: 600px;
    }

    /* Five elements - column layout on PC for stability */
    .five-elements-visual {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .radar-chart-container {
        width: 320px;
        height: 320px;
        flex-shrink: 0;
    }

    .elements-legend-grid {
        width: 100%;
        max-width: 600px;
    }

    /* Monthly keywords - 4 columns on PC */
    .monthly-keywords-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Lucky items - 4 columns on PC */
    .lucky-items-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Compatibility - side by side */
    .compat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Energy cards horizontal */
    .energy-cards-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* Content sections - better spacing */
    .analysis-section {
        padding: 32px;
    }

    .section-header {
        margin-bottom: 28px;
    }

    /* Topic cards on PC */
    .topic-card-visual {
        padding: 28px 32px;
    }

    .topic-card-body {
        font-size: 15px;
        line-height: 1.9;
    }

    .readable-para {
        font-size: 15px;
        line-height: 1.9;
        margin-bottom: 18px;
    }

    /* Daewoon timeline horizontal */
    .daewoon-timeline-container {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 12px;
    }

    .daewoon-cycle {
        min-width: 160px;
        flex-shrink: 0;
    }

    .daewoon-desc {
        font-size: 12px;
        line-height: 1.5;
    }

    /* User info card */
    .user-info-card {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}