@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

/* ==================== CSS Variables ==================== */
:root {
    /* Colors - Gradient System */
    --coral-light: #FF6B6B;
    --coral-dark: #FFA07A;
    --mint-light: #7FDBCA;
    --mint-dark: #20BDAA;
    --sunshine-light: #FFE66D;
    --sunshine-dark: #FFD93D;
    --purple-light: #C490E4;
    --purple-dark: #A459D1;
    --blue-light: #74B9FF;
    --blue-dark: #4A90E2;
    --pink-light: #FF91AF;
    --pink-dark: #FF6B9D;

    /* Neutral Colors */
    --white: #FFFFFF;
    --light-bg: #F8F9FA;
    --light-gray: #E9ECEF;
    --medium-gray: #6C757D;
    --dark-text: #2C3E50;
    --dark-bg: #1A1A2E;

    /* Spacing */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-colored: 0 8px 24px rgba(255, 107, 107, 0.2);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* ==================== Navigation ==================== */
.kids-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 107, 107, 0.1);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

.kids-nav .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--coral-light), var(--coral-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.logo i {
    font-size: 32px;
    background: linear-gradient(135deg, var(--coral-light), var(--coral-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-pill {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nav-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: var(--transition-smooth);
}

.nav-pill:hover::before,
.nav-pill.active::before {
    opacity: 1;
}

.nav-pill:nth-child(1) {
    background: linear-gradient(135deg, var(--coral-light), var(--coral-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.nav-pill:nth-child(2) {
    background: linear-gradient(135deg, var(--sunshine-light), var(--sunshine-dark));
    color: var(--dark-text);
    box-shadow: 0 4px 12px rgba(255, 230, 109, 0.3);
}

.nav-pill:nth-child(3) {
    background: linear-gradient(135deg, var(--mint-light), var(--mint-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(127, 219, 202, 0.3);
}

.nav-pill:nth-child(4) {
    background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(116, 185, 255, 0.3);
}

.nav-pill:nth-child(5) {
    background: linear-gradient(135deg, var(--purple-light), var(--purple-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(196, 144, 228, 0.3);
}

.nav-pill:nth-child(6) {
    background: linear-gradient(135deg, var(--pink-light), var(--pink-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 145, 175, 0.3);
}

.nav-pill:nth-child(7) {
    background: linear-gradient(135deg, #FA8BFF, #2BD2FF);
    color: white;
    box-shadow: 0 4px 12px rgba(250, 139, 255, 0.3);
}

.nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nav-pill.active {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ==================== Hero Section ==================== */
.hero {
    max-width: 1280px;
    margin: 48px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.hero-main,
.hero-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
    background: white;
}

.hero-main {
    height: 480px;
}

.hero-card {
    height: 228px;
}

.hero-main:hover,
.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

.hero-main:hover img,
.hero-card:hover img {
    transform: scale(1.05);
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(10px);
    padding: 24px;
    border-top: 1px solid rgba(255, 107, 107, 0.1);
}

.hero-caption h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 8px 0 0;
    line-height: 1.3;
}

.hero-caption span {
    display: inline-block;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==================== Content Area ==================== */
.content-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    margin: 80px 0 48px;
    background: linear-gradient(135deg, var(--coral-light), var(--purple-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--coral-light), var(--purple-dark));
    border-radius: 10px;
}

.fun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    padding-bottom: 32px;
}

.fun-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fun-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    font-size: 14px;
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta i {
    color: var(--coral-light);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ==================== Breadcrumbs ==================== */
.kids-breadcrumbs {
    background: white;
    padding: 14px 24px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0;
    box-shadow: var(--shadow-sm);
    font-size: 15px;
}

.kids-breadcrumbs a {
    color: var(--coral-light);
    font-weight: 600;
    transition: var(--transition-fast);
}

.kids-breadcrumbs a:hover {
    color: var(--coral-dark);
    text-decoration: underline;
}

.kids-breadcrumbs .separator {
    color: var(--medium-gray);
}

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

/* ==================== Page Title ==================== */
.page-title {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(164, 89, 209, 0.05));
    border-radius: var(--radius-lg);
    margin-bottom: 48px;
}

.page-title h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--coral-light), var(--purple-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.page-title p {
    font-size: 18px;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== Footer ==================== */
footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213E 100%);
    color: white;
    padding: 64px 24px 32px;
    text-align: center;
    margin-top: 96px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--dark-bg));
    opacity: 0.6;
}

footer h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--coral-light), var(--sunshine-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

footer p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--sunshine-light);
    font-weight: 600;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--coral-light);
    text-decoration: underline;
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
    margin-top: 24px;
}

.copyright a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition-fast);
}

.copyright a:hover {
    color: white;
}

/* ==================== Back to Top Button ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--coral-light), var(--coral-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-colored);
    transition: all var(--transition-smooth);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 32px rgba(255, 107, 107, 0.4);
}

/* ==================== Homepage Grid (4 columns) ==================== */
.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 24px;
}

.section-more {
    text-align: center;
    margin: 24px 0 48px;
}

.more-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--coral-light), var(--coral-dark));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all var(--transition-smooth);
}

.more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-side {
        flex-direction: row;
    }

    .hero-main {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .kids-nav .container {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
    }

    .nav-pill {
        padding: 8px 16px;
        font-size: 14px;
    }

    .logo {
        font-size: 24px;
    }

    .hero {
        margin: 24px auto;
    }

    .hero-main {
        height: 300px;
    }

    .hero-card {
        height: 200px;
    }

    .section-title {
        font-size: 32px;
        margin: 48px 0 32px;
    }

    .page-title h1 {
        font-size: 36px;
    }

    .page-title p {
        font-size: 16px;
    }

    .fun-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .home-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 平板设备2列 */
        gap: 20px;
    }

    footer h2 {
        font-size: 24px;
    }

    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 24px;
        right: 24px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .fun-grid {
        grid-template-columns: 1fr;
    }

    .home-grid {
        grid-template-columns: 1fr;
        /* 手机设备单列 */
    }

    .nav-pill {
        padding: 6px 12px;
        font-size: 13px;
    }
}