/* ========== 插件页面样式 ========== */

/* 容器 */
.chajian-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 插件列表 */
.chajian-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.chajian-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
}

.chajian-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.2);
}

.chajian-image {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(124, 58, 237, 0.08));
    overflow: hidden;
}

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

.chajian-card:hover .chajian-image img {
    transform: scale(1.05);
}

.chajian-info {
    padding: 20px;
}

.chajian-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.chajian-title a {
    color: inherit;
    text-decoration: none;
}

.chajian-title a:hover {
    color: #7c3aed;
}

.chajian-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chajian-actions {
    display: flex;
    gap: 10px;
}

.chajian-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chajian-btn-edge {
    background: linear-gradient(135deg, #00d4ff, #06b6d4);
    color: #fff;
}

.chajian-btn-chrome {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
}

.chajian-btn:hover {
    transform: translateY(-2px);
}

/* ========== 插件详情页面样式 ========== */

.chajian-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

@media (max-width: 1000px) {
    .chajian-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* 插件头部 */
.chajian-detail-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 20px;
    padding: 32px;
    color: #fff;
    margin-bottom: 24px;
}

.chajian-detail-header-inner {
    display: flex;
    gap: 24px;
}

.chajian-detail-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.chajian-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chajian-detail-info {
    flex: 1;
}

.chajian-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.chajian-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.chajian-detail-meta span {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.chajian-detail-actions {
    display: flex;
    gap: 14px;
}

.chajian-detail-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chajian-detail-btn-edge {
    background: linear-gradient(135deg, #00d4ff, #06b6d4);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.chajian-detail-btn-chrome {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.chajian-detail-btn:hover {
    transform: translateY(-2px);
}

/* 内容区块 */
.chajian-section {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.chajian-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 20px 0;
    padding-left: 12px;
    border-left: 4px solid #7c3aed;
}

/* 图片预览 */
.chajian-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.chajian-image-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chajian-image-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.chajian-image-item:hover img {
    transform: scale(1.05);
}

/* 详细内容 */
.chajian-content-body {
    font-size: 15px;
    color: #475569;
    line-height: 1.8;
}

.chajian-content-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}

/* 侧边栏评论区域 */
.chajian-sidebar {
    position: sticky;
    top: 90px;
}

.chajian-comment-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.chajian-comment-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 20px 0;
}

.chajian-comment-form {
    margin-bottom: 24px;
}

.chajian-comment-form textarea {
    width: 100%;
    height: 100px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    resize: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.chajian-comment-form textarea:focus {
    outline: none;
    border-color: #7c3aed;
}

.chajian-comment-form textarea::placeholder {
    color: #94a3b8;
}

.chajian-comment-error {
    color: #ef4444;
    font-size: 12px;
    margin: 8px 0;
}

.chajian-comment-submit {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chajian-comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.chajian-comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 成功提示 */
.chajian-success-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    animation: slideDown 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 评论列表 */
.chajian-comment-list {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.chajian-comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px dashed #e2e8f0;
}

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

.chajian-comment-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(124, 58, 237, 0.1));
}

.chajian-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chajian-comment-content {
    flex: 1;
}

.chajian-comment-user {
    font-size: 14px;
    font-weight: 600;
    color: #1e1b4b;
    margin-bottom: 4px;
}

.chajian-comment-time {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.chajian-comment-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

/* 登录提示 */
.chajian-login-prompt {
    border: 1px dashed #f59e0b;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(245, 158, 11, 0.05));
}

.chajian-login-prompt a {
    color: #d97706;
    font-weight: 600;
    text-decoration: none;
}