/*
Theme Name: P-Link
Theme URI: https://example.com/p-link/
Author: Your Name
Author URI: https://example.com/
Description: P-Link是一个专为管理网盘资源链接而设计的WordPress主题，允许用户在前端批量上传资源链接，自动识别资源链接所属网盘类型，提供API接口，支持积分购买等功能。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: p-link
Tags: network-disk, resource-management, user-upload, api
*/

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    text-decoration: none;
    color: #3498db;
}

a:hover {
    color: #2980b9;
}

/* 资源卡片优化样式 */
.resource-card {
    transition: all 0.3s ease;
    height: 100%;
    border: none;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15) !important;
}

/* 资源卡片图片和覆盖层 */
.resource-banner {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.resource-banner img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.resource-card:hover .resource-banner img {
    transform: scale(1.08);
}

.resource-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

/* 资源状态栏样式 */
.resource-status-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.85rem;
}

.disk-type-badge {
    font-weight: 500;
}

.disk-icon {
    font-size: 1.1rem;
    color: #4a6cf7;
}

.disk-name {
    color: #555;
}

/* 可见性标签样式 */
.visibility-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
}

.visibility-public {
    background-color: rgba(25, 135, 84, 0.15);
    color: #198754;
}

.visibility-private {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.visibility-paid {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

/* 资源卡片内容样式 */
.resource-card .card-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem;
}

.category-tag {
    display: inline-block;
    background-color: #eef2ff;
    color: #4a6cf7;
    padding: 0.15rem 0.5rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background-color: #4a6cf7;
    color: #fff;
    text-decoration: none;
}

.resource-excerpt {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

/* 资源卡片底部信息 */
.resource-meta {
    width: 100%;
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.meta-date, .meta-views {
    display: flex;
    align-items: center;
}

.meta-date i, .meta-views i {
    margin-right: 0.25rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.action-buttons .btn-primary {
    background-color: #4a6cf7;
    border-color: #4a6cf7;
}

.action-buttons .btn-primary:hover {
    background-color: #3a5bd9;
    border-color: #3a5bd9;
}

.card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.resource-card .btn, 
.resource-card .category-tag {
    position: relative;
    z-index: 2;
}

/* 首页资源卡片优化 */
@media (min-width: 992px) {
    .row-cols-lg-4 > .col .resource-card {
        font-size: 0.9rem;
    }
    
    .row-cols-lg-4 > .col .card-title {
        font-size: 1rem;
    }
    
    .row-cols-lg-4 > .col .resource-excerpt {
        font-size: 0.85rem;
    }
}

/* API卡片市场风格 */
.api-card {
    transition: all 0.3s ease;
    border: none;
}

.api-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

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

.api-provider-avatar img {
    width: 42px;
    height: 42px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.api-label {
    display: inline-block;
    font-size: 0.7rem;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.api-description-wrapper {
    height: 4.5em;
    overflow: hidden;
    position: relative;
}

.api-description {
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #495057;
}

.api-stats {
    background-color: #f8f9fa;
    border-radius: 6px;
}

.stat-value {
    font-size: 1.1rem;
    color: #0d6efd;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.15);
}

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.15);
}

.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-primary {
    color: #0d6efd !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* 按钮悬停效果 */
.api-card .btn {
    transition: all 0.2s ease;
}

.api-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.api-card .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.api-card .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.api-card .btn-success {
    background-color: #198754;
    border-color: #198754;
}

/* 网盘图标样式 */
.disk-baidu::before {
    content: "\f413"; /* bootstrap bi-cloud-fill */
    color: #2b5adf;
}

.disk-aliyun::before {
    content: "\f413";
    color: #ff6a00;
}

.disk-quark::before {
    content: "\f413";
    color: #12c2e9;
}

.disk-xunlei::before {
    content: "\f413";
    color: #0c73c2;
}

.disk-tencent::before {
    content: "\f413";
    color: #12b7f5;
}

.disk-oneonefive::before {
    content: "\f4f6"; /* bootstrap bi-hdd-fill */
    color: #2777dc;
}

.disk-uc::before {
    content: "\f413";
    color: #ff6700;
}

.disk-teambition::before {
    content: "\f413";
    color: #2483d1;
}

.disk-lanzou::before {
    content: "\f413";
    color: #0052d9;
}

.disk-magnet::before {
    content: "\f312"; /* bootstrap bi-magnet */
    color: #fd7e14;
}

.disk-onedrive::before {
    content: "\f413";
    color: #0078d4;
}

.disk-google::before {
    content: "\f413";
    color: #4285f4;
}

.disk-alist::before {
    content: "\f0a3"; /* bootstrap bi-box */
    color: #21ba45;
}

.disk-unknown::before {
    content: "\f413";
    color: #6c757d;
}

.disk-icon::before {
    font-family: "bootstrap-icons" !important;
    font-size: 1rem;
    margin-right: 0.25rem;
} 