/* 紫微斗数十二宫页面样式 */

.ziwei-palaces-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* 页面标题 */
.page-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 40px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.page-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* 介绍区域 */
.intro-section {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.intro-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
    text-align: center;
}

.intro-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 16px;
    text-align: justify;
}

.intro-text:last-child {
    margin-bottom: 0;
}

/* 十二宫卡片区域 */
.palaces-section {
    margin-bottom: 40px;
}

.palaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* 宫位卡片 */
.palace-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.palace-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;

    opacity: 0;
    transition: opacity 0.3s ease;
}

.palace-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.palace-card:hover::before {
    opacity: 1;
}

/* 卡片头部 */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.card-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

/* 卡片摘要 */
.card-summary {
    margin-bottom: 16px;
}

.card-summary p {
    font-size: 1rem;
    color: #667eea;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

/* 卡片描述 */
.card-description {
    margin-bottom: 24px;
}

.card-description p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 0;
}

/* 星曜区域 */
.card-stars {
    margin-bottom: 24px;
}

.stars-section {
    margin-bottom: 20px;
}

.stars-section:last-child {
    margin-bottom: 0;
}

.stars-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.stars-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-right: 8px;
    font-weight: 700;
}

.suitable-stars .stars-icon {
    background: #d1fae5;
    color: #059669;
}

.unsuitable-stars .stars-icon {
    background: #fee2e2;
    color: #dc2626;
}

.stars-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.star-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.star-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.star-tag-good {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.star-tag-good:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.star-tag-bad {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.star-tag-bad:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.star-tag-more {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    cursor: default;
}

.star-tag-more:hover {
    transform: none;
    box-shadow: none;
}

/* 详细信息区域 */
.card-details {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.detail-item {
    margin-bottom: 16px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.detail-title::before {
    content: '•';
    margin-right: 8px;
    font-size: 1.2rem;
    color: #667eea;
}

.detail-text {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 0;
    padding-left: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ziwei-palaces-container {
        padding: 12px;
    }

    .page-header {
        padding: 30px 16px;
        margin-bottom: 24px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header .subtitle {
        font-size: 0.95rem;
    }

    .intro-section {
        padding: 24px 20px;
        margin-bottom: 24px;
    }

    .intro-title {
        font-size: 1.4rem;
        margin-bottom: 16px;
    }

    .intro-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .palaces-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .palace-card {
        padding: 20px;
    }

    .card-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .card-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-right: 12px;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-summary p {
        font-size: 0.95rem;
    }

    .card-description p {
        font-size: 0.9rem;
    }

    .stars-title {
        font-size: 0.9rem;
    }

    .star-tag {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .detail-title {
        font-size: 0.9rem;
    }

    .detail-text {
        font-size: 0.85rem;
        padding-left: 12px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header .subtitle {
        font-size: 0.85rem;
    }

    .intro-section {
        padding: 20px 16px;
    }

    .intro-title {
        font-size: 1.2rem;
    }

    .palace-card {
        padding: 16px;
    }

    .card-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .card-title {
        font-size: 1.1rem;
    }
}

/* 打印样式 */
@media print {
    .ziwei-palaces-container {
        background: #fff;
        padding: 0;
    }

    .page-header {
        background: #667eea;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .palace-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* 来因宫页面样式 */
.laiyin-section {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.laiyin-content {
    max-width: 100%;
}

.laiyin-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    padding-bottom: 16px;
}

.laiyin-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.laiyin-intro {
    margin-bottom: 40px;
}

.laiyin-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 16px;
    text-align: justify;
}

.laiyin-text strong {
    color: #667eea;
    font-weight: 600;
}

.laiyin-calculation {
    margin-bottom: 40px;
}

.calculation-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
}

.calculation-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 12px;
}

.calculation-text:last-child {
    margin-bottom: 0;
}

.calculation-text strong {
    color: #667eea;
    font-weight: 600;
}

.laiyin-palaces {
    margin-bottom: 40px;
}

.palaces-grid-laiyin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.laiyin-palace-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.laiyin-palace-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.laiyin-palace-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.laiyin-palace-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.laiyin-palace-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.laiyin-palace-content {
    padding-top: 8px;
}

.laiyin-palace-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 12px;
}

.laiyin-palace-desc strong {
    color: #667eea;
    font-weight: 600;
}

.laiyin-palace-note {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #718096;
    padding: 12px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #cbd5e0;
}

.laiyin-palace-note strong {
    color: #2d3748;
    font-weight: 600;
}

.laiyin-gan {
    margin-top: 40px;
}

.gan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.gan-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.gan-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.gan-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #4a5568;
    margin: 0;
}

/* 响应式设计 - 来因宫页面 */
@media (max-width: 768px) {
    .laiyin-section {
        padding: 24px 20px;
    }

    .laiyin-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .laiyin-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .calculation-box {
        padding: 20px;
    }

    .calculation-text {
        font-size: 0.95rem;
    }

    .palaces-grid-laiyin {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .laiyin-palace-card {
        padding: 20px;
    }

    .laiyin-palace-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .laiyin-palace-name {
        font-size: 1.1rem;
    }

    .laiyin-palace-desc {
        font-size: 0.9rem;
    }

    .laiyin-palace-note {
        font-size: 0.85rem;
    }

    .gan-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gan-card {
        padding: 16px;
    }

    .gan-name {
        font-size: 1.1rem;
    }

    .gan-desc {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .laiyin-section {
        padding: 20px 16px;
    }

    .laiyin-title {
        font-size: 1.2rem;
    }

    .calculation-box {
        padding: 16px;
    }

    .laiyin-palace-card {
        padding: 16px;
    }

    .laiyin-palace-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .laiyin-palace-name {
        font-size: 1rem;
    }

    .gan-card {
        padding: 14px;
    }

    .gan-name {
        font-size: 1rem;
    }
}

/* 四化星页面样式 */
.sihua-stars {
    margin-bottom: 40px;
}

.sihua-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.sihua-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sihua-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.sihua-lu {
    border-color: #10b981;
}

.sihua-lu:hover {
    border-color: #059669;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.sihua-quan {
    border-color: #3b82f6;
}

.sihua-quan:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.sihua-ke {
    border-color: #8b5cf6;
}

.sihua-ke:hover {
    border-color: #7c3aed;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.sihua-ji {
    border-color: #ef4444;
}

.sihua-ji:hover {
    border-color: #dc2626;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.sihua-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.sihua-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    margin-right: 16px;
    flex-shrink: 0;
    color: #fff;
}

.sihua-lu .sihua-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sihua-quan .sihua-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.sihua-ke .sihua-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.sihua-ji .sihua-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.sihua-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.sihua-card-content {
    padding-top: 8px;
}

.sihua-desc,
.sihua-effect,
.sihua-note {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 12px;
}

.sihua-desc strong,
.sihua-effect strong,
.sihua-note strong {
    color: #2d3748;
    font-weight: 600;
}

.sihua-note {
    padding: 12px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #cbd5e0;
    margin-top: 8px;
}

/* 四化星表格样式 */
.sihua-table-section {
    margin-bottom: 40px;
}

.sihua-table-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.sihua-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.sihua-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.sihua-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sihua-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.sihua-table tbody tr:hover {
    background-color: #f8f9fa;
}

.sihua-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.sihua-table tbody tr:nth-child(even):hover {
    background-color: #f1f5f9;
}

.sihua-table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
}

.sihua-table td strong {
    color: #667eea;
    font-weight: 600;
}

.sihua-table td:first-child {
    font-weight: 600;
    color: #2d3748;
}

.sihua-table td:last-child {
    color: #667eea;
    font-style: italic;
}

/* 响应式设计 - 四化星页面 */
@media (max-width: 768px) {
    .sihua-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sihua-card {
        padding: 20px;
    }

    .sihua-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-right: 12px;
    }

    .sihua-name {
        font-size: 1.3rem;
    }

    .sihua-table-box {
        padding: 16px;
    }

    .sihua-table {
        font-size: 0.85rem;
    }

    .sihua-table th,
    .sihua-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .sihua-card {
        padding: 16px;
    }

    .sihua-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .sihua-name {
        font-size: 1.1rem;
    }

    .sihua-desc,
    .sihua-effect,
    .sihua-note {
        font-size: 0.9rem;
    }

    .sihua-table-box {
        padding: 12px;
    }

    .sihua-table {
        font-size: 0.8rem;
    }

    .sihua-table th,
    .sihua-table td {
        padding: 8px 6px;
    }
}

/* 五行局页面样式 */
.wuxing-ju-cards-section {
    margin-bottom: 40px;
}

.wuxing-ju-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.wuxing-ju-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wuxing-ju-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.wuxing-ju-shui {
    border-color: #3b82f6;
}

.wuxing-ju-shui:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.wuxing-ju-mu {
    border-color: #10b981;
}

.wuxing-ju-mu:hover {
    border-color: #059669;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.wuxing-ju-jin {
    border-color: #f59e0b;
}

.wuxing-ju-jin:hover {
    border-color: #d97706;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

.wuxing-ju-tu {
    border-color: #8b5cf6;
}

.wuxing-ju-tu:hover {
    border-color: #7c3aed;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.wuxing-ju-huo {
    border-color: #ef4444;
}

.wuxing-ju-huo:hover {
    border-color: #dc2626;
    box-shadow: 0 8px 20px 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;
    flex-shrink: 0;
}

.wuxing-ju-title-group {
    flex: 1;
}

.wuxing-ju-name {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 4px 0;
}

.wuxing-ju-number {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}

.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-table-section {
    margin-bottom: 40px;
}

/* 五行局作用说明样式 */
.wuxing-ju-usage {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    margin-top: 32px;
    margin-bottom: 40px;
}

.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;
}

.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;
}

/* 响应式 - 五行局页面 */
@media (max-width: 900px) {
    .wuxing-ju-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .wuxing-ju-cards-grid {
        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;
    }

    .wuxing-ju-usage {
        padding: 24px 16px;
    }

    .usage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .usage-card {
        padding: 20px;
    }

    .usage-title {
        font-size: 16px;
    }

    .usage-desc {
        font-size: 13px;
    }
}

/* 三方四正页面样式 */
.sanfang-diagram-section {
    margin-bottom: 40px;
}

.sanfang-diagram-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sanfang-diagram {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto;
}

.diagram-palace {
    position: absolute;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 80px;
}

.diagram-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    z-index: 10;
}

.diagram-sanh1 {
    top: 20%;
    right: 15%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: #3b82f6;
}

.diagram-sanh2 {
    top: 20%;
    left: 15%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: #3b82f6;
}

.diagram-dui {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border-color: #ef4444;
}

.diagram-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.diagram-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-line {
    width: 30px;
    height: 2px;
    border-radius: 1px;
}

.legend-sanh {
    background: #667eea;
    border-top: 2px dashed #667eea;
}

.legend-dui {
    background: #ef4444;
    border-top: 2px dashed #ef4444;
}

.legend-text {
    font-size: 14px;
    color: #4a5568;
}

/* 三方四正分析要点 */
.sanfang-analysis-section {
    margin-bottom: 40px;
}

.analysis-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
}

.analysis-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.analysis-subtitle:first-child {
    margin-top: 0;
}

.analysis-text {
    font-size: 14px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 16px;
}

/* 响应式 - 三方四正页面 */
@media (max-width: 900px) {
    .sanfang-diagram-box {
        padding: 24px;
    }

    .sanfang-diagram {
        height: 250px;
    }

    .diagram-palace {
        font-size: 12px;
        padding: 8px 12px;
        min-width: 70px;
    }

    .analysis-box {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .sanfang-diagram-box {
        padding: 20px;
    }

    .sanfang-diagram {
        height: 200px;
    }

    .diagram-palace {
        font-size: 11px;
        padding: 6px 10px;
        min-width: 60px;
    }

    .diagram-legend {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .analysis-box {
        padding: 20px;
    }

    .analysis-subtitle {
        font-size: 16px;
    }

    .analysis-text {
        font-size: 13px;
    }
}

/* 庙旺利平陷表格样式 */
.miaowang-table-section {
    margin-bottom: 40px;
}

.miaowang-table-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.miaowang-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 800px;
}

.miaowang-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.miaowang-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.miaowang-table th:first-child {
    min-width: 100px;
}

.miaowang-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.miaowang-table tbody tr:hover {
    background-color: #f8f9fa;
}

.miaowang-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.miaowang-table tbody tr:nth-child(even):hover {
    background-color: #f1f5f9;
}

.star-name-cell {
    padding: 12px;
    font-weight: 600;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    min-width: 100px;
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
}

.status-cell {
    padding: 12px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.6;
}

.status-miao {
    background-color: #ecfdf5;
    color: #059669;
    font-weight: 500;
}

.status-wang {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.status-li {
    background-color: #fef3c7;
    color: #d97706;
    font-weight: 500;
}

.status-ping {
    background-color: #f9fafb;
    color: #6b7280;
}

.status-xian {
    background-color: #fef2f2;
    color: #dc2626;
    font-weight: 500;
}

/* 响应式 - 庙旺利平陷表格 */
@media (max-width: 900px) {
    .miaowang-table-wrapper {
        padding: 16px;
    }

    .miaowang-table {
        font-size: 0.85rem;
        min-width: 700px;
    }

    .miaowang-table th,
    .miaowang-table td {
        padding: 10px 8px;
    }

    .star-name-cell {
        min-width: 80px;
        font-size: 0.9rem;
    }

    .status-cell {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .miaowang-table-wrapper {
        padding: 12px;
    }

    .miaowang-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .miaowang-table th,
    .miaowang-table td {
        padding: 8px 6px;
    }

    .star-name-cell {
        min-width: 70px;
        font-size: 0.85rem;
    }

    .status-cell {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
}

/* 飞星页面样式 */
.feixing-sihua-section {
    margin-bottom: 40px;
}

.feixing-ben-gong-section,
.feixing-dui-gong-section,
.feixing-palaces-section {
    margin-bottom: 40px;
}

.feixing-ben-gong-section .laiyin-text,
.feixing-dui-gong-section .laiyin-text {
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
}

.feixing-palaces-section .laiyin-palace-card {
    min-height: auto;
}

.feixing-palaces-section .laiyin-palace-content {
    padding-top: 12px;
}

.feixing-palaces-section .laiyin-palace-desc {
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.feixing-palaces-section .laiyin-palace-desc:last-child {
    margin-bottom: 0;
}

/* 响应式 - 飞星页面 */
@media (max-width: 900px) {
    .feixing-sihua-section .sihua-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .feixing-ben-gong-section .palaces-grid-laiyin,
    .feixing-dui-gong-section .palaces-grid-laiyin {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .feixing-sihua-section .sihua-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feixing-ben-gong-section .palaces-grid-laiyin,
    .feixing-dui-gong-section .palaces-grid-laiyin,
    .feixing-palaces-section .palaces-grid-laiyin {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feixing-palaces-section .laiyin-palace-card {
        padding: 16px;
    }

    .feixing-palaces-section .laiyin-palace-desc {
        font-size: 0.85rem;
    }
}

