/* ==========================================================================
   Modern Creative Gallery Theme - 现代化创意画廊风格样式表
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sub: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

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

/* ==========================================================================
   Navigation 现代化吸顶毛玻璃导航
   ========================================================================== */
.kids-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.kids-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.kids-nav .logo i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.kids-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kids-nav .nav-pill {
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.kids-nav .nav-pill:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.kids-nav .nav-pill.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* ==========================================================================
   Hero Section 杂志级精选展位
   ========================================================================== */
.hero {
    max-width: 1280px;
    margin: 1.8rem auto 2.5rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.25rem;
}

.hero-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 380px;
    background: #000;
    box-shadow: var(--shadow-md);
}

.hero-main a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main:hover img {
    transform: scale(1.03);
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.2rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    color: #fff;
}

.hero-caption span {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
    letter-spacing: 0.5px;
}

.hero-caption h1 {
    font-size: 1.5rem;
    margin: 0.6rem 0 0;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-card {
    position: relative;
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
}

.hero-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-card:hover img {
    transform: scale(1.04);
}

.hero-card-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Section Title 优雅栏目标题
   ========================================================================== */
.section-title {
    max-width: 1280px;
    margin: 2.5rem auto 1.2rem;
    padding: 0 1.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.25rem;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Gallery Grid / Fun Grid 现代流式卡片网格
   ========================================================================== */
.fun-grid {
    max-width: 1280px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 1.25rem;
}

.fun-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.fun-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 黄金比例 */
    background: #f1f5f9;
    overflow: hidden;
}

.fun-card .card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.fun-card:hover .card-img {
    transform: scale(1.05);
}

.fun-card .card-body {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.fun-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fun-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 500;
}

.fun-card .card-meta i {
    color: var(--danger);
    margin-right: 4px;
}

/* ==========================================================================
   Content Body & Breadcrumbs 详情页与列表页主体
   ========================================================================== */
.content-body {
    max-width: 1280px;
    margin: 1.5rem auto 3rem;
    padding: 0 1.5rem;
}

.kids-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.kids-breadcrumbs a {
    color: var(--text-muted);
}

.kids-breadcrumbs a:hover {
    color: var(--primary);
}

.kids-breadcrumbs .separator {
    color: var(--text-sub);
}

.kids-breadcrumbs .current {
    color: var(--text-main);
    font-weight: 600;
}

.page-title {
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.4rem;
}

.page-title p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* ==========================================================================
   Detail Container 详情页卡片
   ========================================================================== */
.detail-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    margin-bottom: 3rem;
}

.detail-header {
    text-align: center;
    padding-bottom: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-header .hero-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.8rem;
}

.detail-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.8rem;
    line-height: 1.35;
}

.detail-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.detail-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #334155;
    margin: 2rem 0;
}

.detail-content img {
    margin: 1.5rem auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-width: 100%;
    cursor: zoom-in;
    transition: var(--transition);
}

.detail-content img:hover {
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Footer 现代化页脚
   ========================================================================== */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3.5rem 1.5rem 2rem;
    text-align: center;
    margin-top: 5rem;
}

footer h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

footer p {
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    color: #64748b;
}

.footer-links {
    margin: 1.5rem 0;
}

.footer-links a {
    color: #cbd5e1;
    margin: 0 0.8rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.8;
}

.copyright a {
    color: #94a3b8;
}

.copyright a:hover {
    color: #cbd5e1;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--primary-hover);
}

/* ==========================================================================
   Responsive 响应式适配
   ========================================================================== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-main {
        height: 280px;
    }
    .hero-side {
        flex-direction: row;
    }
    .hero-card {
        flex: 1;
        height: 140px;
    }
    .fun-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    .detail-container {
        padding: 1.5rem;
    }
    .detail-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .kids-nav {
        padding: 0.75rem 1rem;
    }
    .kids-nav .nav-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.88rem;
    }
    .hero {
        padding: 0 1rem;
        margin-top: 1rem;
    }
    .hero-side {
        flex-direction: column;
    }
    .fun-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
        gap: 0.75rem;
    }
    .fun-card .card-body {
        padding: 0.75rem;
    }
    .fun-card .card-title {
        font-size: 0.88rem;
    }
}
