/* ============================================================
   FACE-CSS-BLOCK 1: Globale Basis-Positionierung (rechts unten)
   ============================================================ */
.face-owl {
    position: fixed;
    bottom: 20px;
    right: 20px;          /* ← rechts statt links */
    left: auto;
    z-index: 10000;
    cursor: pointer;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.15));
    transition: filter 0.3s;
}
.face-owl:hover {
    filter: drop-shadow(0 12px 20px rgba(0,0,0,0.2));
}

/* ============================================================
   FACE-CSS-BLOCK 2: Eulen-Körper
   ============================================================ */
.face-container {
    position: relative;
    width: 100px;
    height: 110px;
}

/* ============================================================
   FACE-CSS-BLOCK 3: Ohren
   ============================================================ */
.face-ears {
    position: absolute;
    top: -18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
}
.face-ear {
    width: 28px;
    height: 32px;
    background: #fbd5a2;
    border-radius: 50% 50% 40% 40%;
    position: relative;
    overflow: hidden;
}
.face-ear.left {
    transform: rotate(-12deg);
}
.face-ear.right {
    transform: rotate(12deg);
}
.ear-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: #e8b07d;
    border-radius: 0 0 40% 40%;
}

/* ============================================================
   FACE-CSS-BLOCK 4: Kopf
   ============================================================ */
.face-head {
    width: 100%;
    height: 75px;
    background: #fbd5a2;
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.03), 0 5px 10px rgba(0,0,0,0.05);
}

/* ============================================================
   FACE-CSS-BLOCK 5: Augen
   ============================================================ */
.face-eyes {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding-top: 18px;
}
.face-eye {
    position: relative;
    width: 28px;
    height: 28px;
}
.eye-white {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.eye-pupil {
    width: 12px;
    height: 12px;
    background: #2c1810;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 8px;
    transition: transform 0.1s;
}
.eye-glow {
    position: absolute;
    top: 4px;
    left: 5px;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
}
.eyelid {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fbd5a2;
    border-radius: 50%;
    transition: top 0.1s ease;
}

/* ============================================================
   FACE-CSS-BLOCK 6: Mund, Wangen, Schnabel
   ============================================================ */
.face-smile {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 14px;
    border-bottom: 3px solid #c47d4a;
    border-radius: 0 0 20px 20px;
}
.face-cheek {
    position: absolute;
    bottom: 18px;
    width: 16px;
    height: 9px;
    background: #f7bc9b;
    border-radius: 50%;
    opacity: 0.7;
}
.face-cheek.left {
    left: 12px;
}
.face-cheek.right {
    right: 12px;
}
.face-beak {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    background: #e8a86a;
    border-radius: 50% 50% 20% 20%;
}

/* ============================================================
   FACE-CSS-BLOCK 7: Körper & Füße
   ============================================================ */
.face-body {
    position: absolute;
    bottom: -18px;
    left: 12px;
    width: 76px;
    height: 40px;
    background: #fbd5a2;
    border-radius: 0 0 50% 50%;
    z-index: -1;
    box-shadow: inset 0 5px 8px rgba(0,0,0,0.02);
}
.face-feet {
    position: absolute;
    bottom: -28px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 24px;
}
.face-foot {
    width: 16px;
    height: 8px;
    background: #e8a86a;
    border-radius: 0 0 10px 10px;
}

/* ============================================================
   FACE-CSS-BLOCK 8: Chat-Panel
   ============================================================ */
.face-chat-panel {
    position: absolute;
    bottom: 115px;
    right: 110px;        /* ← rechts */
    left: auto;
    width: 320px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-family: 'Montserrat', sans-serif;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.chat-header {
    background: #fbd5a2;
    padding: 12px 16px;
    border-radius: 24px 24px 0 0;
    font-weight: 600;
    color: #4a2c1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #4a2c1a;
}
.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #fefaf5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.85rem;
    line-height: 1.4;
}
.message.user {
    background: #fbd5a2;
    color: #2c1810;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.message.bot {
    background: #e9ecef;
    color: #1a1a2e;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.message-feedback {
    margin-left: 8px;
    display: inline-flex;
    gap: 6px;
}
.feedback-thumb {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.feedback-thumb:hover {
    opacity: 1;
}
.chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #f0d5b0;
    gap: 8px;
    background: white;
    border-radius: 0 0 24px 24px;
}
#face-input {
    flex: 1;
    border: 1px solid #f0d5b0;
    border-radius: 40px;
    padding: 8px 15px;
    font-size: 0.85rem;
    outline: none;
}
#face-send {
    background: #fbd5a2;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a56e3a;
    transition: background 0.2s;
}
#face-send:hover {
    background: #f0c28a;
}

/* ============================================================
   FACE-CSS-BLOCK 9: Eingeklappter Zustand
   ============================================================ */
.face-chat-panel.collapsed {
    width: auto;
    height: auto;
}
.face-chat-panel.collapsed .chat-messages,
.face-chat-panel.collapsed .chat-input-area {
    display: none;
}

/* ============================================================
   FACE-CSS-BLOCK 10: Animationen
   ============================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}
.face-owl {
    animation: float 3.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 45%, 55%, 100% { top: -100%; }
    48%, 52% { top: 0; }
}
.eyelid {
    animation: blink 4s infinite;
}

@keyframes gentleLook {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3px, 2px); }
    50% { transform: translate(-2px, -1px); }
    75% { transform: translate(1px, 3px); }
}
.eye-pupil {
    animation: gentleLook 8s infinite ease-in-out;
}

@keyframes cheekPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}
.face-cheek {
    animation: cheekPulse 3s infinite;
}