/* PlugHub 主样式表 */

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.animate-fadeInUp { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.3s ease-out forwards; }
.animate-slideDown { animation: slideDown 0.3s ease-out forwards; }

/* 状态标签 */
.tag { display:inline-flex; align-items:center; padding:2px 10px; border-radius:9999px; font-size:12px; font-weight:500; }
.tag-green  { background:#f0fdf4; color:#16a34a; }
.tag-yellow { background:#fefce8; color:#ca8a04; }
.tag-red    { background:#fef2f2; color:#dc2626; }
.tag-blue   { background:#eff6ff; color:#2563eb; }
.tag-purple { background:#f5f3ff; color:#7c3aed; }
.tag-gray   { background:#f9fafb; color:#6b7280; }

.animate-fadeInUp { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.3s ease-out forwards; }
.animate-slideDown { animation: slideDown 0.3s ease-out forwards; }

/* 插件卡片 */
.plugin-card {
    opacity: 0;
    transition: all 0.3s ease;
}
.plugin-card.visible {
    animation: fadeInUp 0.4s ease-out forwards;
}
.plugin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* 文本截断 */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

/* 搜索框聚焦 */
.search-box:focus-within {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
}

/* 模态框 */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}
.modal-content {
    animation: fadeInUp 0.3s ease-out;
}

/* Toast 通知 */
.toast {
    animation: slideDown 0.3s ease-out;
}

/* 标签 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.tag-green { background: #dcfce7; color: #166534; }
.tag-yellow { background: #fef9c3; color: #854d0e; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-blue { background: #dbeafe; color: #1e40af; }

/* 分页 */
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.pagination a:hover { background: #f1f5f9; }
.pagination .active {
    background: #22c55e;
    color: white;
    font-weight: 600;
}

/* 渐变背景 */
.hero-gradient {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #ecfdf5 100%);
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 文件上传区域 */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* 统计卡片 */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(20px, -20px);
}

/* 移动端优化 */
@media (max-width: 640px) {
    input, select, textarea { font-size: 16px !important; }
    button, a { -webkit-tap-highlight-color: transparent; }
}

/* 密码强度条 */
.strength-bar { transition: width 0.3s ease, background-color 0.3s ease; }

/* 加载指示器 */
.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #22c55e;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

