/* 财税小工具 - 公共样式 */

/* 基础样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --ocean-color: #006994;
    --tobacco-color: #795548;
    --purple-color: #6f42c1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* 主横幅 */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    padding: 60px 0;
    min-height: 300px;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 15px 25px;
}

.search-box input:focus {
    box-shadow: none;
}

.search-box button {
    padding: 15px 25px;
    border-radius: 0;
}

/* 统计数据 */
.stats-section {
    border-bottom: 1px solid #dee2e6;
}

.stat-item h2 {
    font-weight: 700;
    font-size: 2rem;
}

/* 区块标题 */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #dee2e6;
}

.section-title i {
    margin-right: 0.5rem;
}

/* 分类标题 */
.category-title {
    margin: 2rem 0 1rem;
}

.category-title .badge {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5em 1em;
}

/* 计算器卡片 */
.calculator-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.calculator-card.hot {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #ffc107, #ff6b6b) border-box;
}

.calculator-card .card-body {
    padding: 1.5rem;
}

.calculator-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.calculator-card .card-text {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 卡片图标 */
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon i {
    font-size: 1.75rem;
    color: white;
}

.card-icon-sm {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon-sm i {
    font-size: 1.25rem;
    color: white;
}

/* 图标背景色 */
.bg-ocean {
    background: linear-gradient(135deg, #006994 0%, #004d6e 100%) !important;
}

.bg-tobacco {
    background: linear-gradient(135deg, #795548 0%, #5d4037 100%) !important;
}

.bg-purple {
    background-color: var(--purple-color) !important;
}

/* 按钮样式 */
.btn-ocean {
    background: linear-gradient(135deg, #006994 0%, #004d6e 100%);
    border: none;
    color: white;
}

.btn-ocean:hover {
    background: linear-gradient(135deg, #004d6e 0%, #003652 100%);
    color: white;
}

.btn-tobacco {
    background: linear-gradient(135deg, #795548 0%, #5d4037 100%);
    border: none;
    color: white;
}

.btn-tobacco:hover {
    background: linear-gradient(135deg, #5d4037 0%, #3e2723 100%);
    color: white;
}

/* 筛选按钮 */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-buttons .btn {
    border-radius: 20px;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.filter-buttons .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 分类区块 */
.category-section {
    margin-bottom: 2rem;
}

/* 搜索无结果提示 */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 回到顶部按钮 */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-back-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 页脚 */
footer {
    border-top: 3px solid var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
        min-height: auto;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .stat-item h2 {
        font-size: 1.5rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-card {
    animation: fadeInUp 0.5s ease-out;
}

/* 隐藏的元素 */
.hidden {
    display: none !important;
}
