/* 罗睺日查询特有样式 - Liquid Glass 主题适配 */

/* 双栏布局 */
.tool-layout {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    margin-top: 16px;
}

.layout-left, .layout-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0; /* 避免 flex 溢出 */
}

/* 交互卡片背景 */
.interactive-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px var(--mystic-shadow);
    transition: all 0.3s ease;
}

.interactive-card:hover {
    box-shadow: 0 6px 24px var(--mystic-glow);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

/* 快速时间选择行 */
.quick-time-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--mystic-glow);
}

.btn-primary {
    flex: 1.5;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--mystic-shadow);
    box-sizing: border-box;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 16px var(--mystic-glow);
}

/* 日历组件样式 */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}

.calendar-controls select {
    flex: 1;
    min-width: 80px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    width: 100%;
}

.calendar-weekday {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border);
}

.calendar-day.empty {
    cursor: default;
    background: transparent;
    border-color: transparent;
}

.calendar-day.empty:hover {
    background: transparent;
}

.calendar-day .day-num {
    font-weight: 600;
    z-index: 2;
}

.calendar-day .lunar-text {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 2px;
    z-index: 2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 选中状态 */
.calendar-day.selected {
    border: 1.5px solid var(--primary-color) !important;
    box-shadow: 0 0 8px var(--mystic-glow);
}

/* 各种忌日状态背景 */
.calendar-day.luohou-year {
    background: rgba(239, 68, 68, 0.12); /* 浅红 */
}
.calendar-day.luohou-season {
    background: rgba(245, 158, 11, 0.12); /* 浅橙 */
}
.calendar-day.luohou-month {
    background: rgba(236, 72, 153, 0.12); /* 浅粉 */
}

/* 多重重叠罗睺 */
.calendar-day.luohou-multiple {
    background: rgba(220, 38, 38, 0.2);
}

/* 小圆点指示器 */
.dot-indicators {
    display: flex;
    gap: 3px;
    margin-top: 2px;
    height: 5px;
    z-index: 2;
}

.indicator-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.indicator-dot.year { background-color: #ef4444; }
.indicator-dot.season { background-color: #f59e0b; }
.indicator-dot.month { background-color: #ec4899; }

/* 日历图例 */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    justify-content: center;
    border-top: 1px dashed var(--glass-border);
    padding-top: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}

.legend-color.year { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); }
.legend-color.season { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); }
.legend-color.month { background: rgba(236, 72, 153, 0.15); border-color: rgba(236, 72, 153, 0.4); }

/* 四柱展现 */
.bazi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.bazi-col {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bazi-col .pillar-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.bazi-col .pillar-gz {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 状态展示 */
.verdict-box {
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.verdict-box.xiong {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.verdict-box.ping {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.verdict-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.verdict-box.xiong .verdict-title { color: #ef4444; }
.verdict-box.ping .verdict-title { color: #10b981; }

.verdict-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 判定条目列表 */
.verdict-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.verdict-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--glass-border);
}

.verdict-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.verdict-detail-label {
    color: var(--text-primary);
}

.verdict-detail-status {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verdict-detail-status.danger { color: #ef4444; }
.verdict-detail-status.safe { color: #10b981; }

/* 杀师时辰格子 */
.shashi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
}

.shashi-hour-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.shashi-hour-box.danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.shashi-hour-box.danger .hour-name {
    color: #ef4444;
    font-weight: 600;
}

.shashi-hour-box .hour-name {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.shashi-hour-box .hour-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 文档与说明的口诀表格 */
.rule-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 12px 0;
}

.rule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.rule-table th, .rule-table td {
    padding: 10px;
    border: 1px solid var(--glass-border);
}

.rule-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    font-weight: 600;
}

.rule-table td {
    color: var(--text-secondary);
}

/* 罗盘注意事项说明 */
.compass-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.compass-tips-title {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 响应式断点 */
@media (max-width: 768px) {
    .tool-layout {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .bazi-row {
        gap: 6px;
    }
    .bazi-col .pillar-gz {
        font-size: 16px;
    }
    .shashi-grid {
        grid-template-columns: 1fr;
    }
}
