/* P-Link主题样式 - Bootstrap兼容 - 全局美化 */

/* 全局样式 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f1c40f;
    --info-color: #3498db;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

a {
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* 美化按钮 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-light:hover {
    color: var(--primary-color);
}

/* 美化卡片 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 页眉样式 */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: var(--box-shadow);
    margin-bottom: 1rem;
}

.site-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.navbar-brand .site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.navbar-brand .site-title a {
    color: white;
    text-decoration: none;
}

.navbar-brand .site-description {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
}

/* 美化导航菜单 */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin: 0 0.125rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .active > .nav-link,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
}

.dropdown-item:active,
.dropdown-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-dark);
}

/* 列表组 */
.list-group-item {
    border: none;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.list-group-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.list-group-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 表单控件美化 */
.form-control,
.form-select {
    border: 1px solid #dfe6e9;
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 文章块 */
article {
    margin-bottom: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

article:hover {
    box-shadow: var(--box-shadow-lg);
}

.entry-title {
    margin-top: 0;
    margin-bottom: 15px;
}

.entry-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.entry-content {
    margin-bottom: 15px;
}

.entry-footer {
    font-size: 0.9rem;
    color: var(--gray-color);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
}

/* 侧边栏 */
.widget-area {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.widget-area:hover {
    box-shadow: var(--box-shadow-lg);
}

.widget {
    margin-bottom: 25px;
}

.widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
    color: var(--dark-color);
}

/* 资源卡片样式增强 */
.resource-card {
    transition: var(--transition);
    border: none;
    box-shadow: var(--box-shadow);
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.resource-card .card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.resource-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.resource-card .card-title a {
    color: var(--dark-color);
    text-decoration: none;
}

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

.resource-thumbnail {
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.03);
    position: relative;
}

.resource-thumbnail img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.resource-card:hover .resource-thumbnail img {
    transform: scale(1.05);
}

.resource-excerpt {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: 0.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.resource-card .card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(0, 0, 0, 0.01);
    position: relative;
    z-index: 2;
}

.disk-type {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray-color);
}

.resource-categories {
    position: relative;
    z-index: 2;
}

.resource-categories .badge {
    font-weight: 500;
    background-color: rgba(52, 152, 219, 0.15);
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
}

.resource-categories .badge:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 分页导航样式 */
.pagination-container .page-numbers {
    display: inline-flex;
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
    border-radius: var(--border-radius);
}

.pagination-container .page-numbers li {
    display: inline-block;
    margin: 0 2px;
}

.pagination-container .page-numbers a,
.pagination-container .page-numbers span {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--primary-color);
    background-color: #fff;
    border: 1px solid #dfe6e9;
    text-decoration: none;
    transition: var(--transition);
}

.pagination-container .page-numbers a:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-dark);
    z-index: 2;
}

.pagination-container .page-numbers .current {
    z-index: 3;
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 美化搜索框 */
.resource-search .input-group {
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.resource-search .form-control {
    border-right: none;
}

.resource-search .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 评论区域样式 */
.comments-area {
    margin-top: 30px;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list ol {
    list-style: none;
    margin-left: 30px;
    padding: 0;
}

.comment-body {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-meta {
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: var(--dark-color);
}

.comment-author .avatar {
    float: left;
    margin-right: 15px;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 5px;
}

.comment-content {
    clear: both;
    margin-top: 15px;
}

.comment-respond {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 15px;
    border: 1px solid #dfe6e9;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.comment-form .form-submit {
    margin-top: 15px;
}

.no-comments {
    margin-top: 20px;
    font-style: italic;
    color: var(--gray-color);
}

/* 用户中心增强样式 */
.user-avatar img {
    box-shadow: var(--box-shadow);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.user-avatar img:hover {
    transform: scale(1.05);
}

.stat-card {
    transition: var(--transition);
    background-color: #fff;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

/* 网盘图标 */
.disk-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.disk-baidu {
    background-image: url('../images/baidu.svg');
}

.disk-aliyun {
    background-image: url('../images/aliyun.svg');
}

.disk-quark {
    background-image: url('../images/quark.svg');
}

.disk-xunlei {
    background-image: url('../images/xunlei.svg');
}

.disk-oneonefive {
    background-image: url('../images/115.svg');
}

.disk-uc {
    background-image: url('../images/uc.svg');
}

.disk-magnet {
    background-image: url('../images/magnet.svg');
}

.disk-unknown {
    background-image: url('../images/unknown.svg');
}

.disk-alist {
    background-image: url('../images/alist.svg');
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .navbar-dark .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem;
        z-index: 1000;
        box-shadow: var(--box-shadow-lg);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .site-branding {
        flex-direction: row;
        align-items: center;
    }
    
    .site-branding .site-description {
        display: none;
    }
    
    .navbar-nav .dropdown-menu {
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
    }
    
    .navbar-nav .dropdown-item:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* 底部样式 - 极简版 */
.site-footer {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-copyright {
    font-size: 0.9rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover, .back-to-top:focus {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
} 