/* ============================================
   laohuangli.php 老黄历页专属样式 - 大气美观版
============================================ */

.hl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========== 日期导航 - 大气设计 ========== */
.hl-date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
    border-radius: 24px;
    padding: 30px 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0e0db;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hl-date-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #C41A1A, #e74c3c, #f39c12);
}

.hl-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e0d5cc;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hl-nav-btn:hover {
    background: #C41A1A;
    border-color: #C41A1A;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 26, 26, 0.3);
}

.hl-nav-btn .nav-icon {
    font-size: 14px;
}

.hl-date-center {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 18px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 250px;
}

.hl-date-center:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.date-big-day {
    font-size: 160px;
    font-weight: 900;
    color: #C41A1A;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(196, 26, 26, 0.2);
    margin-bottom: 4px;
}

.solar-date {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.lunar-date {
    font-size: 16px;
    color: #C41A1A;
    font-weight: 600;
}

.date-hint {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
}

/* ========== 日期选择弹窗 ========== */
.hl-date-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.hl-date-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.hl-date-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hl-date-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f5f5f5;
}

.hl-date-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.hl-date-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hl-date-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.hl-date-modal-body {
    margin-bottom: 20px;
}

.hl-date-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.hl-date-input:focus {
    border-color: #C41A1A;
    box-shadow: 0 0 0 3px rgba(196, 26, 26, 0.1);
}

.hl-date-quick-btns {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.hl-date-quick-btns button {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f8f8f8;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hl-date-quick-btns button:hover {
    background: #C41A1A;
    color: #fff;
    border-color: #C41A1A;
}

.hl-date-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.hl-date-modal-footer button {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #666;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-confirm {
    background: #C41A1A;
    border: 1px solid #C41A1A;
    color: #fff;
}

.btn-confirm:hover {
    background: #a01515;
    box-shadow: 0 4px 12px rgba(196, 26, 26, 0.3);
}

/* ========== 区块标题 ========== */
.hl-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 4px;
}

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

.section-text {
    font-size: 22px;
    font-weight: 800;
    color: #333;
    letter-spacing: 1px;
}

/* ========== 基础信息表格 ========== */
.hl-info-table-wrap {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    overflow-x: auto;
}

.hl-info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* 固定表格布局，让列宽均分 */
}

.hl-info-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 15px;
    vertical-align: middle;
}

.hl-info-table tr:last-child td {
    border-bottom: none;
}

/* 标签列：固定宽度15% */
.info-label {
    width: 15%;
    min-width: 80px;
    font-weight: 700;
    color: #999;
    font-size: 14px;
    letter-spacing: 1px;
    background: #faf8f5;
    text-align: center;
    white-space: nowrap;
}

/* 值列：各占35% */
.info-value {
    width: 35%;
    color: #333;
    font-weight: 500;
    line-height: 1.6;
    word-break: break-word;
}

/* 每行总宽度 = 15% + 35% + 15% + 35% = 100% */
/* 左右两部分各占50% = 15% + 35% = 50% */

.highlight-ganzhi {
    font-weight: 800 !important;
    color: #C41A1A !important;
    font-size: 17px !important;
}

.text-good {
    color: #2d7a3a !important;
    font-weight: 600;
}

.text-bad {
    color: #b33a3a !important;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
}

.badge-good {
    background: #e8f5e9;
    color: #2d7a3a;
}

.badge-bad {
    background: #fdf0ef;
    color: #b33a3a;
}


/* ========== 宜忌信息 ========== */
.hl-yiji-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.hl-yiji-card {
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.hl-yiji-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.hl-yi-card {
    background: linear-gradient(135deg, #f0f9f0 0%, #fff 100%);
    border: 2px solid #b7e4b7;
}

.hl-ji-card {
    background: linear-gradient(135deg, #fdf0ef 0%, #fff 100%);
    border: 2px solid #f5b7b1;
}

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

.yiji-icon {
    font-size: 28px;
}

.yiji-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hl-yi-card .yiji-title {
    color: #27ae60;
}

.hl-ji-card .yiji-title {
    color: #e74c3c;
}

.yiji-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.yiji-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hl-yi-card .yiji-tag {
    color: #27ae60;
    border: 1px solid #b7e4b7;
}

.hl-ji-card .yiji-tag {
    color: #e74c3c;
    border: 1px solid #f5b7b1;
}

.yiji-empty {
    font-size: 16px;
    color: #999;
    font-weight: 600;
}

/* ========== 时辰吉凶 ========== */
.hl-shichen-section {
    margin-top: 30px;
}

.hl-table-wrap {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    overflow-x: auto;
}

.hl-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.hl-table-wrap thead th {
    background: linear-gradient(135deg, #faf5f2 0%, #fef5f0 100%);
    padding: 14px 10px;
    text-align: center;
    border: 1px solid #f0e0db;
}

.th-hour {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.th-time {
    font-size: 11px;
    font-weight: 400;
    color: #999;
}

.hl-table-wrap tbody th {
    background: #f8f5f2;
    padding: 12px 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    border: 1px solid #f0e0db;
    min-width: 50px;
}

.hl-table-wrap tbody td {
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
    border: 1px solid #f0f0f0;
    line-height: 1.5;
}

.td-ganzhi {
    font-weight: 700;
    color: #333;
}

.hl-table-wrap tbody td.td-good {
    color: #2d7a3a;
    background: #f0f9f0;
}

.hl-table-wrap tbody td.td-bad {
    color: #b33a3a;
    background: #fdf0ef;
}

.hl-table-wrap tbody td small {
    font-size: 11px;
    opacity: 0.8;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .hl-container {
        padding: 10px;
    }
    
    .hl-date-nav {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .hl-nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hl-date-center {
        min-width: auto;
        width: 100%;
        order: -1;
    }
    
    .date-big-day {
        font-size: 100px;
    }
    
    .solar-date {
        font-size: 18px;
    }
    
    .lunar-date {
        font-size: 14px;
    }
    
    .hl-info-table-wrap {
        padding: 12px;
    }
    
    /* 移动端：一行只显示一个标签+值 */
    .hl-info-table {
        table-layout: auto;
        border-collapse: collapse;
    }
    
    .hl-info-table tr {
        display: block;
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 0;
    }
    
    .hl-info-table tr:last-child {
        border-bottom: none;
    }
    
    .hl-info-table td {
        display: block;
        width: 100%;
        padding: 6px 12px;
        font-size: 14px;
        border-bottom: none;
    }
    
    /* 让标签和值在同一行显示 */
    .hl-info-table td.info-label {
        display: inline-block;
        width: 85px;
        min-width: 85px;
        font-weight: 700;
        color: #666;
        font-size: 13px;
        background: #faf8f5;
        padding: 6px 10px;
        text-align: center;
        border-radius: 4px;
        margin-right: 8px;
        vertical-align: middle;
    }
    
    .hl-info-table td.info-value {
        display: inline-block;
        width: calc(100% - 100px); /* 减去标签宽度和间距 */
        color: #333;
        font-weight: 500;
        font-size: 14px;
        padding: 6px 0;
        vertical-align: middle;
        word-break: break-word;
    }
    
    /* 确保每对标签+值占一行 */
    .hl-info-table tr td:nth-child(odd) {
        clear: both;
    }
    
    /* 调整值神badge在移动端的显示 */
    .badge {
        display: inline-block;
        margin-left: 6px;
        padding: 2px 6px;
        font-size: 11px;
        vertical-align: middle;
    }
    
    /* 高亮干支在移动端调整 */
    .highlight-ganzhi {
        font-size: 15px !important;
    }
    
    .hl-yiji-section {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 20px 0;
    }
    
    .hl-table-wrap {
        padding: 12px;
    }
    
    .hl-table-wrap thead th,
    .hl-table-wrap tbody th,
    .hl-table-wrap tbody td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .th-hour {
        font-size: 13px;
    }
    
    .th-time {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .date-big-day {
        font-size: 72px;
    }
    
    .section-text {
        font-size: 18px;
    }
    
    .yiji-title {
        font-size: 20px;
    }
    
    .yiji-tag {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* 基础信息表格在更小屏幕的优化 */
    .hl-info-table td.info-label {
        width: 70px;
        min-width: 70px;
        font-size: 12px;
        padding: 5px 8px;
        margin-right: 6px;
    }
    
    .hl-info-table td.info-value {
        width: calc(100% - 82px); /* 减去标签宽度和间距 */
        font-size: 13px;
        padding: 5px 0;
    }
    
    .highlight-ganzhi {
        font-size: 14px !important;
    }
    
    .badge {
        padding: 2px 5px;
        font-size: 10px;
        margin-left: 4px;
    }
}