#pet-display {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.glass-orb {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.01));
    box-shadow: 
        inset 0 0 20px rgba(255,255,255,0.2),
        0 0 30px rgba(139, 92, 246, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 300;
}

#pet-character {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    position: relative;
    transition: all 0.5s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.pet-idle {
    animation: breathe 3s ease-in-out infinite, morph 8s ease-in-out infinite;
}

.pet-talking {
    animation: talkBounce 0.5s ease-in-out infinite alternate;
}

.eye {
    width: 15px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    animation: blink 4s infinite;
    transition: all 0.3s ease;
}

.eye.left { left: 25px; }
.eye.right { right: 25px; }

.mouth {
    width: 20px;
    height: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 0 0 10px 10px;
    position: absolute;
    bottom: 25px;
    left: 40px;
    transition: all 0.3s ease;
}

/* Skin Mood Colors */
.mood-idle { background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%); }
.mood-happy { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.mood-sad { background: linear-gradient(135deg, #868f96 0%, #596164 100%); }
.mood-scared { background: linear-gradient(135deg, #29323c 0%, #485563 100%); }
.mood-angry { background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%); }
.mood-actualized { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); box-shadow: 0 0 40px #f6d365; }
.mood-sick { background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%); } /* Yemyeşil hasta rengi */

/* Facial Features Base */
.eyebrow {
    width: 18px;
    height: 5px;
    background: rgba(255, 255, 255, 0.95);
    position: absolute;
    top: 22px;
    border-radius: 4px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eyebrow.left { left: 22px; transform-origin: right center; }
.eyebrow.right { right: 22px; transform-origin: left center; }

.eye {
    width: 16px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.1);
    animation: blink 4s infinite;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.eye.left { left: 22px; }
.eye.right { right: 22px; }

.pupil {
    width: 8px;
    height: 8px;
    background: #0f172a;
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
    left: 4px;
    transition: all 0.3s ease;
    animation: lookAround 8s infinite;
    box-shadow: inset -1px -1px 2px rgba(255,255,255,0.5);
}

.pupil::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

.blush {
    width: 18px;
    height: 10px;
    background: rgba(255, 105, 180, 0.7);
    border-radius: 50%;
    position: absolute;
    top: 52px;
    opacity: 0;
    transition: all 0.5s ease;
    filter: blur(3px);
}

.blush.left { left: 14px; }
.blush.right { right: 14px; }

.nose {
    width: 6px;
    height: 3px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
    position: absolute;
    bottom: 39px;
    left: 50%;
    margin-left: -3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mouth {
    width: 22px;
    height: 12px;
    background: #0f172a;
    border-radius: 0 0 15px 15px;
    position: absolute;
    bottom: 22px;
    left: 50%;
    margin-left: -11px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.mouth::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 10px;
    background: #ff4757;
    border-radius: 50%;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

/* --- FACS (Facial Action Coding System) - Anime Anatomik Kas Haritası --- 
 * Kranial Sinir VII (Fasiyal Sinir) tarafından uyarılan kasların anime stilinde simülasyonu:
 * 
 * - Zygomaticus major/minor: Gülümseme (Ağız kenarlarını yukarı çeker)
 * - Orbicularis oculi: Gözleri kısma / kapatma (Mutlu yüz veya uyku hali)
 * - Corrugator supercilii: Kaş çatma (Kızgınlık ve odaklanma)
 * - Depressor anguli oris: Dudak sarkıtma / üzüntü (Ağız kenarlarını aşağı çeker)
 * - Occipitofrontalis: Kaşları kaldırma (Korku / Şaşkınlık)
 * - Orbicularis oris: Ağzı büzme / Konuşma hareketleri
 * - Procerus & Mentalis: Yüz buruşturma (Kızgınlıkta dudak altı gerginliği)
 */
.pet-idle .eyebrow { top: 22px; transform: rotate(0deg); }
.pet-idle .nose { bottom: 39px; }
.pet-idle .mouth { height: 10px; width: 20px; border-radius: 0 0 10px 10px; margin-left: -10px; }

.pet-neutral { animation: breathe 4s ease-in-out infinite, float 4s ease-in-out infinite; }

.pet-sad .mouth {
    height: 8px;
    width: 20px;
    margin-left: -10px;
    border-radius: 15px 15px 0 0;
    bottom: 18px;
    background: #0f172a;
}
.pet-sad .mouth::after { display: none; }
.pet-sad .eye {
    height: 18px;
    top: 38px;
    border-radius: 50% 50% 35% 35%;
    box-shadow: inset 0 -2px 4px rgba(0, 150, 255, 0.3);
}
.pet-sad .pupil { transform: translate(0, 3px); animation: none; }
.pet-sad .eyebrow.left { transform: rotate(-15deg) translateY(-1px) translateX(1px); }
.pet-sad .eyebrow.right { transform: rotate(15deg) translateY(-1px) translateX(-1px); }
.pet-sad .blush { opacity: 0.3; filter: blur(4px); }
.pet-sad .nose { width: 7px; height: 2px; border-radius: 40%; bottom: 38px; background: rgba(15, 23, 42, 0.4); }
.pet-sad { animation: sadShiver 3s ease-in-out infinite, float 4s ease-in-out infinite; }

.pet-happy .mouth {
    height: 14px;
    width: 24px;
    margin-left: -12px;
    border-radius: 0 0 15px 15px;
    bottom: 20px;
}
.pet-happy .mouth::after { bottom: -2px; width: 14px; height: 10px; }
.pet-happy .eye {
    height: 10px;
    width: 16px;
    border-radius: 15px 15px 5px 5px;
    top: 38px;
    background: transparent;
    border-top: 3px solid #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: none;
    animation: none;
}
.pet-happy .pupil { display: none; }
.pet-happy .blush { opacity: 0.8; transform: scale(1.1) translateY(-2px); }
.pet-happy .eyebrow { top: 18px; }
.pet-happy .eyebrow.left { transform: rotate(10deg); }
.pet-happy .eyebrow.right { transform: rotate(-10deg); }
.pet-happy .nose { bottom: 40px; transform: scale(1.1); }
.pet-happy { animation: breathe 2s ease-in-out infinite, happyBounce 1.5s ease-in-out infinite; }

.pet-scared .mouth {
    width: 10px;
    height: 14px;
    border-radius: 50%;
    bottom: 20px;
    margin-left: -5px;
    background: #0f172a;
}
.pet-scared .mouth::after { display: none; }
.pet-scared .eye {
    width: 18px;
    height: 22px;
    top: 34px;
    border-radius: 50%;
}
.pet-scared .pupil { width: 5px; height: 5px; left: 6.5px; bottom: 8px; animation: jitter 0.1s infinite alternate; }
.pet-scared .pupil::after { display: none; }
.pet-scared .eyebrow { top: 16px; }
.pet-scared .eyebrow.left { transform: rotate(15deg); }
.pet-scared .eyebrow.right { transform: rotate(-15deg); }
.pet-scared .nose { width: 4px; height: 3px; bottom: 39px; background: rgba(15, 23, 42, 0.5); }
.pet-scared { animation: tremble 0.2s infinite, float 4s ease-in-out infinite; }

.pet-angry .mouth {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    bottom: 23px;
    margin-left: -10px;
    transform: rotate(-3deg);
}
.pet-angry .mouth::after { display: none; }
.pet-angry .eye {
    height: 14px;
    top: 38px;
    border-radius: 15px 15px 5px 5px;
    background: #ffffff;
    box-shadow: inset 0 3px 5px rgba(255, 0, 0, 0.15), 0 2px 4px rgba(0,0,0,0.1);
}
.pet-angry .eyebrow { top: 22px; background: #fff; width: 20px; }
.pet-angry .eyebrow.left { transform: rotate(25deg) translateY(3px) translateX(1px); }
.pet-angry .eyebrow.right { transform: rotate(-25deg) translateY(3px) translateX(-1px); }
.pet-angry .pupil { background: #0f172a; transform: scale(0.7); animation: pupilTwitch 3s infinite; }
.pet-angry .pupil::after { background: white; }
.pet-angry .nose { width: 8px; height: 3px; border-radius: 4px; bottom: 38px; background: rgba(15, 23, 42, 0.8); margin-left: -4px; }
.pet-angry { animation: angryTremble 0.2s infinite; }

.pet-listening .mouth {
    width: 14px;
    height: 8px;
    border-radius: 5px 5px 10px 10px;
    bottom: 22px;
    margin-left: -7px;
}
.pet-listening .eye.left { height: 14px; top: 38px; }
.pet-listening .eyebrow.left { transform: translateY(-6px) rotate(-15deg); }
.pet-listening .eyebrow.right { transform: translateY(2px) rotate(5deg); }
.pet-listening .pupil { transform: translate(4px, -4px); animation: none; }
.pet-listening { animation: float 3s ease-in-out infinite; }

.pet-sleep .eye {
    height: 4px;
    background: white;
    border-radius: 2px;
    top: 45px;
    box-shadow: none;
    animation: none;
}
.pet-sleep .pupil { display: none; }
.pet-sleep .eyebrow { top: 38px; transform: translateY(2px); opacity: 0.5; }
.pet-sleep .mouth {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    bottom: 18px;
    margin-left: -5px;
    background: rgba(0,0,0,0.3);
    animation: sleepBreatheMouth 4s infinite ease-in-out;
}
.pet-sleep .mouth::after { display: none; }
.pet-sleep .nose { width: 5px; height: 3px; bottom: 36px; opacity: 0.6; }
.pet-sleep { animation: sleepBreathe 4s ease-in-out infinite; }
.pet-laughing .mouth {
    height: 22px; width: 32px; margin-left: -16px; border-radius: 0 0 25px 25px; bottom: 15px;
}
.pet-laughing .mouth::after { bottom: 0; width: 22px; height: 16px; }
.pet-laughing .eye { height: 4px; width: 18px; border-radius: 10px 10px 0 0; top: 42px; background: transparent; border-top: 4px solid #ffffff; box-shadow: none; animation: none; transform: rotate(-10deg); }
.pet-laughing .eye.right { transform: rotate(10deg); }
.pet-laughing .pupil { display: none; }
.pet-laughing .eyebrow { top: 15px; }
.pet-laughing .eyebrow.left { transform: rotate(20deg); }
.pet-laughing .eyebrow.right { transform: rotate(-20deg); }
.pet-laughing .blush { opacity: 1; transform: scale(1.5); }
.pet-laughing .nose { bottom: 44px; transform: scale(1.3) translateY(-2px); }
.pet-laughing { animation: tremble 0.3s infinite, happyBounce 1s ease-in-out infinite; }

.pet-surprised .mouth {
    width: 14px; height: 18px; border-radius: 10px; bottom: 18px; margin-left: -7px;
    animation: surpriseMouthDrop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.pet-surprised .mouth::after { display: none; }
.pet-surprised .eye { 
    width: 18px; height: 24px; top: 32px; border-radius: 50%;
    animation: surpriseEyePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.pet-surprised .pupil { width: 6px; height: 6px; left: 6px; bottom: 9px; transform: scale(0.85); animation: none; }
.pet-surprised .eyebrow { top: 12px; }
.pet-surprised .eyebrow.left { transform: rotate(5deg) translateY(-2px); }
.pet-surprised .eyebrow.right { transform: rotate(-5deg) translateY(-2px); }
.pet-surprised { animation: surpriseFloat 3s ease-in-out infinite; }

.pet-disgusted .mouth {
    width: 20px; height: 8px; border-radius: 5px 15px 5px 15px; bottom: 22px; margin-left: -10px; transform: rotate(-10deg);
}
.pet-disgusted .mouth::after { display: none; }
.pet-disgusted .eye { height: 10px; top: 40px; border-radius: 5px 15px 5px 15px; }
.pet-disgusted .pupil { transform: translate(-2px, -2px); animation: none; }
.pet-disgusted .eyebrow { top: 25px; }
.pet-disgusted .eyebrow.left { transform: translateY(4px) rotate(-15deg); }
.pet-disgusted .eyebrow.right { transform: translateY(2px) rotate(25deg); }
.pet-disgusted { animation: sadShiver 2s ease-in-out infinite; }

.pet-thinking .mouth {
    width: 12px; height: 8px; border-radius: 5px; bottom: 24px; left: 60%; /* Ağız yana kayar (Risorius) */ margin-left: -6px;
}
.pet-thinking .mouth::after { display: none; }
.pet-thinking .eye.left { height: 16px; top: 38px; }
.pet-thinking .eye.right { height: 22px; top: 35px; }
.pet-thinking .eyebrow.left { transform: translateY(4px) rotate(-10deg); }
.pet-thinking .eyebrow.right { transform: translateY(-6px) rotate(20deg); }
.pet-thinking .pupil { transform: translate(4px, -4px); animation: none; }
.pet-thinking .nose { bottom: 39px; margin-left: -5px; }
.pet-thinking { animation: float 4s ease-in-out infinite; }

.pet-love .mouth {
    height: 16px; width: 24px; margin-left: -12px; border-radius: 0 0 20px 20px; bottom: 20px;
}
.pet-love .mouth::after { bottom: -2px; width: 14px; height: 12px; }
.pet-love .eye { width: 22px; height: 22px; background: transparent; box-shadow: none; border-radius: 0; animation: none; }
/* Gözleri kalp yapmak için (pseudo-element tabanlı kalp şekli) */
.pet-love .eye::before, .pet-love .eye::after {
    content: ''; position: absolute; width: 12px; height: 18px; background: #ff4757; border-radius: 12px 12px 0 0; top: 0; left: 10px; transform: rotate(-45deg); transform-origin: 0 100%; transition: none;
}
.pet-love .eye::after { left: -2px; transform: rotate(45deg); transform-origin: 100% 100%; }
.pet-love .pupil { display: none; }
.pet-love .eyebrow { top: 16px; }
.pet-love .eyebrow.left { transform: rotate(20deg); }
.pet-love .eyebrow.right { transform: rotate(-20deg); }
.pet-love .blush { opacity: 1; transform: scale(1.4); background: rgba(255, 71, 87, 0.8); }
.pet-love { animation: happyBounce 1s ease-in-out infinite; }


.pet-talking .mouth {
    animation: talkMouth 0.3s infinite alternate;
}

/* Animations */
@keyframes breatheMouth {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes lookAround {
    0%, 20% { transform: translate(0, 0); }
    21%, 40% { transform: translate(-4px, 1px); }
    41%, 60% { transform: translate(3px, -2px); }
    61%, 80% { transform: translate(-1px, 4px); }
    81%, 95% { transform: translate(2px, 2px); }
    96%, 100% { transform: translate(0, 0); }
}

@keyframes jitter {
    0% { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

@keyframes talkMouth {
    0% { height: 6px; border-radius: 10px; bottom: 22px; }
    100% { height: 18px; border-radius: 0 0 15px 15px; bottom: 18px; }
}

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

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

@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

@keyframes blink {
    0%, 45%, 49%, 92%, 98%, 100% { transform: scaleY(1); }
    47% { transform: scaleY(0.1); } /* Single blink */
    94%, 96% { transform: scaleY(0.1); } /* Double blink */
}

@keyframes talkBounce {
    0% { transform: translateY(0) scaleX(1); }
    100% { transform: translateY(-5px) scaleX(1.05); }
}

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

@keyframes sadShiver {
    0%, 100% { transform: scale(0.95); }
    50% { transform: scale(0.95) translateY(2px); }
}

@keyframes tremble {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -1px); }
}

@keyframes sleepFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes sleepBreathe {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    50% { transform: translateY(5px) scale(1.06, 0.94); }
}

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

@keyframes pupilTwitch { 
    0%, 90% { transform: scale(0.8) translate(0,0); } 
    92% { transform: scale(0.8) translate(-1px, 1px); } 
    94% { transform: scale(0.8) translate(1px, -1px); } 
    96%, 100% { transform: scale(0.8) translate(0,0); } 
}

@keyframes angryTremble {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

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

@keyframes surpriseMouthDrop {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(2px) scale(1.05); }
}

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

/* Tablet (iPad, Android Tablet vb.) */
@media (min-width: 768px) {
    .glass-orb {
        width: 320px;
        height: 320px;
    }
    #pet-character {
        scale: 1.3;
    }
}

/* Masaüstü PC ve Geniş Ekranlar */
@media (min-width: 1024px) {
    .glass-orb {
        width: 400px;
        height: 400px;
    }
    #pet-character {
        scale: 1.6;
    }
}
