/* ======= 生肖查询计算器样式 ======= */

.tool-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}

.tool-title-wrapper i {
    font-size: 2rem;
    color: var(--primary-color);
}

.tool-title-wrapper .tool-title {
    margin-bottom: 0;
    border-bottom: none;
}

/* 查询模式切换 */
.sx-mode-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.sx-mode-option,
.sx-caliber-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--bg-white);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.sx-mode-option:hover,
.sx-caliber-option:hover {
    border-color: var(--primary-color);
}

.sx-mode-option input,
.sx-caliber-option input {
    accent-color: var(--primary-color);
}

.sx-mode-option:has(input:checked),
.sx-caliber-option:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* 输入区 */
.sx-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sx-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sx-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.sx-field input.form-input {
    font-size: 18px;
    font-weight: 600;
    padding: 12px 14px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.sx-field-wide {
    display: none;
}

.sx-input-row.mode-date .sx-field-wide {
    display: flex;
}

.sx-input-row.mode-date .sx-field-year-only {
    display: none;
}

/* 口径选择 */
.sx-caliber-row {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.sx-caliber-row > .sx-label {
    padding-top: 10px;
}

.sx-caliber-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sx-caliber-option {
    padding: 8px 12px;
    font-size: 13px;
}

/* 错误提示 */
.error-tip {
    min-height: 20px;
    margin: 4px 0 2px;
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* 结果区 */
.sx-result {
    margin-top: 10px;
    text-align: center;
}

.sx-main-card {
    padding: 22px 16px;
    background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%);
    border: 1px solid #ffe7ba;
    border-radius: var(--radius-md);
}

.sx-emoji {
    font-size: 58px;
    line-height: 1.1;
}

.sx-animal {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.sx-sub {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 16px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
}

.sx-stats {
    grid-template-columns: repeat(4, 1fr);
}

.stat-box {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.stat-box .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.25;
}

.stat-box .stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.sx-note {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.6;
}

.lc-result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* 年份对照表 */
.sx-year-table td {
    font-size: 14px;
}

.sx-year-table td:first-child {
    font-weight: 700;
}

/* 暗色模式 */
[data-theme="dark"] .sx-main-card {
    background: linear-gradient(135deg, rgba(250, 173, 20, 0.12) 0%, transparent 100%);
    border-color: rgba(250, 173, 20, 0.25);
}

[data-theme="dark"] .sx-mode-option,
[data-theme="dark"] .sx-caliber-option {
    background: var(--bg-secondary);
}

[data-theme="dark"] .stat-box,
[data-theme="dark"] .sx-note {
    background: var(--bg-secondary);
}

/* 响应式 */
@media (max-width: 640px) {
    .sx-input-row {
        grid-template-columns: 1fr;
    }

    .sx-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
