/* Modern Child-Friendly Theme */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2C3E50;
    --light: #F7F9FC;
    --gradient-bg: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --card-shadow: 0 10px 20px rgba(0,0,0,0.08);
    --hover-transform: translateY(-5px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: var(--gradient-bg);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Animated Background Shapes */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(255,107,107,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(78,205,196,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 15s infinite alternate-reverse;
}

@keyframes float {
    from { transform: translate(0, 0); }
    to { transform: translate(20px, 20px); }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    margin-left: 20px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h1.page-title {
    text-align: center;
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: 3rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h1.page-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 6px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 10px;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--secondary);
}

.card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Card Colors (nth-child for variety) */
.card:nth-child(4n+1) { border-bottom: 6px solid var(--primary); }
.card:nth-child(4n+2) { border-bottom: 6px solid var(--secondary); }
.card:nth-child(4n+3) { border-bottom: 6px solid var(--accent); }
.card:nth-child(4n+4) { border-bottom: 6px solid #A8E6CF; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 90px;
    left: 20px;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: var(--dark);
    font-size: 1.2rem;
    text-decoration: none;
    z-index: 90;
    transition: all 0.3s;
}

.back-btn:hover {
    transform: scale(1.1);
    color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1.page-title {
        font-size: 2rem;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    .card {
        padding: 1.5rem;
    }
    .card img {
        width: 80px;
        height: 80px;
    }
}
