/* ========================================
   新生儿取名 - 样式表
   中国传统风格 + 现代设计
   ======================================== */

/* CSS Variables */
:root {
    --primary: #C41E3A;
    --primary-dark: #9B1B30;
    --gold: #D4A017;
    --gold-light: #F5D76E;
    --bg-warm: #FFF8F0;
    --bg-card: #FFFFFF;
    --text-dark: #2C1810;
    --text-secondary: #6B5B4F;
    --text-light: #9B8B7F;
    --border: #E8DDD0;
    --shadow: 0 4px 20px rgba(44, 24, 16, 0.08);
    --shadow-hover: 0 8px 30px rgba(44, 24, 16, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
    background: var(--bg-warm);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 40px 20px 50px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95em;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.back-link:hover {
    color: white;
}

.header h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.header .subtitle {
    font-size: 1em;
    opacity: 0.85;
    letter-spacing: 2px;
}

.header .decorative {
    font-size: 0.85em;
    opacity: 0.6;
    margin-top: 12px;
    letter-spacing: 6px;
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Section Cards */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin: -30px 16px 24px;
    position: relative;
    z-index: 2;
}

.section-card + .section-card {
    margin-top: 24px;
}

.section-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1.2em;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.optional-tag {
    font-weight: 400;
    font-size: 0.8em;
    color: var(--text-light);
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1em;
    color: var(--text-dark);
    background: var(--bg-warm);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Gender Buttons */
.gender-group {
    display: flex;
    gap: 12px;
}

.gender-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-warm);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 600;
}

.gender-btn:hover {
    border-color: var(--primary);
}

.gender-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.gender-btn.active[data-gender="female"] {
    background: #E91E63;
    border-color: #E91E63;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    letter-spacing: 4px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.3);
}

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

/* Loading */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 248, 240, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 1em;
    letter-spacing: 2px;
}

/* Results Section */
#results {
    display: none;
}

/* Bazi Pillars */
.bazi-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pillar {
    text-align: center;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0E8 100%);
    border-radius: var(--radius-sm);
    padding: 16px 8px;
    border: 1px solid rgba(196, 30, 58, 0.1);
}

.pillar-label {
    font-size: 0.8em;
    color: var(--text-light);
    margin-bottom: 8px;
}

.pillar-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.analysis-text p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.analysis-text .advice {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0E8 100%);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    margin-top: 12px;
    color: var(--primary-dark);
    font-weight: 500;
}

/* Wuxing Chart */
.wuxing-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wuxing-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wuxing-label {
    width: 30px;
    font-weight: 700;
    font-size: 1.1em;
    text-align: center;
}

.wuxing-progress {
    flex: 1;
    height: 24px;
    background: #F0E8E0;
    border-radius: 12px;
    overflow: hidden;
}

.wuxing-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s ease-out;
    min-width: 4px;
}

.wuxing-count {
    width: 24px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Name Cards */
.names-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.name-card {
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
}

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

.name-card.popular {
    border-color: #FFE0B2;
}

.name-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.name-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary);
}

.name-score {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
}

.popular-badge {
    display: inline-block;
    background: #FF9800;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    margin-bottom: 8px;
}

.name-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.char-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.char-detail .char {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-dark);
}

.element-badge {
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
}

.char-detail .meaning {
    font-size: 0.8em;
    color: var(--text-light);
    width: 100%;
}

/* Name Card Hint */
.name-card {
    cursor: pointer;
}

.name-expand-hint {
    text-align: center;
    font-size: 0.75em;
    color: var(--text-light);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    transition: color 0.3s;
}

.name-card:hover .name-expand-hint {
    color: var(--primary);
}

/* Parent Analysis Styles */
.parent-analysis {
    padding: 10px 0;
}

.parent-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.parent-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 12px;
    min-width: 80px;
}

.parent-char {
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
    margin-bottom: 8px;
}

.parent-char .char {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 6px;
}

.parent-char .element-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.85em;
    font-weight: 500;
}

.parent-relation {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-warm);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
}

.parent-relation p {
    margin: 0;
    line-height: 1.8;
    color: var(--text-secondary);
}

.parent-relation strong {
    color: var(--primary);
}

/* Refresh Names Button */
.refresh-names-wrap-top {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px dashed var(--border);
}

.refresh-names-wrap {
    text-align: center;
    margin-top: 20px;
}

.refresh-names-btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    letter-spacing: 2px;
}

.refresh-names-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 160, 23, 0.35);
}

.refresh-names-btn:active {
    transform: translateY(0);
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-warm);
    border-radius: 50%;
    font-size: 1.4em;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--border);
}

.modal-body {
    padding: 16px 20px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.explanation-content {
    font-size: 0.92em;
    line-height: 1.9;
    color: var(--text-dark);
    white-space: pre-line;
}

/* Desktop: center the modal */
@media (min-width: 641px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }
    .modal-content {
        border-radius: var(--radius);
        max-height: 80vh;
    }
}

/* Yijing Section */
.guaxiang-section, .quotes-section {
    margin-bottom: 20px;
}

.guaxiang-section h4, .quotes-section h4 {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.guaxiang-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.guaxiang-item {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0E8 100%);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    gap: 8px;
    align-items: center;
}

.gua-name {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary);
}

.gua-nature {
    background: var(--gold);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.gua-meaning {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.quote-item {
    background: var(--bg-warm);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border-left: 3px solid var(--gold);
}

.quote-text {
    font-size: 1em;
    color: var(--text-dark);
    font-style: italic;
    margin-bottom: 6px;
}

.quote-source {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 4px;
}

.quote-chars {
    font-size: 0.85em;
    color: var(--primary);
    font-weight: 600;
}

/* Popular Names Section */
.popular-section {
    margin-top: 24px;
}

.popular-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}

.popular-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 2px solid var(--border);
    background: var(--bg-warm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.popular-tab:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.popular-tab:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.popular-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.popular-tab[data-tab="female"].active {
    background: #E91E63;
    border-color: #E91E63;
}

.popular-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.popular-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
}

.popular-list .rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: 700;
    background: var(--border);
    color: var(--text-secondary);
}

.popular-list li:nth-child(1) .rank {
    background: var(--gold);
    color: white;
}

.popular-list li:nth-child(2) .rank {
    background: #C0C0C0;
    color: white;
}

.popular-list li:nth-child(3) .rank {
    background: #CD7F32;
    color: white;
}

.popular-list .name {
    font-weight: 600;
    font-size: 1em;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.85em;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
    .header h1 {
        font-size: 1.6em;
        letter-spacing: 2px;
    }

    .section-card {
        margin-left: 8px;
        margin-right: 8px;
        padding: 20px 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

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

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

    .popular-list {
        grid-template-columns: 1fr;
    }

    .guaxiang-list {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-card {
    animation: fadeInUp 0.5s ease-out;
}

#results .section-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-warm);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 2px dashed var(--border);
    margin: 40px 20px;
}

/* Analyze Gender Buttons (same style as gender-btn) */
.analyze-gender-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-warm);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 600;
}

.analyze-gender-btn:hover {
    border-color: var(--primary);
}

.analyze-gender-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.analyze-gender-btn.active[data-gender="female"] {
    background: #E91E63;
    border-color: #E91E63;
}

.analyze-btn {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
}

.analyze-btn:hover {
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.3);
}

/* Analyze Results */
#analyzeResults {
    display: none;
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid var(--score-color, #FF9800);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,248,240,0.9));
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.score-number {
    font-size: 2.2em;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.score-label {
    font-size: 0.8em;
    color: var(--text-light);
}

.score-info {
    flex: 1;
}

.score-level {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 4px;
}

.score-name {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 4px;
}

/* Analyze Wuxing Tags */
.analyze-wuxing {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
}

.analyze-wuxing-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.analyze-wuxing-tag {
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.analyze-harmony {
    background: var(--bg-card);
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Bazi Match */
.analyze-bazi-match {
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0E8 100%);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.bazi-match-header {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1em;
}

.analyze-bazi-match p {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.bazi-match-desc {
    color: var(--primary-dark) !important;
    font-weight: 500;
    margin-top: 6px !important;
}

/* Popular Warning */
.popular-warning {
    margin-top: 12px;
    padding: 10px 14px;
    background: #FFF3E0;
    border-radius: var(--radius-sm);
    color: #E65100;
    font-weight: 600;
    font-size: 0.9em;
}

/* Char Analysis Grid */
.char-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.char-analysis-card {
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.char-analysis-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-hover);
}

.char-analysis-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.char-big {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--text-dark);
}

.char-analysis-body {
    text-align: left;
}

.char-meaning {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.char-stroke {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 4px;
}

.char-db {
    font-size: 0.8em;
    color: #4CAF50;
}

.char-db.warn {
    color: #FF9800;
}

/* Pros & Cons Lists */
.pros-list, .cons-list {
    list-style: none;
    padding: 0;
}

.pro-item, .con-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    line-height: 1.6;
}

.pro-item {
    background: #E8F5E9;
    color: #2E7D32;
}

.con-item {
    background: #FFF3E0;
    color: #E65100;
}

@media (max-width: 640px) {
    .score-display {
        flex-direction: column;
        text-align: center;
    }
    .score-name {
        font-size: 1.4em;
    }
    .char-analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* Error Message */
.error-message {
    color: #d32f2f;
    font-size: 0.85em;
    margin-top: 6px;
    padding: 6px 10px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 3px solid #d32f2f;
    animation: fadeInUp 0.3s ease-out;
}

.form-input.error {
    border-color: #d32f2f;
    background: #fff5f5;
}

/* Score Breakdown Styles */
.score-breakdown {
    padding: 0;
}

.breakdown-score {
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.3);
}

.breakdown-score .score-large {
    font-size: 2.5em;
    font-weight: 700;
    display: inline-block;
    margin: 0 4px;
}

.breakdown-score .score-unit {
    font-size: 0.8em;
    opacity: 0.9;
    margin-left: 4px;
}

/* 三才五格展示 */
.wuge-section {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE8D6 100%);
    border-radius: 12px;
    border: 2px solid var(--gold-light);
}

.section-subtitle {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wuge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.wuge-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

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

.wuge-label {
    display: block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.wuge-value {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary);
}

.sancai-info {
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    font-size: 0.95em;
    color: var(--text-dark);
    font-weight: 500;
}

/* 评分明细 */
.breakdown-details {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breakdown-list li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    font-size: 0.92em;
    line-height: 1.6;
    transition: all 0.2s;
}

.breakdown-list li:hover {
    background: #f0f2f5;
    transform: translateX(4px);
}

.breakdown-list li:contains("✅"),
.breakdown-list li:has(✅) {
    border-left-color: #4CAF50;
    background: #f1f8f4;
}

.breakdown-list li:contains("⚠️"),
.breakdown-list li:has(⚠️) {
    border-left-color: #FF9800;
    background: #fff8f0;
}

/* 评分说明 */
.breakdown-note {
    padding: 20px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.breakdown-note p {
    margin-bottom: 10px;
    font-size: 0.9em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.breakdown-note p:first-child {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.breakdown-note p:last-child {
    margin-bottom: 0;
}

.name-score {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.name-score:hover {
    transform: scale(1.08);
    color: var(--primary);
}

.name-score::after {
    content: '📊';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7em;
    opacity: 0;
    transition: opacity 0.2s;
}

.name-score:hover::after {
    opacity: 0.6;
}
