/**
 * 虚拟资料赚钱机 - 前端样式
 */

/* 基础样式 */
.vds-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 文档卡片 */
.vds-document-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.vds-document-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 文档缩略图 */
.vds-document-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.vds-document-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vds-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
}

.vds-thumb-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.vds-thumb-placeholder .vds-thumb-ext {
    font-size: 14px;
    font-weight: bold;
    opacity: 0.9;
}

.vds-thumb-placeholder a {
    color: #fff;
    text-decoration: none;
}

/* 文档信息 */
.vds-document-info {
    padding: 15px 0;
}

.vds-document-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vds-document-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.vds-document-meta span {
    margin-right: 15px;
}

/* 价格标签 */
.vds-price-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 4px;
    font-weight: 600;
}

.vds-price-tag.free {
    background: #d1fae5;
    color: #10b981;
}

.vds-price-tag.vip {
    background: #fef3c7;
    color: #f59e0b;
}

/* 购买按钮 */
.vds-buy-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.vds-buy-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.vds-buy-btn .dashicons {
    margin-right: 8px;
}

/* 下载按钮 */
.vds-download-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.vds-download-btn:hover {
    background: #059669;
}

/* 预览容器 */
.vds-preview-container {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.vds-preview-page {
    margin-bottom: 20px;
    text-align: center;
}

.vds-preview-page img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 用户面板 */
.vds-user-panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.vds-stat-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
}

.vds-stat-icon {
    width: 48px;
    height: 48px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.vds-stat-icon .dashicons {
    color: #fff;
    font-size: 24px;
}

.vds-stat-content {
    flex: 1;
}

.vds-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.vds-stat-label {
    font-size: 14px;
    color: #6b7280;
}

/* 分销面板 */
.vds-distribution-panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.vds-share-link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.vds-share-link-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #f9fafb;
}

.vds-copy-link-btn {
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 表格样式 */
.vds-table {
    width: 100%;
    border-collapse: collapse;
}

.vds-table th,
.vds-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.vds-table th {
    background: #f9fafb;
    font-weight: 600;
}

/* 状态标签 */
.vds-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.vds-status-paid {
    background: #d1fae5;
    color: #10b981;
}

.vds-status-pending {
    background: #fef3c7;
    color: #f59e0b;
}

.vds-status-failed {
    background: #fee2e2;
    color: #ef4444;
}

/* 空状态 */
.vds-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.vds-empty-state .dashicons {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.vds-empty-state p {
    color: #6b7280;
    margin-bottom: 20px;
}

/* 加载状态 */
.vds-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.vds-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: vds-spin 1s linear infinite;
}

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

/* 通知提示 */
.vds-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.vds-notice-success {
    background: #d1fae5;
    color: #10b981;
}

.vds-notice-error {
    background: #fee2e2;
    color: #ef4444;
}

.vds-notice-warning {
    background: #fef3c7;
    color: #f59e0b;
}

/* 弹窗 */
.vds-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.vds-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.vds-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.vds-modal-close {
    cursor: pointer;
    color: #6b7280;
}

/**  
 * Widget样式
 */
.vds-widget-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
}

.vds-widget-item {
    flex: 1 1 calc(25% - 15px);
    min-width: 200px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.vds-widget-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.vds-widget-thumb {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vds-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vds-widget-icon {
    color: #fff;
    text-decoration: none;
}

.vds-widget-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.vds-widget-info {
    padding: 10px 12px;
}

.vds-widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

.vds-widget-title:hover {
    color: #667eea;
}

.vds-widget-meta {
    font-size: 12px;
    color: #6b7280;
}

.vds-widget-meta span {
    margin-right: 8px;
}

.vds-widget-price {
    margin-top: 5px;
    font-size: 13px;
}

.vds-widget-price .price {
    color: #ef4444;
    font-weight: 600;
}

.vds-widget-price .free {
    color: #10b981;
    font-weight: 600;
}

.vds-widget-price .vip {
    color: #f59e0b;
    font-weight: 600;
}

.vds-widget-empty {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
    .vds-widget-item {
        flex: 1 1 calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .vds-widget-item {
        flex: 1 1 100%;
    }
}
@media (max-width: 768px) {
    .vds-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vds-document-card {
        padding: 10px;
    }
    
    .vds-document-thumb {
        height: 120px;
    }
    
    .vds-buy-btn,
    .vds-download-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}