@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Zcool+KuaiLe&display=swap'); /* A fun Chinese font if available, fallback to system */

:root {
    --bg-color: #FFF9F0;
    --primary: #FF6B6B;   /* Playful Red */
    --secondary: #4ECDC4; /* Fresh Teal */
    --accent: #FFE66D;    /* Sunny Yellow */
    --text: #2C3E50;
    --card-bg: #FFFFFF;
    --blob-color: #FFDEE9;
}

body {
    font-family: 'Zcool KuaiLe', 'Fredoka', 'YouYuan', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#FFD166 2px, transparent 2px), radial-gradient(#06D6A0 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Fun Blob Backgrounds */
.blob {
    position: absolute;
    z-index: -1;
    filter: blur(40px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

/* Navigation */
.kids-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i { animation: wiggle 2s infinite; }

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-pill {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.nav-pill:nth-child(1) { background-color: #FFE66D; color: #555; }
.nav-pill:nth-child(2) { background-color: #FF6B6B; color: white; }
.nav-pill:nth-child(3) { background-color: #4ECDC4; color: white; }
.nav-pill:nth-child(4) { background-color: #1A535C; color: white; }

.nav-pill:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.hero-main {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    height: 400px;
    box-shadow: 10px 10px 0px var(--secondary);
    border: 4px solid var(--text);
    transition: transform 0.3s;
}
.hero-main:hover { transform: translate(-5px, -5px); box-shadow: 15px 15px 0px var(--secondary); }

.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px 30px 20px;
    color: white;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hero-card {
    flex: 1;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--text);
    box-shadow: 5px 5px 0px var(--primary);
}

/* Main Content Area */
.content-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin: 60px 0 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    display: block;
    height: 15px;
    background: var(--accent);
    opacity: 0.6;
    margin-top: -20px;
    border-radius: 10px;
    transform: rotate(-1deg);
}

/* Breadcrumbs */
.kids-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 1.1rem;
    background: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    border: 3px solid var(--text);
    box-shadow: 5px 5px 0px var(--accent);
    width: fit-content;
}

.kids-breadcrumbs a {
    color: var(--text);
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

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

.kids-breadcrumbs .separator {
    color: #ccc;
    font-weight: bold;
}

.kids-breadcrumbs .current {
    color: var(--primary);
    font-weight: bold;
}

/* Grid */
.fun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.fun-card {
    background: white;
    border-radius: 20px;
    padding: 15px;
    border: 3px solid var(--text);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.fun-card:nth-child(3n+1) { box-shadow: 8px 8px 0px #FF6B6B; }
.fun-card:nth-child(3n+2) { box-shadow: 8px 8px 0px #4ECDC4; }
.fun-card:nth-child(3n+3) { box-shadow: 8px 8px 0px #FFE66D; }

.fun-card:hover {
    transform: translateY(-10px) rotate(2deg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px dashed #eee;
}

.card-body { padding-top: 15px; text-align: left; }
.card-title { margin: 0; font-size: 1.2rem; color: var(--text); }
.card-meta { font-size: 0.9rem; color: #888; margin-top: 5px; }

/* Floating Action Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
    border: 4px solid white;
    cursor: pointer;
    z-index: 2000;
    transition: transform 0.3s;
    padding: 0;
}

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

.back-to-top i {
    font-size: 28px;
    margin-top: -2px; /* Visual correction */
}

@keyframes wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-20px);} 60% {transform: translateY(-10px);} }

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 50px 50px 0 0;
    position: relative;
    overflow: hidden;
}
.footer-deco {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-color);
    border-radius: 0 0 50% 50%;
}

/* Detail Page Specifics */
.detail-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border-radius: 30px;
    padding: 40px;
    border: 4px solid var(--text);
    box-shadow: 15px 15px 0px var(--accent);
}

.detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.detail-img-box {
    border-radius: 20px;
    overflow: hidden;
    border: 3px dashed var(--secondary);
    padding: 10px;
    margin-bottom: 30px;
}

.detail-img-box img {
    width: 100%;
    border-radius: 15px;
}

.detail-content {
    font-size: 1.2rem;
    line-height: 1.8;
}

.detail-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 15px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Share Component */
.share-component {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border: 2px dashed #eee;
}

.share-label {
    font-weight: bold;
    color: var(--text);
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.share-wechat { background: #07c160; }
.share-weibo { background: #e6162d; }
.share-qzone { background: #ffc107; }
.share-copy { background: #666; }

/* Wechat QR Modal */
.wechat-qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.qr-content {
    background: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 4px solid var(--text);
}

.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

.close-qr {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    transition: color 0.2s;
}

.close-qr:hover { color: var(--primary); }

#qrcode img {
    margin: 0 auto;
    border: 10px solid white; /* padding for qr code */
}

/* List Page Specifics */
.filter-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tag {
    padding: 10px 25px;
    border-radius: 30px;
    background: white;
    border: 2px solid var(--text);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.tag:hover, .tag.active {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 4px 4px 0px var(--text);
}

/* Responsive Design */

/* Tablet (max-width: 992px) */
@media screen and (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 20px auto;
    }
    
    .hero-main {
        height: 350px;
    }
    
    .hero-side {
        flex-direction: row;
        height: 180px;
    }
    
    .hero-card {
        height: 100%;
    }
}

/* Mobile (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Navigation */
    .kids-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        border-radius: 0 0 20px 20px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-pill {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Hero Section */
    .hero-main {
        height: 250px;
    }
    
    .hero-side {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .hero-card {
        height: 180px;
    }

    /* Section Title */
    .section-title {
        font-size: 2rem;
        margin: 40px 0 30px;
    }

    /* Detail Page */
    .detail-container {
        margin: 20px;
        padding: 20px;
        box-shadow: 8px 8px 0px var(--accent);
    }
    
    .detail-content {
        font-size: 1rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    .fun-grid {
        gap: 20px;
        /* Allow 1 column on small screens */
        grid-template-columns: 1fr; 
    }

    .detail-container {
        padding: 15px;
    }
    
    .kids-breadcrumbs {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}