/* Custom Cute Kawaii Styles & Animations for Virtual Cat Game */

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

:root {
    --bg-day: linear-gradient(135deg, #fff1eb 0%, #ace0f9 100%);
    --room-day: #FFF7ED;
    --wall-day: #FED7AA;
    --bg-night: linear-gradient(135deg, #0B0C10 0%, #1F2833 50%, #111827 100%);
    --room-night: #1E1B4B;
    --wall-night: #312E81;
}

body {
    font-family: 'Quicksand', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    overflow-x: hidden;
}

/* Day & Night Room Lighting */
.room-container {
    transition: background 0.8s ease, filter 0.8s ease;
}

body.night-mode .room-container {
    background: radial-gradient(circle at 50% 30%, #312E81 0%, #0F172A 80%);
}

body.night-mode .window-sky {
    background: linear-gradient(to bottom, #020617 0%, #1E1B4B 100%) !important;
}

body.night-mode .window-sun {
    opacity: 0;
    transform: translateY(40px) scale(0.5);
}

body.night-mode .window-moon {
    opacity: 1;
    transform: translateY(0) scale(1);
}

body.night-mode .window-stars {
    opacity: 1;
}

body.night-mode .lamp-light {
    opacity: 0.85;
}

/* Cat Animations */

/* Breathing */
@keyframes catBreathe {
    0%, 100% {
        transform: scaleY(1) translateY(0);
    }
    50% {
        transform: scaleY(1.025) translateY(-2px);
    }
}
.animate-cat-breathe {
    animation: catBreathe 3.4s ease-in-out infinite;
}

/* Purring Vibration */
@keyframes catPurr {
    0%, 100% {
        transform: scale(1.05) translate(0, 0);
    }
    25% {
        transform: scale(1.05) translate(-1px, 1px);
    }
    50% {
        transform: scale(1.05) translate(1px, -1px);
    }
    75% {
        transform: scale(1.05) translate(-0.5px, -1px);
    }
}
.animate-cat-purr {
    animation: catPurr 0.15s ease-in-out infinite;
}

/* Eating Chewing */
@keyframes catEat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(4px) rotate(-2deg);
    }
    75% {
        transform: translateY(2px) rotate(2deg);
    }
}
.animate-cat-eat {
    animation: catEat 0.3s ease-in-out infinite;
}

/* Sleeping Deep Breathing */
@keyframes catSleep {
    0%, 100% {
        transform: scale(0.96) translateY(6px);
    }
    50% {
        transform: scale(0.99) translateY(3px);
    }
}
.animate-cat-sleep {
    animation: catSleep 4.5s ease-in-out infinite;
}

/* Playful Bounce */
@keyframes catPlay {
    0%, 100% {
        transform: translateY(0) scale(1, 1);
    }
    30% {
        transform: translateY(-24px) scale(0.95, 1.08) rotate(3deg);
    }
    50% {
        transform: translateY(0) scale(1.08, 0.92);
    }
    70% {
        transform: translateY(-12px) scale(0.98, 1.04) rotate(-2deg);
    }
}
.animate-cat-play {
    animation: catPlay 0.9s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}

/* Hungry Droop */
@keyframes catHungry {
    0%, 100% {
        transform: translateY(2px) rotate(-1deg);
    }
    50% {
        transform: translateY(5px) rotate(1deg);
    }
}
.animate-cat-hungry {
    animation: catHungry 3s ease-in-out infinite;
}

/* Tail Wagging */
@keyframes tailWag {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(18deg);
    }
}
.cat-tail {
    animation: tailWag 2.4s ease-in-out infinite;
}

/* Ears Twitch */
@keyframes earTwitchLeft {
    0%, 85%, 100% { transform: rotate(0deg); }
    88% { transform: rotate(-10deg); }
    92% { transform: rotate(5deg); }
}
@keyframes earTwitchRight {
    0%, 82%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(10deg); }
    89% { transform: rotate(-5deg); }
}
.cat-ear-left {
    animation: earTwitchLeft 5s ease-in-out infinite;
}
.cat-ear-right {
    animation: earTwitchRight 6s ease-in-out infinite;
}

/* Star Twinkle */
@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}
.star-1 { animation: starTwinkle 2s infinite ease-in-out; }
.star-2 { animation: starTwinkle 2.8s infinite ease-in-out 0.7s; }
.star-3 { animation: starTwinkle 3.4s infinite ease-in-out 1.2s; }
.star-4 { animation: starTwinkle 2.2s infinite ease-in-out 1.8s; }

/* Cloud Float */
@keyframes cloudFloat {
    0% { transform: translateX(-40px); }
    100% { transform: translateX(180px); }
}
.cloud-1 { animation: cloudFloat 22s linear infinite; }
.cloud-2 { animation: cloudFloat 32s linear infinite 8s; }

/* Yarn Ball bouncing mini-game */
.yarn-ball {
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4), inset -4px -4px 8px rgba(0, 0, 0, 0.2), inset 4px 4px 8px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: transform 0.1s ease;
}
.yarn-ball:hover {
    transform: scale(1.1);
}
.yarn-ball:active {
    transform: scale(0.9);
}

/* Dropping Food Animation */
@keyframes foodDrop {
    0% {
        transform: translateY(-80px) scale(0.5);
        opacity: 0;
    }
    60% {
        transform: translateY(10px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
.animate-food-drop {
    animation: foodDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Stat Progress Bar Gloss & Animation */
.stat-bar-fill {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
    position: relative;
    overflow: hidden;
}
.stat-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0));
    border-radius: 9999px;
}

/* Glassmorphism Cards */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
body.night-mode .glass-panel {
    background: rgba(30, 27, 75, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #F1F5F9;
}

/* Interactive Action Buttons */
.btn-action {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-action:hover {
    transform: translateY(-4px) scale(1.03);
}
.btn-action:active {
    transform: translateY(1px) scale(0.97);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background: #FBCFE8;
    border-radius: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
