/* ========================================
   多站点下载平台 - 全局样式
   ======================================== */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f5f5f5;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-hover-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 全局样式 */
body {
    background-color: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: #0a58ca;
}

/* ... existing code ... */
/* 导航栏 */
.navbar {
    box-shadow: var(--card-shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav {
    flex-wrap: nowrap;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.6rem !important;
    white-space: nowrap;
    font-size: 0.875rem;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.25rem;
}
/* ... existing code ... */

/* 搜索框 */
.search-form .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
}

.search-form .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.card-title a {
    color: var(--dark-color);
}

.card-title a:hover {
    color: var(--primary-color);
}

/* 内容列表项 */
.content-item {
    transition: transform 0.2s ease;
}

.content-item:hover {
    transform: translateY(-3px);
}

.content-item .card-img-top {
    object-fit: cover;
    height: 180px;
}

/* 列表组样式 */
.list-group-item {
    border-left: none;
    border-right: none;
    transition: background-color 0.15s ease;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:hover {
    background-color: var(--light-color);
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--dark-color);
    border-color: #dee2e6;
}

.page-link:hover {
    background-color: var(--light-color);
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 标签样式 */
.tag-cloud .badge {
    font-weight: normal;
    margin: 0.125rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tag-cloud .badge:hover {
    transform: scale(1.1);
}

/* 侧边栏 */
.sidebar .card {
    margin-bottom: 1rem;
}

.sidebar .card-header {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.sidebar .list-group-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 下载信息 */
.download-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.download-info .btn-download {
    background-color: #fff;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-info .btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

/* 面包屑 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* 详情页 */
.detail-content {
    line-height: 1.8;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.detail-content p {
    margin-bottom: 1rem;
}

/* 相关推荐 */
.related-item {
    transition: transform 0.2s ease;
}

.related-item:hover {
    transform: translateX(5px);
}

/* 页脚 */
.footer {
    background-color: var(--footer-bg, var(--dark-color));
    color: rgba(255,255,255,0.7);
    padding: 2rem 0;
}

.footer .text-muted {
    color: rgba(255,255,255,0.55) !important;
}

.footer h5,
.footer h6 {
    color: rgba(255,255,255,0.9);
}

.footer a,
.footer a.text-muted {
    color: rgba(255,255,255,0.65) !important;
}

.footer a:hover,
.footer a.text-muted:hover {
    color: #fff !important;
}

.footer hr {
    border-color: rgba(255,255,255,0.15);
}

.footer-links a {
    margin-right: 1rem;
}

/* 搜索结果高亮 */
mark {
    background-color: #fff3cd;
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .content-item .card-img-top {
        height: 150px;
    }
    
    .download-info {
        padding: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* ========================================
   导航栏用户按钮优化
   ======================================== */
.user-nav-btn {
    padding: 0.35rem 0.75rem !important;
    border-radius: 2rem;
    background-color: #eef2ff;
    border: 1.5px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    transition: all 0.25s ease;
}

.user-nav-btn:hover,
.user-nav-btn:focus {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.35);
}

.user-nav-btn img {
    border: 2px solid #fff;
    transition: border-color 0.25s ease;
}

.user-nav-btn:hover img {
    border-color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   登录按钮样式
   ======================================== */
.btn-login {
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transition: all 0.25s ease;
}

.btn-login:hover {
    opacity: 0.9;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   需求大厅链接基础样式
   ======================================== */
.demand-hall-link {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.35rem 0.75rem !important;
    border-radius: 2rem;
    border: 1.5px solid transparent;
    transition: all 0.25s ease;
}

.demand-hall-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ========================================
   深色导航栏适配（navbar-dark）
   适用于 movie、music 等深色背景导航
   ======================================== */
.navbar-dark .user-nav-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
}

.navbar-dark .user-nav-btn:hover,
.navbar-dark .user-nav-btn:focus {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: #fff !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-dark .user-nav-btn img {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-dark .user-nav-btn:hover img {
    border-color: rgba(0, 0, 0, 0.2);
}

.navbar-dark .demand-hall-link {
    color: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-dark .demand-hall-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-dark .btn-login {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.navbar-dark .btn-login:hover {
    background-color: #fff;
    border-color: #fff;
    color: #333;
}

/* ========================================
   用户中心布局
   ======================================== */
.uc-layout {
    display: flex;
    gap: 24px;
    max-width: 1140px;
    margin: 24px auto;
    padding: 0 15px;
}

.uc-layout .uc-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.uc-layout .uc-content {
    flex: 1;
    min-width: 0;
}

/* 侧边栏样式 */
.uc-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.uc-sidebar-profile {
    text-align: center;
    padding: 24px 16px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.uc-sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.uc-sidebar-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.uc-sidebar-points {
    font-size: 13px;
    opacity: 0.9;
}

/* 菜单 */
.uc-sidebar-menu {
    padding: 8px 0;
}

.uc-menu-group {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px 4px;
}

.uc-sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.uc-sidebar-menu a:hover {
    background-color: #f5f7fa;
    color: var(--primary-color);
}

.uc-sidebar-menu a.active {
    background-color: #eef2ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.uc-sidebar-menu a i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 14px;
}

.uc-menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 16px;
}

.uc-menu-logout {
    color: #dc3545 !important;
}

.uc-menu-logout:hover {
    background-color: #fff5f5 !important;
    color: #dc3545 !important;
}

/* 用户中心内容区域 */
.uc-content .uc-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.uc-content .uc-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

/* 用户中心表格 */
.uc-content table {
    width: 100%;
    border-collapse: collapse;
}

.uc-content table th,
.uc-content table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.uc-content table th {
    color: #999;
    font-weight: 500;
    font-size: 13px;
    background: #fafafa;
}

/* 用户中心列表项 */
.uc-item {
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}

.uc-item:last-child {
    border-bottom: none;
}

.uc-item-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.uc-item-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 用户中心状态标签 */
.uc-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.uc-status-info { background: #e3f2fd; color: #1976d2; }
.uc-status-warning { background: #fff7e6; color: #fa8c16; }
.uc-status-success { background: #f6ffed; color: #52c41a; }
.uc-status-danger { background: #fff2f0; color: #ff4d4f; }
.uc-status-muted { background: #f5f5f5; color: #616161; }

/* 用户中心分页 */
.uc-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.uc-pagination a,
.uc-pagination span {
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    background: #f0f0f0;
    color: #333;
    font-size: 13px;
    transition: all 0.2s;
}

.uc-pagination a:hover {
    background: #e0e0e0;
}

.uc-pagination .current,
.uc-pagination a.active {
    background: var(--primary-color);
    color: white;
}

/* 空状态 */
.uc-empty {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
}

.uc-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

/* 积分卡片 */
.uc-points-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.uc-point-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.uc-point-item .value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.uc-point-item .label {
    font-size: 12px;
    opacity: 0.9;
}

/* 消息提示 */
.uc-msg {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.uc-msg.error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.uc-msg.success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

/* 表单样式 */
.uc-form-group {
    margin-bottom: 16px;
}

.uc-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.uc-form-group label .required {
    color: #ff4d4f;
}

.uc-form-group input,
.uc-form-group select,
.uc-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.uc-form-group input:focus,
.uc-form-group select:focus,
.uc-form-group textarea:focus {
    border-color: var(--primary-color);
}

.uc-form-group .hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 用户中心按钮 */
.uc-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.uc-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.uc-btn-primary:hover {
    opacity: 0.9;
    color: #fff;
}

.uc-btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* 移动端侧边栏展开/收起按钮 */
.uc-sidebar-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    margin-bottom: 12px;
    text-align: left;
}

.uc-sidebar-toggle i {
    margin-right: 8px;
}

.uc-sidebar-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    float: right;
}

.uc-sidebar-toggle.collapsed::after {
    content: '\f106';
}

/* 移动端响应式 */
@media (max-width: 767.98px) {
    .uc-layout {
        flex-direction: column;
        gap: 0;
        padding: 0 10px;
        margin: 12px auto;
    }

    .uc-layout .uc-sidebar {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .uc-sidebar-toggle {
        display: block;
    }

    .uc-sidebar.collapsed .uc-sidebar-profile,
    .uc-sidebar.collapsed .uc-sidebar-menu {
        display: none;
    }

    .uc-points-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .uc-content .uc-card {
        padding: 16px;
        border-radius: 8px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .uc-layout .uc-sidebar {
        width: 200px;
    }

    .uc-points-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 暗色模式支持 (可选) */
@media (prefers-color-scheme: dark) {
    /* 如需支持暗色模式，在这里添加样式 */
}
