/**
 * 前端公共样式
 */

.ad-unlock-content {
    margin: 20px 0;
}

.ad-unlock-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ad-unlock-item h3 {
    margin-top: 0;
    color: #333;
}

.ad-unlock-thumbnail {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

.ad-unlock-thumbnail img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.ad-unlock-content-text {
    margin-bottom: 15px;
    line-height: 1.6;
}

.ad-unlock-hidden-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    position: relative;
}

.ad-unlock-hidden-content::before {
    content: "🔒 隐藏内容";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #fff;
    padding: 0 10px;
    font-size: 12px;
    color: #666;
}

.ad-unlock-unlocked .ad-unlock-hidden-content::before {
    content: "✅ 已解锁";
    color: #28a745;
}

.ad-unlock-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.ad-unlock-btn, .points-unlock-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.ad-unlock-btn:hover, .points-unlock-btn:hover {
    background: #005a87;
    color: #fff;
}

.points-unlock-btn {
    background: #28a745;
}

.points-unlock-btn:hover {
    background: #1e7e34;
}

.ad-unlock-btn:disabled, .points-unlock-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.ad-unlock-stats {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.ad-unlock-stats span {
    margin-right: 15px;
}

.ad-unlock-categories {
    margin-bottom: 30px;
}

.ad-unlock-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ad-unlock-category-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s;
}

.ad-unlock-category-btn:hover,
.ad-unlock-category-btn.active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.ad-unlock-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.ad-unlock-loading::before {
    content: "⏳";
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

.ad-unlock-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.ad-unlock-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ad-unlock-item {
        padding: 15px;
    }
    
    .ad-unlock-thumbnail {
        float: none;
        margin-right: 0;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .ad-unlock-thumbnail img {
        width: 100%;
        max-width: 200px;
        height: auto;
    }
    
    .ad-unlock-actions {
        text-align: center;
    }
    
    .ad-unlock-btn, .points-unlock-btn {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .ad-unlock-category-filter {
        justify-content: center;
    }
}
