/* 生肖查询 - 工具专属样式（通用布局/卡片/按钮等由 common.css 提供） */

.setting-hint {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 8px;
}

/* ============ 查询结果 ============ */
.result-content {
    padding: 0;
}

.zodiac-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3e8ff;
}

.zodiac-icon {
    font-size: 48px;
    line-height: 1;
}

.result-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #6b21a8;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3e8ff;
}

.result-item:last-child {
    border-bottom: none;
}

.item-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    min-width: 96px;
}

.item-value {
    font-size: 16px;
    font-weight: 600;
    color: #6b21a8;
}

/* ============ 空状态 ============ */
.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 13px;
    color: #9ca3af;
}

/* ============ 十二生肖排序 ============ */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.zodiac-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.zodiac-item:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.2);
}

.zodiac-item:hover .zodiac-rank,
.zodiac-item:hover .zodiac-name {
    color: white;
}

.zodiac-rank {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.zodiac-icon-small {
    font-size: 24px;
    margin-bottom: 6px;
}

.zodiac-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: color 0.2s ease;
}

/* 窄屏降级：12 列太挤时改为 6 列 / 4 列多行展示 */
@media (max-width: 768px) {
    .zodiac-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .zodiac-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ============ 生肖年份对照表 ============ */
.year-table-wrapper {
    overflow-x: auto;
}

.year-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.year-table th {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.year-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #374151;
}

.year-table tbody tr:hover {
    background: #f3e8ff;
}

.year-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.year-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============ 生肖相冲相合表 ============ */
.relation-wrapper {
    overflow-x: auto;
}

.relation-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.relation-table th {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.relation-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.relation-table td:last-child {
    white-space: normal;
}

.relation-table tbody tr:hover {
    background: #f3e8ff;
}

.relation-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.relation-table tbody tr:last-child td {
    border-bottom: none;
}

.relation-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.relation-good {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.relation-bad {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.table-note {
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
}

/* ============ 深色模式适配 ============ */
body.dark .result-title,
body.dark .item-value {
    color: #c4b5fd;
}

body.dark .item-label {
    color: #9ca3af;
}

body.dark .empty-title {
    color: #d1d5db;
}

body.dark .zodiac-item {
    background: #1f2937;
    border-color: #374151;
}

body.dark .zodiac-name {
    color: #e5e7eb;
}

body.dark .year-table td {
    color: #d1d5db;
}

body.dark .relation-table td {
    color: #d1d5db;
}

body.dark .relation-good {
    background: #14532d;
    color: #86efac;
    border-color: #166534;
}

body.dark .relation-bad {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

body.dark .table-note {
    color: #9ca3af;
}
