/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f97316;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.search-box {
    flex: 1;
    max-width: 500px;
    display: flex;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
}

.search-btn {
    padding: 0 1rem;
    background: var(--primary);
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-categories {
    display: flex;
    gap: 0.5rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.category-btn:hover { background: var(--bg); color: var(--text); }
.category-btn.active { background: var(--primary); color: white; }

.creator-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.creator-link:hover { color: var(--primary); }

.login-btn {
    padding: 0.6rem 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.login-btn:hover { background: var(--primary-dark); }

/* ==================== Hero ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.hero-content { max-width: 800px; margin: 0 auto; }

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover { background: #f1f5f9; transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover { background: rgba(255,255,255,0.25); }

/* ==================== 统计条 ==================== */
.stats-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== 区块通用 ==================== */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.view-all {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ==================== 产品卡片 ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-content { padding: 1rem; }

.product-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-secondary);
}

.tag.platform {
    background: #dcfce7;
    color: #166534;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.rating { color: #f59e0b; }
.sold-count { color: var(--text-secondary); }

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.product-author {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==================== 分类类型 ==================== */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.chip {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ==================== IP网格 ==================== */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.ip-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.ip-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.ip-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 0.75rem;
}

.ip-name { font-size: 0.9rem; font-weight: 600; }

/* ==================== 创作者专区 ==================== */
.creator-section { background: linear-gradient(to bottom, var(--bg), var(--surface)); }

.creator-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.creator-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.creator-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.creator-icon { font-size: 3rem; margin-bottom: 1rem; }
.creator-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.creator-card p { color: var(--text-secondary); font-size: 0.95rem; }

.creator-cta { text-align: center; }

/* ==================== 页脚 ==================== */
.footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.footer-brand h3 { color: white; font-size: 1.5rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.95rem; }

.footer-links { display: flex; gap: 4rem; }

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.85rem;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .nav-container { flex-wrap: wrap; gap: 1rem; }
    .search-box { order: 3; width: 100%; max-width: none; }
    .nav-links { gap: 1rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .stats-container { flex-wrap: wrap; gap: 1rem; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
    .footer-links { flex-wrap: wrap; gap: 2rem; }
}
