/* 五行页面样式 - 清爽现代风格 */

.wuxing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.wuxing-hero {
    text-align: center;
    margin-bottom: 48px;
}

.wuxing-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
}

.wuxing-subtitle {
    max-width: 720px;
    margin: 0 auto;
    font-size: 15px;
    color: #555;
    line-height: 1.8;
}

.wuxing-section {
    margin-bottom: 64px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-desc {
    text-align: center;
    color: #666;
    font-size: 14px;
    max-width: 680px;
    margin: 0 auto 32px;
}

/* 元素卡片 */
.wuxing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.wuxing-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 22px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.9);
    text-align: center;
    transition: all 0.25s ease;
}

.wuxing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.wuxing-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.wuxing-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.wuxing-tagline {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.wuxing-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #444;
    text-align: left;
}

.wuxing-meta li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wuxing-meta span {
    color: #888;
}

.wuxing-meta strong {
    font-weight: 500;
}

.wuxing-mu { background: linear-gradient(180deg, #f1fff4 0%, #ffffff 40%); }
.wuxing-huo { background: linear-gradient(180deg, #fff5f2 0%, #ffffff 40%); }
.wuxing-tu { background: linear-gradient(180deg, #fffaf0 0%, #ffffff 40%); }
.wuxing-jin { background: linear-gradient(180deg, #f7fbff 0%, #ffffff 40%); }
.wuxing-shui { background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 40%); }

/* 相生相克 */
.relation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
    gap: 32px;
    align-items: stretch;
}

.relation-diagram {
    background: #f8fafc;
    border-radius: 18px;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.relation-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
}

.relation-placeholder span {
    display: block;
    font-size: 13px;
    color: #4b5563;
}

.relation-text {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.relation-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 22px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

/* 精美标题头部 */
.relation-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.relation-line {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    margin-right: 10px;
}

.relation-line-grow {
    background: #16a34a;
}

.relation-line-control {
    background: #ef4444;
}

.relation-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.relation-header-title {
    font-size: 14px;
    font-weight: 600;
}

.relation-header-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.relation-header-grow .relation-header-title {
    color: #047857;
}

.relation-header-control .relation-header-title {
    color: #b91c1c;
}

.relation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #374151;
}

.relation-list li {
    margin-bottom: 6px;
    display: flex;
    gap: 8px;
}

.relation-list strong {
    margin-right: 4px;
    min-width: 70px;
}

/* 对应表 */
.table-wrapper {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.wuxing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wuxing-table thead {
    background: #f8fafc;
}

.wuxing-table th,
.wuxing-table td {
    padding: 10px 12px;
    text-align: left;
}

.wuxing-table th {
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.wuxing-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.wuxing-table tbody tr.row-mu { background: #f2fff5; }
.wuxing-table tbody tr.row-huo { background: #fff5f5; }
.wuxing-table tbody tr.row-tu { background: #fffdf3; }
.wuxing-table tbody tr.row-jin { background: #f5f8ff; }
.wuxing-table tbody tr.row-shui { background: #f3f7ff; }

/* 补运建议 */
.advice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.advice-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    font-size: 13px;
    color: #374151;
}

.advice-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.advice-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advice-card li {
    margin-bottom: 6px;
}

.advice-card span {
    color: #6b7280;
    margin-right: 4px;
}

.advice-mu { border-top: 3px solid #22c55e; }
.advice-huo { border-top: 3px solid #fb923c; }
.advice-tu { border-top: 3px solid #facc15; }
.advice-jin { border-top: 3px solid #60a5fa; }
.advice-shui { border-top: 3px solid #38bdf8; }

/* 十天干与五行 */
.tiangan-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 40px 0;
}

.tiangan-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    width: 100px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tiangan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.tiangan-icon {
    font-size: 36px;
    margin-bottom: 12px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiangan-name {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.tiangan-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tiangan-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-yang {
    background: #fbbf24;
}

.dot-yin {
    background: #a855f7;
}

.dot-mu {
    background: #22c55e;
}

.dot-huo {
    background: #ef4444;
}

.dot-tu {
    background: #facc15;
}

.dot-jin {
    background: #94a3b8;
}

.dot-shui {
    background: #3b82f6;
}

.tiangan-legend {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.legend-item {
    margin-bottom: 12px;
    font-size: 14px;
}

.legend-label {
    font-weight: 600;
    margin-right: 4px;
}

.legend-yang {
    color: #fbbf24;
}

.legend-yin {
    color: #a855f7;
    margin-left: 16px;
}

.legend-text {
    color: #6b7280;
}

.legend-element {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
    margin: 0 4px;
    color: #fff;
}

.legend-mu {
    background: #22c55e;
}

.legend-huo {
    background: #ef4444;
}

.legend-tu {
    background: #facc15;
    color: #111827;
}

.legend-jin {
    background: #94a3b8;
}

.legend-shui {
    background: #3b82f6;
}

/* 天干模态框 */
.tiangan-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.tiangan-modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tiangan-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.tiangan-modal-header {
    text-align: center;
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.tiangan-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiangan-modal-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.tiangan-modal-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag-yang {
    background: #fef3c7;
    color: #92400e;
}

.tag-yin {
    background: #f3e8ff;
    color: #6b21a8;
}

.tag-mu {
    background: #dcfce7;
    color: #166534;
}

.tag-huo {
    background: #fee2e2;
    color: #991b1b;
}

.tag-tu {
    background: #fef9c3;
    color: #854d0e;
}

.tag-jin {
    background: #e2e8f0;
    color: #1e293b;
}

.tag-shui {
    background: #dbeafe;
    color: #1e40af;
}

.tiangan-modal-intro {
    padding: 24px 32px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 15px;
    text-align: center;
    background: #f9fafb;
}

.tiangan-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 32px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.modal-tags-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.feature-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    text-align: center;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    padding: 10px 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid #e5e7eb;
}

.modal-list li:last-child {
    border-bottom: none;
}

.modal-list li::before {
    content: '•';
    color: #6b7280;
    margin-right: 8px;
}

.modal-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #dbeafe;
    border-radius: 8px;
    font-size: 14px;
    color: #1e40af;
    text-align: center;
}

.modal-text {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.tiangan-modal-footer {
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.tiangan-modal-close {
    background: #111827;
    color: #fff;
    border: none;
    padding: 12px 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tiangan-modal-close:hover {
    background: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tiangan-modal-close:active {
    transform: translateY(0);
}

/* 响应式 - 模态框 */
@media (max-width: 768px) {
    .tiangan-modal-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .tiangan-modal-header {
        padding: 24px 24px 20px;
    }

    .tiangan-modal-intro {
        padding: 20px 24px;
    }

    .tiangan-modal-footer {
        padding: 20px 24px;
    }

    .tiangan-modal-title {
        font-size: 28px;
    }

    .tiangan-modal-icon {
        font-size: 40px;
        height: 56px;
    }
}

/* 智慧语 */
.wuxing-quote {
    text-align: center;
}

.quote-main {
    font-style: italic;
    color: #111827;
    margin-bottom: 10px;
}

.quote-from {
    color: #6b7280;
    margin-bottom: 16px;
}

.quote-desc {
    max-width: 700px;
    margin: 0 auto;
    color: #4b5563;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 900px) {
    .relation-layout {
        grid-template-columns: 1fr;
    }

    .wuxing-container {
        padding: 24px 16px 48px;
    }

    .tiangan-cards {
        gap: 12px;
    }

    .tiangan-card {
        width: calc(50% - 6px);
        padding: 20px 12px;
    }

    .tiangan-icon {
        font-size: 32px;
        height: 44px;
    }

    .tiangan-name {
        font-size: 16px;
    }

    .tiangan-desc {
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .tiangan-card {
        width: calc(33.333% - 8px);
        padding: 16px 8px;
    }

    .tiangan-icon {
        font-size: 28px;
        height: 40px;
    }

    .tiangan-name {
        font-size: 14px;
    }

    .tiangan-desc {
        font-size: 10px;
    }

    .legend-item {
        font-size: 12px;
    }
}

/* 五行局样式 */
.wuxing-ju-intro {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
    border-left: 4px solid #667eea;
}

.wuxing-ju-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.wuxing-ju-calculation {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.8;
}

.calculation-text {
    margin-bottom: 10px;
}

.calculation-text strong {
    color: #2d3748;
    font-weight: 600;
}

.calculation-list {
    margin-top: 12px;
    padding-left: 24px;
    list-style: none;
}

.calculation-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.calculation-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.calculation-list li strong {
    color: #667eea;
}

/* 五行局卡片 */
.wuxing-ju-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.wuxing-ju-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.wuxing-ju-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.wuxing-ju-shui {
    border-color: #3b82f6;
}

.wuxing-ju-shui:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.wuxing-ju-mu {
    border-color: #10b981;
}

.wuxing-ju-mu:hover {
    border-color: #059669;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.wuxing-ju-jin {
    border-color: #f59e0b;
}

.wuxing-ju-jin:hover {
    border-color: #d97706;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.wuxing-ju-tu {
    border-color: #8b5cf6;
}

.wuxing-ju-tu:hover {
    border-color: #7c3aed;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.wuxing-ju-huo {
    border-color: #ef4444;
}

.wuxing-ju-huo:hover {
    border-color: #dc2626;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}

.wuxing-ju-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.wuxing-ju-icon {
    font-size: 36px;
    margin-right: 12px;
}

.wuxing-ju-name {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    flex: 1;
    margin: 0;
}

.wuxing-ju-number {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 6px;
}

.wuxing-ju-content {
    padding-top: 8px;
}

.wuxing-ju-item {
    display: flex;
    margin-bottom: 12px;
    font-size: 14px;
}

.ju-label {
    color: #718096;
    font-weight: 500;
    min-width: 80px;
    flex-shrink: 0;
}

.ju-value {
    color: #2d3748;
    font-weight: 500;
}

.wuxing-ju-desc {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.7;
}

/* 五行局作用说明 */
.wuxing-ju-usage {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    margin-top: 32px;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.usage-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: all 0.3s ease;
}

.usage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.usage-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.usage-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.usage-desc {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.7;
    margin: 0;
}

/* 响应式 - 五行局 */
@media (max-width: 900px) {
    .wuxing-ju-cards {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }

    .wuxing-ju-intro {
        padding: 24px 20px;
    }

    .wuxing-ju-calculation {
        font-size: 13px;
    }

    .usage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .wuxing-ju-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wuxing-ju-card {
        padding: 20px;
    }

    .wuxing-ju-header {
        flex-wrap: wrap;
    }

    .wuxing-ju-icon {
        font-size: 32px;
    }

    .wuxing-ju-name {
        font-size: 20px;
    }

    .wuxing-ju-number {
        font-size: 12px;
        padding: 3px 10px;
        margin-top: 8px;
        width: 100%;
    }

    .wuxing-ju-intro {
        padding: 20px 16px;
    }

    .wuxing-ju-subtitle {
        font-size: 18px;
    }

    .wuxing-ju-calculation {
        font-size: 12px;
    }

    .calculation-list {
        padding-left: 20px;
    }

    .wuxing-ju-usage {
        padding: 24px 16px;
    }

    .usage-card {
        padding: 20px;
    }

    .usage-title {
        font-size: 16px;
    }

    .usage-desc {
        font-size: 13px;
    }
}