/*
Theme Name: Simple Card Theme
Description: 简洁白色主题，支持卡密积分系统
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-link:hover {
    color: #333;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.points-badge {
    background: #4ecdc4;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* 文章头部 */
.post-header {
    padding: 30px 0 20px;
}

.post-title {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-meta {
    color: #999;
    font-size: 14px;
}

/* 文章内容 */
.post-content {
    padding-bottom: 20px;
}

.post-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

.post-content p {
    margin-bottom: 15px;
    color: #444;
}

/* 付费卡片 */
.paywall-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.paywall-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.paywall-header .lock-icon {
    font-size: 16px;
}

/* 预览图 */
.preview-images {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #e0e0e0;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
}

.preview-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ddd 0%, #ccc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 24px;
}

/* 付费文案 */
.paywall-text {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-bottom: 20px;
}

.paywall-text .price {
    color: #ff6b6b;
    font-weight: 600;
}

/* 解锁按钮 */
.unlock-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 14px 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlock-btn:hover {
    background: #3dbdb4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.unlock-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.unlock-btn.insufficient {
    background: #ff6b6b;
}

/* 提示信息 */
.paywall-hint {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 15px;
}

.paywall-hint a {
    color: #4ecdc4;
    text-decoration: none;
}

.paywall-hint a:hover {
    text-decoration: underline;
}

/* 已解锁状态 */
.unlocked-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #6bcf7f;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    margin-bottom: 15px;
}

/* 文章列表 */
.post-list {
    padding: 20px 0;
}

.post-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-item-title a {
    color: #333;
    text-decoration: none;
}

.post-item-title a:hover {
    color: #4ecdc4;
}

.post-item-meta {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}

.post-item-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.post-item-price {
    display: flex;
    gap: 8px;
}

.price-tag {
    background: #ffd93d;
    color: #333;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.free-tag {
    background: #6bcf7f;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.pagination a {
    color: #666;
    background: #f5f5f5;
}

.pagination a:hover {
    background: #e8e8e8;
}

.pagination .current {
    background: #4ecdc4;
    color: white;
}

/* 登录提示 */
.login-notice {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.login-notice p {
    color: #666;
    margin-bottom: 15px;
}

.login-btn {
    display: inline-block;
    background: #333;
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.login-btn:hover {
    background: #555;
}

/* 充值页面 */
.page-recharge {
    max-width: 400px;
    margin: 40px auto;
    padding: 0 20px;
}

.recharge-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.recharge-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.current-points {
    text-align: center;
    margin-bottom: 25px;
}

.current-points .label {
    color: #999;
    font-size: 14px;
}

.current-points .value {
    font-size: 36px;
    font-weight: 700;
    color: #4ecdc4;
}

.recharge-form {
    display: flex;
    gap: 10px;
}

.recharge-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.recharge-form input:focus {
    border-color: #4ecdc4;
}

.recharge-form button {
    padding: 12px 24px;
    background: #4ecdc4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}

.recharge-form button:hover {
    background: #3dbdb4;
}

.recharge-result {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.recharge-result.success {
    color: #6bcf7f;
}

.recharge-result.error {
    color: #ff6b6b;
}

.buy-card-link {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.buy-card-link a {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.buy-card-link a:hover {
    color: #3dbdb4;
    text-decoration: underline;
}

/* 积分记录页面 */
.points-log {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.points-log-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.points-log-table {
    width: 100%;
    border-collapse: collapse;
}

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

.points-log-table th {
    color: #999;
    font-weight: 500;
    font-size: 13px;
}

.points-log-table td {
    font-size: 14px;
}

.points-log-table .positive {
    color: #6bcf7f;
}

.points-log-table .negative {
    color: #ff6b6b;
}

/* 响应式 */
@media (max-width: 600px) {
    .post-title {
        font-size: 22px;
    }
    
    .paywall-card {
        padding: 20px;
        margin: 15px -5px;
        border-radius: 8px;
    }
    
    .preview-image {
        width: 80px;
        height: 80px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #6bcf7f;
}

.toast.error {
    background: #ff6b6b;
}