/* ============================================
   大画家 - 全局样式表
   ============================================ */

/* CSS 变量 */
:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --accent: #06b6d4;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-soft: linear-gradient(135deg, rgba(79,70,229,0.06) 0%, rgba(6,182,212,0.06) 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.3s ease;
}

/* 重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 96px;
    padding: 8px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
}

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

.logo-text {
    color: var(--text);
}

.nav-menu ul {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-light);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-alt);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(79,70,229,0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
    position: relative;
    padding: 140px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    max-width: 560px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.hero-card-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-alt);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #22c55e; }

/* ============================================
   按钮
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* “查看全部”大号描边按钮（首页区块底部） */
.view-all-wrap {
    text-align: center;
    margin-top: 44px;
}
.btn-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    padding: 16px 56px;
    border-radius: 16px;
    border: 2px solid var(--artist-theme, var(--primary));
    background: color-mix(in srgb, var(--artist-theme, var(--primary)) 8%, white);
    color: var(--artist-theme, var(--primary));
    font-size: 1.1rem;
    font-weight: 600;
    transition: all var(--transition);
}
.btn-view-all:hover {
    background: var(--artist-theme, var(--primary));
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   统计数据
   ============================================ */
.stats {
    padding: 60px 0;
    background: var(--bg-alt);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

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

/* ============================================
   区块标题
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79,70,229,0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: #cbd5e1;
    padding: 0;
    margin-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col .logo-text {
    color: white;
}

.footer-desc {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.7;
}

.footer-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: all var(--transition);
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    padding: 36px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ============================================
   返回顶部
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* ============================================
   徽章
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-info {
    background: rgba(37,99,235,0.1);
    color: var(--info);
}

.badge-success {
    background: rgba(22,163,74,0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(217,119,6,0.1);
    color: var(--warning);
}

/* ============================================
   分类标签
   ============================================ */
.category-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.category-tab {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--bg-alt);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   动画
   ============================================ */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   画家站点样式
   ============================================ */
.artist-nav {
    background: rgba(255,255,255,0.95);
}

.artist-hero {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    background: var(--gradient-soft);
    overflow: hidden;
}

.artist-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.artist-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    margin: 0 auto 24px;
}

.artist-page-header {
    padding: 100px 0 60px;
    text-align: center;
    background: var(--gradient-soft);
}

.artist-section {
    padding: 80px 0;
}

.artist-section-alt {
    padding: 80px 0;
    background: var(--bg-alt);
}

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

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    transition: all var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   表单
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all var(--transition);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   警告/提示
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
}

/* ============================================
   三列网格布局（通用）
   ============================================ */
.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ============================================
   四列网格布局（通用）
   ============================================ */
.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* 首页区块行数限制：作品只显示两行，文章只显示一行（按各断点列数裁剪） */
.home-rows-2 > *:nth-child(n+9) { display: none; }
.home-rows-1 > *:nth-child(n+4) { display: none; }
@media (max-width: 968px) {
    .home-rows-2 > *:nth-child(n+5) { display: none; }
    .home-rows-1 > *:nth-child(n+3) { display: none; }
}
@media (max-width: 768px) {
    .home-rows-2 > *:nth-child(n+3) { display: none; }
    .home-rows-1 > *:nth-child(n+2) { display: none; }
    .btn-view-all { min-width: 100%; padding: 14px 32px; }
}

/* ============================================
   分页组件
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}
.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-ellipsis {
    color: var(--text-light);
    padding: 0 4px;
    user-select: none;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 968px) {
    .grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        transform: translateY(-150%);
        transition: transform var(--transition);
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.active {
        transform: translateY(0);
    }
    .nav-menu ul {
        flex-direction: column;
        gap: 4px;
    }
    .nav-link {
        display: block;
        padding: 12px 16px;
    }
    .hero {
        padding: 120px 0 60px;
    }
    .grid-3col {
        grid-template-columns: 1fr;
    }
    .grid-4col {
        grid-template-columns: 1fr;
    }
    /* 移动端所有带 mobile-single-col 类的网格容器强制单列 */
    .mobile-single-col {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
    }
}
