/* CSS变量系统 - 统一的设计令牌 */
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-hover: #f3f4f6;
    --border-color: #e5e7eb;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

/* 极致简洁的短码样式 */
.paid-view-wrapper {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    margin: 12px 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    max-width: 100%;
    position: relative;
}

.paid-view-wrapper:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* 顶部信息区域 - 单行显示 */
.paid-view-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.resource-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.resource-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-price {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.user-balance {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.balance-amount {
    font-weight: 700;
    color: var(--success-color);
    font-size: 15px;
}

/* 按钮区域 */
.paid-view-actions {
    text-align: center;
}

/* 立即查看按钮 - 蓝色 */
.view-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.view-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.view-button:hover::before {
    left: 100%;
}

.view-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.view-button:active {
    transform: translateY(0);
}

.view-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.view-button:disabled::before {
    display: none;
}

/* 免费查看按钮 - 绿色 */
.free-view {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.free-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 立即查看按钮 - 保持蓝色，专门为付费查看设置 */
.paid-view {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.paid-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 充值按钮样式 - 橙色 */
.recharge-link-button {
    display: block;
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.recharge-link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.recharge-link-button:hover::before {
    left: 100%;
}

.recharge-link-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    color: white;
    text-decoration: none;
}

/* 内容显示区域 */
.content-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 15px;
    line-height: 1.6;
    font-size: 16px;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
	text-align: left;
}

.content-display h1,
.content-display h2,
.content-display h3,
.content-display h4,
.content-display h5,
.content-display h6 {
    color: var(--text-primary);
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

.content-display p {
    margin-bottom: 1em;
}

.content-display ul,
.content-display ol {
    margin: 1em 0;
    padding-left: 2em;
}

.content-display li {
    margin-bottom: 0.5em;
}

.content-display blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* 已购买提示信息 - 美化版本 */
.purchased-notice {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: #0369a1;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.purchased-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
}

.purchased-notice-text {
    flex: 1;
    text-align: center;
}

/* 未登录状态 */
.paid-view-not-logged-in {
    text-align: center;
    padding: 12px 0;
}

.paid-view-not-logged-in p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.login-register-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.login-register-buttons .button {
    padding: 8px 16px;
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 600;
}

.login-button {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.login-button:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.register-button {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.register-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 余额不足状态 */
.paid-view-insufficient {
    text-align: center;
}

.insufficient-message {
    margin: 0 0 12px 0;
    color: var(--error-color);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.insufficient-message::before {
    content: '⚠';
    font-size: 16px;
}

/* 消息提示 */
.paid-view-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    display: none;
    font-weight: 500;
}

.paid-view-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    box-shadow: var(--shadow-sm);
}

.paid-view-message.error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    box-shadow: var(--shadow-sm);
}

.paid-view-message.info {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    box-shadow: var(--shadow-sm);
}

/* 已购买状态容器 */
.paid-view-purchased {
    text-align: center;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .paid-view-wrapper {
        padding: 14px;
        margin: 10px 0;
    }
    
    .paid-view-info {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .resource-info {
        justify-content: space-between;
    }
    
    .user-balance {
        text-align: center;
        justify-content: center;
        background: var(--bg-secondary);
        padding: 6px 10px;
        border-radius: 4px;
    }
    
    .resource-text {
        font-size: 14px;
    }
    
    .resource-price {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .balance-amount {
        font-size: 14px;
    }
    
    .view-button,
    .recharge-link-button {
        padding: 9px 16px;
        font-size: 13px;
    }
    
    .purchased-notice {
        font-size: 12px;
        padding: 10px 12px;
        flex-direction: column;
        gap: 6px;
    }
    
    .content-display {
        padding: 15px;
        font-size: 13px;
        max-height: 300px;
    }
    
    .login-register-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .login-register-buttons .button {
        width: 100%;
        text-align: center;
    }
}

/* 管理界面样式 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    margin: 0;
    font-size: 24px;
    color: var(--text-primary);
}

.stat-card p {
    margin: 8px 0 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-actions {
    margin: 20px 0;
}

.status-pending {
    color: var(--warning-color);
    font-weight: 600;
}

.status-approved {
    color: var(--success-color);
    font-weight: 600;
}

.status-rejected {
    color: var(--error-color);
    font-weight: 600;
}

/* 设置说明样式 */
.settings-instructions {
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.settings-instructions h2 {
    color: #2271b1;
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.instruction-section {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.instruction-section h3 {
    color: #1d2327;
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.instruction-section ul,
.instruction-section ol {
    margin: 10px 0;
    padding-left: 20px;
}

.instruction-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.instruction-section code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #d63638;
}

.instruction-section strong {
    color: #1d2327;
}

.instruction-section ul ul {
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 20px;
}

.instruction-section ul ul li {
    margin-bottom: 4px;
    color: #50575e;
}