/* 插件目录页面专属样式 */

/* ==================== 页面头部 ==================== */
.section-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    padding-top: 10px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--primary-blue);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 15px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== 筛选工具栏 ==================== */
.filter-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-light);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    transition: all 0.3s ease;
}

.filter-bar:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

/* 分段式切换按钮样式 */
.filter-switch {
    background: var(--bg-light);
    padding: 4px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-light);
}

.switch-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.switch-btn:hover {
    color: var(--text-dark);
}

.switch-btn.active {
    background: white;
    color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-weight: 600;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 16px;
    transition: color 0.3s ease;
}

.search-box input:focus + i {
    color: var(--primary-blue);
}

/* ==================== 插件网格 ==================== */
.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

/* ==================== 插件卡片 ==================== */
.plugin-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.5);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    height: 100%;
}

/* 悬停效果 */
.plugin-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(22, 93, 255, 0.2);
}

/* 顶部装饰条 */
.plugin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plugin-card:hover::before {
    opacity: 1;
}

/* 图标区域 */
.plugin-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.plugin-card:hover .plugin-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* 各种颜色的图标背景 */
.icon-blue { 
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); 
    color: #4f46e5; 
    box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.2);
}
.icon-green { 
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); 
    color: #16a34a; 
    box-shadow: 0 8px 16px -4px rgba(22, 163, 74, 0.2);
}
.icon-purple { 
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); 
    color: #9333ea; 
    box-shadow: 0 8px 16px -4px rgba(147, 51, 234, 0.2);
}
.icon-orange { 
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); 
    color: #ea580c; 
    box-shadow: 0 8px 16px -4px rgba(234, 88, 12, 0.2);
}
.icon-pink { 
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); 
    color: #db2777; 
    box-shadow: 0 8px 16px -4px rgba(219, 39, 119, 0.2);
}

/* 内容区域 */
.plugin-content {
    flex-grow: 1;
}

.plugin-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.plugin-card:hover .plugin-title {
    color: var(--primary-blue);
}

.plugin-desc {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部按钮区域 */
.plugin-footer {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
    margin-top: auto;
}

.btn-action {
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary-soft {
    background: rgba(22, 93, 255, 0.1);
    color: var(--primary-blue);
    border: 1px solid transparent;
}

.btn-primary-soft:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-gray);
}

.btn-outline:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* 状态标签 */
.badge-status {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge-free {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-green);
    border: 1px solid rgba(82, 196, 26, 0.2);
}

.badge-paid {
    background: rgba(22, 93, 255, 0.1);
    color: var(--primary-blue);
    border: 1px solid rgba(22, 93, 255, 0.2);
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
    }
    
    .filter-switch {
        width: 100%;
        overflow-x: auto;
    }

    .switch-btn {
        flex: 1;
    }
    
    .search-box {
        width: 100%;
        min-width: auto;
    }
    
    .plugin-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plugin-card {
        padding: 20px;
    }
}
