/* 自定义样式 */
:root {
    --primary-color: #1e90ff; /* 蓝色主色调 */
    --secondary-color: #f0f8ff; /* 浅蓝色 */
    --dark-primary: #0066cc; /* 深蓝色 */
    --top-panel-color: #007bff; /* 顶部面板蓝色 */
    --taobao-color: #ff5000; /* 淘宝橘色 */
    --taobao-hover: #e04500; /* 淘宝橘色悬停 */
    --taobao-light: #fff5f0; /* 淘宝橘色浅色 */
    --taobao-active: #ffeee6; /* 淘宝橘色激活状态 */
}

body {
    background-color: #f8f9fa;
}

.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand, .nav-link {
    color: white !important;
}

.navbar-brand:hover, .nav-link:hover {
    color: var(--secondary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--dark-primary);
    border-color: var(--dark-primary);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* 淘宝橘色主题按钮 */
.btn-taobao {
    background-color: var(--taobao-color);
    border-color: var(--taobao-color);
    color: white;
}

.btn-taobao:hover {
    background-color: var(--taobao-hover);
    border-color: var(--taobao-hover);
    color: white;
}

.btn-outline-taobao {
    color: var(--taobao-color);
    border-color: var(--taobao-color);
}

.btn-outline-taobao:hover {
    background-color: var(--taobao-color);
    border-color: var(--taobao-color);
    color: white;
}

.bg-taobao {
    background-color: var(--taobao-color) !important;
}

.text-taobao {
    color: var(--taobao-color) !important;
}

/* 淘宝商城横幅样式 */
.bg-taobao-banner {
    background: linear-gradient(135deg, var(--taobao-color), #ff7a33);
    border: none;
    box-shadow: 0 4px 8px rgba(255, 80, 0, 0.2);
}

.bg-taobao-banner .card-title,
.bg-taobao-banner .card-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    color: white;
}

.bg-taobao-banner .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    color: var(--taobao-color);
    font-weight: bold;
}

.bg-taobao-banner .btn-light:hover {
    background-color: white;
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 分类链接样式 */
.category-link {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    color: #495057;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

/* 分类链接激活状态 */
.category-link.active {
    background: linear-gradient(90deg, var(--taobao-active) 0%, #ffffff 100%);
    border-left: 3px solid var(--taobao-color);
    color: var(--taobao-color);
    font-weight: bold;
    box-shadow: 2px 0 5px rgba(255, 80, 0, 0.1);
}

/* 分类链接悬停效果 */
.category-link:hover {
    background: linear-gradient(90deg, var(--taobao-light) 0%, #ffffff 100%);
    color: var(--taobao-hover);
    border-left: 3px solid #ffb380;
}

/* 淘宝等级badge */
.badge.bg-taobao-level {
    background-color: #ff6a00 !important;
    color: white !important;
}

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.footer h5 {
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* 备案信息样式 */
.footer .beian-info {
    font-size: 0.9rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer .beian-info a {
    color: #e6f0ff;
    text-decoration: underline;
}

.footer .beian-info a:hover {
    color: white;
    text-decoration: none;
}

.footer-divider {
    height: 1px;
    background-color: rgba(0,0,0,0.1);
    margin: 20px 0;
}

.resource-card {
    transition: transform 0.2s;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1rem;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.badge {
    font-size: 0.75em;
}

.card {
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 资源详情页样式 */
.resource-detail-card {
    border-left: 4px solid var(--primary-color);
}

/* 资源提交表单样式 */
.submit-form-card {
    border-left: 4px solid var(--primary-color);
}

/* 搜索结果样式 */
.search-result-item {
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 分页样式 */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-link:hover {
    color: var(--dark-primary);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 144, 255, 0.25);
}

/* 页脚内容居中 */
.footer .col-md-6 {
    text-align: center;
}

/* 分割线样式 */
hr.my-5 {
    border-top: 1px solid rgba(0,0,0,0.1);
    width: 80%;
    margin: 2rem auto;
}

/* 登录注册按钮区域样式 */
.login-register-buttons {
    background: linear-gradient(135deg, #f0f8ff, #e6f2ff);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: inline-block;
}

.login-register-buttons .btn {
    min-width: 120px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-register-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.login-register-buttons .btn-outline-primary {
    background-color: white;
}

.login-register-buttons .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 登录注册卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    border: none;
    padding: 0.75rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* 个人中心样式 */
.profile-info {
    padding: 20px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #333;
}

.info-item span {
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
}

/* 资源详情页布局优化 */
.resource-info-section {
    display: block;
}

.basic-info {
    margin-bottom: 1.5rem;
}

.basic-info p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* 网盘类型样式优化 */
.basic-info .badge {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.qrcode-section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrcode-area {
    width: 100%;
    max-width: 400px;
}

/* 二维码头部样式 */
.qrcode-header {
    margin-bottom: 1rem;
}

.netdisk-type-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.netdisk-type-hint .badge {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.code-area {
    width: 100%;
    max-width: 400px;
}

@media (max-width: 768px) {
    .qrcode-area,
    .code-area {
        max-width: 100%;
    }
}

/* 页面布局优化 */
.container-detail,
.admin-settings-wrapper,
.admin-ad-settings-wrapper,
.admin-advertisements-wrapper,
.admin-statistics-wrapper {
    max-width: 100%;
}

/* 个人中心页面优化 */
.profile-container {
    max-width: 100%;
}

.profile-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: start;
}

.profile-main {
    min-width: 0;
}

.profile-sidebar {
    min-width: 0;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

/* 管理后台的 row 保持正常 */
.admin-statistics-wrapper .row {
    display: flex !important;
}

.profile-card {
    margin-bottom: 1rem !important;
}

.profile-card .card-body {
    padding: 1rem !important;
}

.profile-card .card-body p {
    margin-bottom: 0.5rem !important;
}

/* 卡片间距优化 */
.card.mb-4 {
    margin-bottom: 1rem !important;
}

.card.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* 标题间距优化 */
h2.mb-4 {
    margin-bottom: 1.5rem !important;
}

h5.mb-0 {
    margin-bottom: 0 !important;
}

/* 表单元素间距优化 */
.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* row 内边距优化 */
.row.mb-4 {
    margin-bottom: 1rem !important;
}