/* Import Fun Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Bubblegum+Sans&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8f0 50%, #ffd6e8 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #ff6b9d;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    transition: transform 0.3s ease;
}

.sound-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

.sound-toggle.muted {
    opacity: 0.5;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #ff6b9d;
}

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

.hero-title {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 3rem;
    color: #ff6b9d;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 #ffa6c9;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #6b4c9a;
    margin-bottom: 30px;
}

/* Floating Paws */
.floating-paws {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.paw {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

.paw:nth-child(1) { left: 10%; animation-delay: 0s; }
.paw:nth-child(2) { left: 30%; animation-delay: 3s; }
.paw:nth-child(3) { left: 50%; animation-delay: 6s; }
.paw:nth-child(4) { left: 70%; animation-delay: 9s; }
.paw:nth-child(5) { left: 90%; animation-delay: 12s; }

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

/* Cat Mascot */
.cat-mascot {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.cat-mascot:hover {
    transform: scale(1.1);
}

.cat-mascot:active {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.cat-face {
    width: 150px;
    height: 150px;
    background: #ffa366;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.cat-ears {
    position: absolute;
    top: -30px;
    width: 100%;
}

.ear {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid #ffa366;
    position: absolute;
}

.ear-left { left: 10px; transform: rotate(-20deg); }
.ear-right { right: 10px; transform: rotate(20deg); }

.cat-eyes {
    position: absolute;
    top: 45px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 35px;
}

.eye {
    width: 25px;
    height: 35px;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: blink 4s infinite;
}

@keyframes blink {
    0%, 96%, 100% { height: 35px; }
    98% { height: 2px; }
}

.pupil {
    width: 12px;
    height: 18px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.cat-nose {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ff6b9d;
    border-radius: 3px;
}

.cat-whiskers {
    position: absolute;
    top: 70px;
    width: 100%;
}

.whisker {
    position: absolute;
    width: 40px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.whisker-left-1 { left: -35px; top: 5px; transform: rotate(-10deg); }
.whisker-left-2 { left: -35px; top: 15px; transform: rotate(-5deg); }
.whisker-right-1 { right: -35px; top: 5px; transform: rotate(10deg); }
.whisker-right-2 { right: -35px; top: 15px; transform: rotate(5deg); }

.cat-mouth {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 50% 50%;
}

.cat-speech {
    margin-top: 20px;
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #6b4c9a;
    position: relative;
}

.cat-speech::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Content Sections */
.content-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease;
}

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

.section-title {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 2.5rem;
    color: #6b4c9a;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0 #ffa6c9;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #ffa6c9;
}

.info-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 12px 30px rgba(255, 107, 157, 0.3);
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.info-card h3 {
    color: #ff6b9d;
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-align: center;
}

.info-card p {
    color: #555;
    line-height: 1.8;
    text-align: center;
}

/* Understanding Section */
.understanding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.behavior-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #a8edea;
}

.behavior-card h3 {
    color: #6b4c9a;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.behavior-card ul {
    list-style: none;
    padding: 0;
}

.behavior-card li {
    padding: 10px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 10px;
    font-size: 1.1rem;
}

.tip-box {
    background: linear-gradient(135deg, #fff5a8 0%, #ffe88f 100%);
    border: 3px solid #ffdd57;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 20px rgba(255, 221, 87, 0.3);
}

.tip-box strong {
    color: #d97706;
}

/* Games Section */
.games-section {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 5px solid #a8edea;
}

.game-card {
    background: linear-gradient(135deg, #fef3ff 0%, #f3e7ff 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid #d8b4fe;
}

.game-card h3 {
    color: #6b4c9a;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
}

.game-card > p {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

/* Virtual Cat Feeder */
.cat-feeder {
    text-align: center;
}

.virtual-cat {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.v-cat-face {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.hunger-meter, .happiness-meter {
    margin-bottom: 10px;
}

.hunger-label, .happiness-label {
    font-weight: 600;
    color: #6b4c9a;
    margin-bottom: 5px;
}

.hunger-bar, .happiness-bar {
    width: 200px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    border: 2px solid #6b4c9a;
}

.hunger-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #ff9ec5);
    width: 50%;
    transition: width 0.5s ease;
}

.happiness-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd93d, #ffeb85);
    width: 50%;
    transition: width 0.5s ease;
}

.feeder-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.action-btn {
    background: #ff6b9d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #ff4d88;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.feeder-message {
    font-weight: 600;
    color: #6b4c9a;
    font-size: 1.1rem;
    min-height: 25px;
}

/* Quiz */
.quiz-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-question {
    font-size: 1.3rem;
    font-weight: 600;
    color: #6b4c9a;
    margin-bottom: 20px;
    text-align: center;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.quiz-option {
    background: #f0f0f0;
    border: 3px solid #d0d0d0;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.quiz-option:hover {
    background: #e0e0e0;
    border-color: #a8edea;
    transform: translateX(5px);
}

.quiz-option.correct {
    background: #c6f6d5;
    border-color: #38a169;
    animation: correctPulse 0.5s ease;
}

.quiz-option.incorrect {
    background: #fed7d7;
    border-color: #e53e3e;
    animation: incorrectShake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.quiz-feedback {
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    min-height: 30px;
    margin-bottom: 15px;
}

.quiz-score {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff6b9d;
}

/* Memory Game */
.memory-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
    max-width: 400px;
    margin: 20px auto;
}

.memory-card {
    aspect-ratio: 1;
    background: #a8edea;
    border: 3px solid #6b4c9a;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    transform-style: preserve-3d;
}

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

.memory-card.flipped {
    background: white;
    transform: rotateY(180deg);
}

.memory-card.matched {
    background: #c6f6d5;
    border-color: #38a169;
    cursor: default;
    animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.memory-card .card-front,
.memory-card .card-back {
    position: absolute;
    backface-visibility: hidden;
}

.memory-card .card-back {
    transform: rotateY(180deg);
}

.memory-stats {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6b4c9a;
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* Footer */
.footer {
    background: #6b4c9a;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.footer-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b9d;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .memory-game {
        grid-template-columns: repeat(4, 1fr);
        max-width: 300px;
    }

    .memory-card {
        font-size: 1.5rem;
    }

    .cat-face {
        width: 120px;
        height: 120px;
    }

    .games-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .action-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .v-cat-face {
        font-size: 3rem;
    }
}
