/* 智涯千问LawMate AI样式 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #2b3340;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 12px rgba(8, 55, 135, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.navbar-nav .nav-link.active {
    font-weight: 600;
}

/* 英雄区 */
.law-hero {
    background: radial-gradient(circle at top left, rgba(13, 110, 253, 0.8), rgba(13, 110, 253, 0.45)), #0d6efd;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.law-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 360px;
    height: 360px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.law-hero::before {
    content: "";
    position: absolute;
    left: -80px;
    bottom: -120px;
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.law-hero .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.law-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.25rem 0 1rem 0;
}

.law-hero .hero-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 640px;
    opacity: 0.9;
}

.hero-metrics {
    margin-top: 1.75rem;
    gap: 1.75rem;
}

.hero-headline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-headline .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    width: fit-content;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: center;
    width: 100%;
}

.hero-search .input-group {
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(13, 110, 253, 0.15);
}

.hero-category-group {
    gap: 0.65rem;
}

.hero-category-btn {
    padding: 0.55rem 1.6rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-category-btn.active,
.hero-category-btn:hover {
    background: #fff;
    color: #0d6efd;
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.25);
    border-color: transparent;
}

.hero-categories .btn {
    margin: 0.35rem 0.45rem 0 0;
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
    border-width: 1.5px;
    display: none;
}

.hero-categories .btn.active,
.hero-categories .btn:hover {
    background: #0d6efd;
    color: #fff;
}

.category-label {
    font-weight: 600;
    color: #0d2a6b;
}

.hero-quick-links {
    display: grid;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.quick-link-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: inherit;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 42px rgba(13, 110, 253, 0.12);
}

.quick-link-card.active {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 18px 48px rgba(13, 110, 253, 0.18);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.quick-link-card h6 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: #10224c;
}

.quick-link-card p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.metric-label {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
}

.hero-illustration {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 搜索与分类 */
.search-filter-section {
    margin-top: -2.5rem;
    padding-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.search-bar-wrapper {
    max-width: 780px;
    margin: 0 auto;
}

.search-filter-section .input-group {
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(13, 110, 253, 0.15);
}

.search-filter-section .input-group .form-control {
    border: none;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

.search-filter-section .input-group .form-control:focus {
    box-shadow: none;
}

.search-filter-section .btn {
    border-radius: 999px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
}

.category-filter-wrapper {
    margin-top: 2.5rem;
    background: #ffffff;
    border-radius: 24px;
    padding: 1.75rem 2rem;
    box-shadow: 0 12px 40px rgba(15, 60, 120, 0.08);
}

.filter-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0d2a6b;
}

.filter-desc {
    font-size: 0.9rem;
    color: #6c7a92;
    margin-top: 0.35rem;
}

#categoryFilter .btn {
    margin: 0.35rem 0.45rem 0 0;
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
    border-width: 1.5px;
}

#categoryFilter .btn.active,
#categoryFilter .btn:hover {
    background: #0d6efd;
    color: #fff;
}

/* 场景推荐 */
.scenarios-section {
    padding: 2.5rem 0 0 0;
}

.scenario-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.scenario-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 42px rgba(13, 110, 253, 0.15);
}

.scenario-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.scenario-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.scenario-card p {
    font-size: 0.9rem;
    color: #4c5670;
    line-height: 1.6;
}

/* 智能体列表区 */
.agents-section {
    padding: 2.5rem 0 4rem 0;
}

.section-header {
    margin-bottom: 2rem !important;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #142047;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #6c7a92;
    margin: 0;
}

.section-action .btn {
    border-radius: 999px;
    font-weight: 500;
}

.scene-selector {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 12px 32px rgba(17, 53, 110, 0.08);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.scene-selector-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.scene-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #142047;
}

.scene-desc {
    font-size: 0.9rem;
    color: #6c7a92;
}

.scene-category-group {
    gap: 0.65rem;
}

.scene-category-btn {
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    border: 1.5px solid rgba(13, 110, 253, 0.15);
    background: #f1f5ff;
    color: #0d3d91;
    font-weight: 500;
    transition: all 0.3s ease;
}

.scene-category-btn:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 10px 26px rgba(13, 110, 253, 0.18);
}

.scene-category-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.24);
}

/* 智能体卡片样式 */
.agent-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 18px 45px rgba(12, 56, 120, 0.12);
    background: #fff;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 55px rgba(12, 56, 120, 0.18);
}

.agent-card .card-img-container {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(0, 36, 120, 0.08));
}

.agent-card .card-img-top {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-card .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-card .card-icon {
    font-size: 3.5rem;
    color: #6c757d;
}

.agent-card .card-body {
    padding: 1.25rem;
}

.agent-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    line-height: 1.4;
}

.agent-card .card-stats {
    margin-bottom: 0.5rem;
}

.agent-card .card-footer {
    padding: 0 1.25rem 1.25rem;
}

.agent-card .btn-group {
    border-radius: 6px;
    overflow: hidden;
}

.agent-card .btn-group .btn {
    border-radius: 0;
}

.agent-card .btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.agent-card .btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.agent-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0d6efd;
}

.agent-price .subscription-type {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6c757d;
}

.agent-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.agent-rating .bi-star-fill {
    color: #ffc107;
}

.agent-rating .bi-star {
    color: #dee2e6;
}

.agent-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 1rem;
    font-size: 0.75rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* 智能体详情模态框样式 */
.agent-detail-icon {
    font-size: 5rem;
    color: #6c757d;
    margin-bottom: 1rem;
    text-align: center;
}

.agent-detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.agent-detail-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d6efd;
    text-align: center;
    margin-bottom: 1rem;
}

.agent-detail-description {
    margin-bottom: 1.5rem;
}

.agent-detail-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.agent-detail-stat {
    text-align: center;
}

.agent-detail-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.agent-detail-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .agent-card .card-img-container {
        height: 140px;
    }
    
    .agent-card .card-title {
        font-size: 1rem;
    }
    
    .agent-card .card-text {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .agent-card .agent-rating {
        font-size: 0.8rem;
    }
    
    .agent-detail-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .agent-card .card-img-container {
        height: 120px;
    }
    
    .agent-card .card-title {
        font-size: 0.95rem;
    }
    
    .agent-card .card-text {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    .agent-card .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* 加载动画 */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* 空数据提示样式 */
.empty-data {
    text-align: center;
    padding: 3rem 0;
}

.empty-data i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* Toast提示样式 */
.toast {
    min-width: 250px;
}

/* 订阅按钮样式 */
.btn-subscribe {
    background: linear-gradient(45deg, #0d6efd, #0056b3);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-subscribe:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
}

/* 搜索框样式 */
.input-group {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    overflow: hidden;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 分页样式 */
.pagination .page-link {
    color: #0d6efd;
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 智能体来源标识 */
.agent-source {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agent-source.external {
    color: #198754;
}

.agent-source.internal {
    color: #0d6efd;
}

/* 价格标签 */
.price-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 评分星星样式 */
.agent-rating {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.agent-rating .bi-star-fill {
    color: #ffc107;
    font-size: 0.85rem;
}

.agent-rating .bi-star-half {
    color: #ffc107;
    font-size: 0.85rem;
}

.agent-rating .bi-star {
    color: #dee2e6;
    font-size: 0.85rem;
}

.agent-rating span {
    margin-left: 0.25rem;
    font-size: 0.8rem;
}

/* 智能体分类标签 */
.agent-category {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 1rem;
    font-size: 0.7rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* 特殊标签 */
.special-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 卡片悬停效果 */
.agent-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.agent-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay-text {
    text-align: center;
    padding: 1rem;
}

.card-overlay-text h5 {
    margin-bottom: 1rem;
}

.card-overlay-text p {
    margin-bottom: 1.5rem;
}

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

.law-hero,
.category-filter-wrapper,
.scenario-card,
.agent-card {
    animation: fadeIn 0.6s ease forwards;
}

/* 响应式网格调整 */
@media (max-width: 576px) {
    .agent-card .card-title {
        font-size: 1.1rem;
    }
    
    .agent-card .card-text {
        font-size: 0.85rem;
    }
    
    .agent-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .law-hero {
        text-align: center;
    }

    .law-hero::before,
    .law-hero::after {
        display: none;
    }

    .hero-metrics {
        justify-content: center;
    }

    .search-filter-section {
        margin-top: -1.5rem;
        padding: 0 1rem;
    }

    .category-filter-wrapper {
        border-radius: 18px;
    }

    .scenarios-section {
        padding-top: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
}