/* 
 * MUFU Plugins Shop - Premium Design System 2025
 * Style: Ethereal Dark / Glassmorphism
 */

:root {
    /* 核心色彩 - 高级深色调 */
    --bg-root: #030305;
    --bg-secondary: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(10, 10, 12, 0.7);
    
    /* 强调色 - 极光渐变 */
    --primary: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --text-gradient: linear-gradient(90deg, #ffffff 0%, #e2e8f0 100%);
    
    /* 文本颜色 */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* 边框与光效 */
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glow-primary: 0 0 20px rgba(59, 130, 246, 0.3);
    
    /* 布局尺寸 */
    --container-width: 1400px; /* 更宽的容器 */
    --header-height: 70px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-root);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* 背景氛围光 */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    background-attachment: fixed;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.nav-logo img {
    width: 40px;  /* 放大 Logo */
    height: 40px;
    /* 这里的 invert(1) 将黑色变为白色，brightness 增加亮度 */
    filter: invert(1) brightness(200%) drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 2rem;
    border-radius: 100px;
    border: 1px solid var(--border-light);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: var(--glow-primary);
}

.nav-actions, .nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==================== 按钮系统 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-purchase {
    background: rgba(255, 45, 85, 0.1);
    color: #ff2d55;
    border: 1px solid rgba(255, 45, 85, 0.2);
}

.btn-purchase:hover {
    background: rgba(255, 45, 85, 0.2);
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.2);
}

.btn-purchase img {
    width: 18px;
    height: 18px;
}

/* ==================== 英雄区域 (Hero) ==================== */
.hero-section {
    min-height: 90vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 动态背景元素 */
.hero-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右分栏 */
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    position: relative;
    perspective: 1200px; /* 增加透视深度 */
    transform-style: preserve-3d; /* 保持3D空间 */
    z-index: 10;
}

/* 悬浮卡片装饰 */
.visual-card {
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    /* 初始状态 */
    transform: rotateY(-10deg) rotateX(5deg); 
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    /* 移除之前的 transition，由 JS 控制 */
    will-change: transform; /* 性能优化 */
}

/* 移除 CSS hover 效果，完全由 JS 接管 */
/* .hero-visual:hover .visual-card { ... } - DELETE THIS */

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    /* 让图标也跟随父元素透视，并在Z轴上浮起 */
    transform: translateZ(40px); 
    /* 保持浮动动画 */
    animation: float 4s ease-in-out infinite;
}

.floating-icon img { width: 32px; height: 32px; }

.float-1 { top: -30px; right: -30px; animation-delay: 0s; }
.float-2 { bottom: -30px; left: -30px; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==================== 数据统计栏 ==================== */
.stats-banner {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.01);
    padding: 3rem 0;
    margin: 4rem 0;
}

.stats-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== 内容容器 (Shop, Profile etc) ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 300px);
    margin-top: var(--header-height);
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ==================== 插件网格 ==================== */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.plugin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plugin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.plugin-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
}

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

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.plugin-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    flex-shrink: 0;
}

.plugin-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.plugin-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.plugin-version {
    font-size: 0.85rem;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.plugin-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 2;
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.price-tag.free {
    color: #10b981;
}

.price-unit {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: normal;
}

/* ==================== 通用 UI 元素 ==================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(20, 20, 25, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-light);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success { border-color: #10b981; color: #10b981; }
.toast-error { border-color: #ef4444; color: #ef4444; }

/* ==================== Footer ==================== */
.footer {
    margin-top: 6rem;
    border-top: 1px solid var(--border-light);
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--bg-root), #000);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1024px) {
    :root { --container-width: 100%; }
    .hero-content h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* 移动端暂时隐藏导航链接，实际项目需加汉堡菜单 */
    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
    .hero-content p { margin: 0 auto 2.5rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; } /* 移动端简化 */
}

/* 表单输入框优化 */
.form-input, .form-control {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* 个人中心特定的覆盖样式 (Profile) */
.profile-container { max-width: 1000px; }
.section-card { background: var(--bg-card); border: 1px solid var(--border-light); }
.profile-header { background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)); }

/* 登录框 */
.auth-box {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
