/* 自定义样式文件 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

h4 a{
    text-decoration: none;
    font-size: 16px;
}

.hero-section .lead {
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
}

/* 分类卡片样式 */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.category-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* 列表组样式 */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.3s ease;
    border-radius: 0 !important;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

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

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
    text-decoration: none;
}

/* 头像样式 */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

/* 问题卡片样式 */
.question-list .card {
    transition: all 0.3s ease;
}

.question-list .card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.question-list .card-body {
    padding: 1.25rem;
}

/* 投票按钮样式 */
.btn-link {
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-link:hover {
    transform: none;
}

.btn-link.text-success:hover {
    color: #155724 !important;
}

.btn-link.text-muted:hover {
    color: #6c757d !important;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 20px 0;
    margin: 0;
    gap: 5px;
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.2;
}

/* 正常页码悬停效果 */
.pagination li a:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 当前页样式 */
.pagination li.active span {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 600;
}

/* 禁用状态样式 */
.pagination li.disabled span {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 省略号样式 */
.pagination li.disabled span:contains("...") {
    background-color: transparent;
    border: none;
    padding: 8px 8px;
}

/* 上一页/下一页特殊样式 */
.pagination li:first-child a,
.pagination li:first-child span,
.pagination li:last-child a,
.pagination li:last-child span {
    padding: 8px 12px;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }

    .pagination li a,
    .pagination li span {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* 在小屏幕上隐藏部分页码 */
    .pagination li:nth-child(n+6):nth-last-child(n+6) {
        display: none;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .pagination li a,
    .pagination li span {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .pagination li a:hover {
        background-color: #4a5568;
        border-color: #718096;
    }

    .pagination li.active span {
        background-color: #3182ce;
        border-color: #3182ce;
    }

    .pagination li.disabled span {
        background-color: #1a202c;
        border-color: #2d3748;
        color: #a0aec0;
    }
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 导航标签样式 */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #007bff;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    background-color: white;
    border-bottom: 2px solid #007bff;
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

footer h6 {
    color: #fff;
    font-weight: 600;
}

footer p {
    color: #adb5bd !important;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer a.text-light:hover {
    color: #fff !important;
    text-decoration: none;
}

footer a.text-muted:hover {
    color: #adb5bd !important;
    text-decoration: underline;
}

/* 友情链接样式 */
footer .d-flex.justify-content-center a.text-muted {
    transition: color 0.3s ease;
}

footer .d-flex.justify-content-center a.text-muted:hover {
    color: #fff !important;
    text-decoration: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    /* 页脚友情链接响应式 */
    footer .d-flex.justify-content-center {
        flex-direction: column !important;
        align-items: center !important;
    }

    footer .d-flex.justify-content-center a.text-muted {
        margin-right: 0 !important;
        margin-bottom: 0.5rem !important;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* 搜索框样式 */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* 统计数字样式 */
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
