/* --- AI BOT ANIMATIONS --- */
.hg-float-anim {
    animation: hgFloat 4s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes hgFloat {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-8px);
    }
}

.bot-eye {
    transition: transform 0.15s ease-out;
    /* Smooth snapping for mouse tracking */
    will-change: transform;
}

.bot-cursor {
    animation: hgBlink 1s step-end infinite;
}

@keyframes hgBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ========================================= */
/* === AI-BOT 9000 — HAL 9000 SKIN      === */
/* ========================================= */

:root {
    /* HAL skin tokens */
    --hal-body-start: #3a3a3a;
    --hal-body-end: #1c1c1c;
    --hal-toolbar-bg: #c8c8c8;
    --hal-toolbar-h: 40px;
    --hal-btn-bg: #d8d8d8;
    --hal-btn-border: #aaaaaa;
    --hal-btn-shadow: rgba(0, 0, 0, 0.35);
    --hal-title-color: #111111;
    --hal-console-bg: #000000;
    --hal-text: #28a530;
    /* Classic skin tokens (fallback) */
    --bot-bg-start: #b1b0d4;
    --bot-bg-end: #9a98c3;
    --bot-highlight: rgba(255, 255, 255, 0.6);
    --bot-shadow: rgba(40, 40, 70, 0.3);
    --bot-screen: #111418;
    --bot-text: #28a530;
    --bot-icon: #5a577d;
}

/* ---- BODY ---- */
.bot-body-3d {
    display: flex;
    flex-direction: column;
    background: linear-gradient(170deg, var(--hal-body-start) 0%, var(--hal-body-end) 100%);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 50px 8px rgba(200, 30, 30, 0.12),
        0 24px 48px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.442);
    width: 180px !important;
    height: 421px !important;
    max-width: 180px !important;
    max-height: 421px !important;
    min-width: 180px !important;
    min-height: 421px !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* ---- TOOLBAR ---- */
.bot-header-area {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: var(--hal-body-start);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    height: var(--hal-toolbar-h);
    flex-shrink: 0;
    cursor: grab;
    border-bottom: 1px solid #b3b3b3;
    border-radius: 13px 13px 0 0;
}

.bot-header-area:active {
    cursor: grabbing;
}

/* Continuous black field across the entire header as requested */
.bot-header-field {
    background: #000000;
    height: 32px;
    margin: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(58, 69, 73, 0.317);
    width: calc(100% - 8px);
    position: relative;
    /* overflow: hidden; Removed so tooltips can pop out */
    background: linear-gradient(90deg, #00e5ff 0%, #00e5ff 50%, #000000 50%, #000000 100%);
}

#aiBotCard:not(.skin-first):not(.skin-classic) .bot-header-field::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    bottom: -1px;
    left: 50%;
    border: 1px solid #00e5ff;
    border-left: none;
    border-radius: 0 4px 4px 0;
    pointer-events: none;
    z-index: 5;
}

#aiBotCard:not(.skin-first):not(.skin-classic) #botSkinToggle {
    color: #000000 !important;
}

#aiBotCard:not(.skin-first):not(.skin-classic) .bot-close-btn {
    color: #ffffff !important;
}

/* Toolbar buttons: flat design */
.bot-btn-3d {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    background: transparent;
    border-radius: 4px;
    border: none;
    box-shadow: none;
    color: #babcc7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    flex-shrink: 0;
}

.bot-btn-3d:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.bot-btn-3d:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(1px);
}

/* Drag handle indicator — visual only, not interactive */
.bot-drag-handle-indicator {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #7c7c7c;
    opacity: 0.8;
    cursor: grab;
    pointer-events: auto;
}

/* Spacer pushes title+close to the right side */
.bot-toolbar-spacer {
    flex: 1;
}

/* Ensure bot-title-text only shows when intended */
.bot-title-text {
    display: none;
}

/* ---- NAME BANNER (below toolbar, above eye) ---- */
.bot-name-banner {
    display: flex;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
    letter-spacing: -0.02em;
    border-bottom: 2px solid #222;
    flex-shrink: 0;
    user-select: none;
}

.bot-name-banner .name-part {
    background: #00e5ff;
    color: #000;
    padding: 6px 10px;
    flex: 1;
}

.bot-name-banner .number-part {
    background: #000;
    color: #fff;
    padding: 6px 10px;
    letter-spacing: 0;
}

/* Close button */
.bot-close-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

/* ---- HAL EYE AREA ---- */
.bot-eye-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle vertical center line (spaceship panel reference) */
.bot-eye-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(200, 20, 20, 0.06) 0%, transparent 70%);
    pointer-events: auto;
}

/* Outer metallic ring - Sharper conic gradient */
.hal-eye-ring {
    position: relative;
    margin-top: 30px;
    width: 154px;
    height: 154px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            #888 0deg,
            #eee 40deg,
            #777 90deg,
            #ddd 130deg,
            #666 180deg,
            #ccc 220deg,
            #555 270deg,
            #bbb 320deg,
            #888 360deg);
    box-shadow:
        0 0 0 4px #333,
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.8),
        0 0 40px 2px rgba(200, 20, 20, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Inner metallic ring (The second ring requested by user) */
.hal-inner-ring {
    position: absolute;
    width: 138px;
    height: 138px;
    border-radius: 50%;
    background: conic-gradient(from 180deg,
            #444 0deg,
            #666 45deg,
            #333 90deg,
            #777 150deg,
            #444 180deg,
            #666 230deg,
            #2a2a2a 270deg,
            #555 310deg,
            #444 360deg);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Decorative arcs inside the inner ring (as seen in image 2) */
.hal-inner-ring::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 10%;
    border-top: 5px solid rgba(255, 255, 255, 0.12);
    border-radius: 50% 50% 0 0;
}

.hal-inner-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    width: 8%;
    height: 60%;
    border-left: 5px solid rgba(255, 255, 255, 0.08);
    border-radius: 50% 0 0 50%;
}

/* Dark recess behind lens - enhanced depth */
.hal-eye-lens {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%,
            #780101 0%,
            #410000 20%,
            #250000 40%,
            #000000 70%);
    box-shadow:
        inset 0 0 10px 2px rgba(0, 0, 0, 0.6);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

/* Glass reflection sheen - top highlight */
.hal-eye-lens::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126 126'><path d='M 11 44 A 55 55 0 0 1 49 10' fill='none' stroke='white' stroke-width='6' stroke-linecap='round' opacity='0.3'/><path d='M 77 10 A 55 55 0 0 1 115 44' fill='none' stroke='white' stroke-width='6' stroke-linecap='round' opacity='0.1'/></svg>") no-repeat center / contain;
    pointer-events: none;
    z-index: 10;
    filter: blur(0.5px);
}


/* Iris container — transparent, just holds the pupil */
.hal-eye-iris {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pupil — 7 rounded SVG bars arranged in a perfect circle */
.hal-pupil {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><rect x='11.15' y='1.5' width='13.7' height='3' rx='1.5' fill='%23ff2020'/><rect x='4.9' y='6.5' width='26.2' height='3' rx='1.5' fill='%23ff2020'/><rect x='2.25' y='11.5' width='31.5' height='3' rx='1.5' fill='%23ff2020'/><rect x='1.5' y='16.5' width='33' height='3' rx='1.5' fill='%23ff2020'/><rect x='2.25' y='21.5' width='31.5' height='3' rx='1.5' fill='%23ff2020'/><rect x='4.9' y='26.5' width='26.2' height='3' rx='1.5' fill='%23ff2020'/><rect x='11.15' y='31.5' width='13.7' height='3' rx='1.5' fill='%23ff2020'/></svg>") no-repeat center / contain;
    overflow: hidden;
    transition: transform 0.12s ease-out;
    will-change: transform;
}

/* Red glow pulse on the ring */
@keyframes halGlowPulse {
    0% {
        box-shadow: 0 0 0 3px #444, 0 4px 24px rgba(0, 0, 0, 0.9), 0 0 20px 2px rgba(151, 10, 10, 0.2);
    }

    50% {
        box-shadow: 0 0 0 3px #444, 0 4px 24px rgba(0, 0, 0, 0.9), 0 0 20px 8px rgba(151, 14, 14, 0.5);
    }

    100% {
        box-shadow: 0 0 0 3px #444, 0 4px 24px rgba(0, 0, 0, 0.9), 0 0 20px 2px rgba(143, 11, 11, 0.2);
    }
}

.hal-eye-ring {
    animation: halGlowPulse 4s ease-in-out infinite;
}

/* Sleep state: eye dims */
.hal-eye-ring.hal-sleeping .hal-pupil {
    opacity: 0.06;
    transition: opacity 0.4s ease-in-out;
}

.hal-eye-ring.hal-sleeping {
    animation: none;
    box-shadow:
        0 0 0 3px #333,
        0 4px 24px rgba(0, 0, 0, 0.9),
        0 0 10px 1px rgba(80, 0, 0, 0.1);
}

/* ---- SEPARATOR ---- */
.bot-separator-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

/* ---- CONSOLE (bottom) ---- */
.bot-screen-container {
    padding: 2px 2px 2px 2px;
    flex-shrink: 0;
    background: transparent;
    height: auto;
    position: relative;
    z-index: 10;
}

/* Hide old inset screen — console is handled by bot-console-inset now */
.bot-screen-inset {
    display: none;
}

.bot-console-inset {
    background: #000;
    border-radius: 8px;
    box-shadow:
        inset 2px 2px 2px rgba(0, 0, 0, 1),
        inset -1px -1px 3px rgba(100, 100, 120, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(60, 60, 60, 0.9);
    height: 110px !important;
    width: auto !important;
    max-height: 110px !important;
    min-height: 110px !important;
    overflow: hidden !important;
    margin: 0;
    position: relative;
}

.bot-console-inset>div {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Custom scrollbar for bot terminal */
.bot-console-inset>div::-webkit-scrollbar {
    width: 2px !important;
}

.bot-console-inset>div::-webkit-scrollbar-track {
    background: transparent !important;
    margin-block: 8px !important;
}

.bot-console-inset>div::-webkit-scrollbar-thumb {
    background-color: #28a530 !important;
    border-radius: 0 !important;
}

.bot-console-text,
#botConsole {
    color: var(--hal-text);
    text-shadow: 0 0 5px rgba(40, 165, 48, 0.7);
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    display: inline !important;
    max-width: 100% !important;
    line-height: 1.4 !important;
    font-size: 11px !important;
}

/* Bottom row: console + send button */
.bot-bottom-area {
    flex-shrink: 0;
    padding: 4px;
    /* Uniform padding to match top gap with sides and bottom */
    display: flex;
    gap: 8px;
    align-items: flex-start;
    position: relative;
    z-index: 20;
    overflow: hidden;
    height: auto;
}

/* Skin dropdown */
.bot-skin-menu {
    position: absolute;
    top: calc(var(--hal-toolbar-h) + 4px);
    left: 8px;
    background: #2b213e;
    border: 1px solid #635882;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 100;
    overflow: hidden;
    min-width: 140px;
    display: none;
    padding: 8px;
}

.bot-skin-menu.open {
    display: block;
}

.bot-skin-menu button {
    display: block;
    width: 100%;
    padding: 6px 11px;
    border-radius: 6px;
    text-align: left;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #e1dee6;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.bot-skin-menu button:hover {
    background: rgba(9, 131, 161, 0.772);
}

.bot-skin-menu button.active-skin {
    color: rgb(16, 194, 253)
}

/* ========================================= */
/* === CLASSIC SKIN OVERRIDE              === */
/* ========================================= */
#aiBotCard.skin-classic {
    background: linear-gradient(145deg, var(--bot-bg-start), var(--bot-bg-end));
    border-radius: 11px;
    box-shadow:
        inset 2px 2px 5px var(--bot-highlight),
        inset -2px -2px 5px var(--bot-shadow),
        0 0 40px 10px rgba(50, 40, 150, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 232px !important;
    height: 300px !important;
    max-width: 232px !important;
    max-height: 300px !important;
    min-width: 232px !important;
    min-height: 300px !important;
}

#aiBotCard.skin-classic .bot-header-area {
    background: transparent;
    border-radius: 0;
    border-bottom: none;
}

/* === CLASSIC SKIN DROPDOWN MENU === */
#aiBotCard.skin-classic .bot-skin-menu {
    background: #e5e5e5;
    /* Classic light grey */
    border: 1px solid #000000;
    border-radius: 4px;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
    padding: 2px;
    /* Small inner border */
    top: calc(var(--hal-toolbar-h) + 2px);
    /* Kicsit lejjebb */
}

#aiBotCard.skin-classic .bot-skin-menu button {
    font-family: 'Geneva', 'Helvetica', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #000000;
    border-radius: 0;
    padding: 6px 12px;
}

#aiBotCard.skin-classic .bot-skin-menu button:hover {
    background: #4c4cda;
    /* Classic selection blue */
    color: #ffffff;
}

#aiBotCard.skin-classic .bot-skin-menu button.active-skin {
    color: #000000;
    font-weight: 800;
}

#aiBotCard.skin-classic .bot-skin-menu button.active-skin:hover {
    color: #ffffff;
}

#aiBotCard.skin-classic .bot-btn-3d {
    background: linear-gradient(145deg, var(--bot-bg-start), var(--bot-bg-end)) !important;
    border: 1px solid rgba(40, 40, 60, 0.4) !important;
    box-shadow:
        inset -1px -1px 0 var(--bot-highlight),
        inset -1px -1px 0 var(--bot-shadow) !important;
    color: var(--bot-icon) !important;

    /* GOMBOK MÉRETE (Ide beírhatod hogy mekkorák legyenek a gombok) */
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

#aiBotCard.skin-classic .bot-btn-3d:hover {
    background: linear-gradient(145deg, var(--bot-bg-end), var(--bot-bg-start)) !important;
    filter: brightness(1.1);
    transform: none;
}

#aiBotCard.skin-classic .bot-btn-3d:active {
    box-shadow:
        inset -1px -1px 0 var(--bot-highlight),
        inset 1px 1px 0 var(--bot-shadow) !important;
    transform: translateY(1px);
    background: linear-gradient(145deg, var(--bot-bg-end), var(--bot-bg-start)) !important;
}

/* === CLASSIC MAC OS 9 "CLOSE BOX" ICON HACK === */
#aiBotCard.skin-classic .bot-close-btn {
    position: relative;
}

/* Elrejtjük a modern 'X' ikont a bezáró gombon, de megtartjuk a tooltipet */
#aiBotCard.skin-classic .bot-close-btn span.material-symbols-outlined {
    display: none;
}

/* Megrajzoljuk CSS-ből az autentikus kis mélyedéses négyzetet a bal felső sarokba */
#aiBotCard.skin-classic .bot-close-btn::before {
    content: '';
    position: absolute;
    border-radius: 3px;
    top: -1px;
    left: -1px;
    width: 14px;
    height: 14px;
    /* Mélyedés "vésett" effekt árnyékokkal */
    box-shadow:
        inset 0px 0px 0 rgba(0, 0, 0, 0.5),
        1px 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(32, 32, 32, 0.4);
    background: transparent;
}

#aiBotCard.skin-classic .bot-header-field {
    /* MAPPA ABLAK FEJLÉC SÁV (Classic Window Title Bar) */
    background: repeating-linear-gradient(180deg,
            rgba(255, 255, 255, 0.2) 0px,
            rgba(255, 255, 255, 0.2) 1px,
            rgba(0, 0, 0, 0.3) 3px,
            rgba(0, 0, 0, 0.3) 2px);

    /* 
      === RÁCSOS/CSÍKOS HÁTTÉR POZÍCIÓJA ÉS MÉRETE === 
      Hogy a rács se a bal, se a jobb szélre ne lógjon ki (ahogy a Mac OS 9-ben!):
      - background-repeat: no-repeat.
      - background-size: Itt vonjuk ki a "bal szünet" és a "jobb szünet" együttes helyét a teljes szélességből (pl. 94px + 12px = ~106px). 
      - background-position: Nem 'right', hanem pl. '94px 0px'. Ezzel a bal széltől pont a gombok után, 94 pixeltől indul el a kép. Az Y tengelyen továbbra is állíthatod (az utolsó érték).
    */
    background-repeat: no-repeat;
    background-size: calc(100% - 64px) 100%;
    /* Pl. 94px balra + 36px jobbra */
    background-position: 32px -2px;

    /* === MÉRETEK === */
    /* Ide írd a magasságot: */
    height: 36px !important;

    /* A teljes kitöltéshez eltávolítottunk minden margót */
    margin: 0;
    width: 100%;

    /* Felső sarkok kerekítése, hogy kövesse a robot 11px-es sarkait */
    border-radius: 8px 8px 0 0;

    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.4),
        inset -1px -1px 0 rgba(182, 182, 182, 0.6);

    /* Csak alsó keret kell, különben oldalról kilóghat */
    border: none;
    border-bottom: 1px solid #5a5a5a;

    /* 
      === GOMBOK POZÍCIÓJA ÉS TÁVOLSÁGA === 
      A gombok pozícióját a padding-left és justify-content segítségével állíthatod!
      - padding: FELSŐ JOBB ALSÓ BAL (pl. 0 8px 0 16px -> beljebb tolja kicsit jobbra)
      - justify-content: flex-start (balra), center (középre), flex-end (jobbra)
    */
    padding: 4px 4px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    /* Gombok egymás közötti távolsága */
    position: relative;
    /* Pozícionálás a cím középre igazításához */
}

/* Elrejtjük a drag ikont a Classic skinnél, mivel az egész címsor egyértelműen húzható */
#aiBotCard.skin-classic .bot-drag-handle-indicator {
    display: none !important;
}

#aiBotCard.skin-classic .bot-title-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline;
    /* restore title in classic toolbar */
    color: var(--bot-icon);
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);

    /* Gombok mögötti sávon a szöveg háttere, hogy olvasható legyen a csíkozás előtt */
    background: var(--bot-bg-start);
    padding: 7px 14px;
    border: 0px solid rgba(40, 40, 60, 0.4);
    box-shadow: inset 0px 0px 0 var(--bot-highlight);
}

#aiBotCard.skin-classic .bot-name-banner-small {
    display: none;
}

#aiBotCard.skin-classic .bot-eye-area {
    display: none;
}

#aiBotCard.skin-classic .classic-face-container {
    display: block !important;
    background: #626CE1;
    /* Classic blue bezel */
    border-radius: 12px;
    padding: 1px;
    margin: 8px 14px;
    height: 140px;
    box-shadow:
        inset -1px -1px 3px rgba(0, 0, 0, 0.2),
        inset 1px 1px 3px rgba(255, 255, 255, 0.4),
        0 2px 5px rgba(0, 0, 0, 0.3);
}

#aiBotCard.skin-classic .bot-screen-inset-classic {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #b7b7fc;
    border-radius: 8px;
    margin: 12px;
    height: calc(100% - 24px);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.15);
}

#aiBotCard.skin-classic .bot-separator-line {
    display: none;
}

#aiBotCard.skin-classic .bot-screen-container {
    display: block;
    height: auto;
}

#aiBotCard.skin-classic .bot-console-inset {
    height: 88px !important;
    max-height: 88px !important;
    min-height: 88px !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 9px !important;

    /* Fehér ablakbelső a konzolhoz (Mac OS 8.6 kinézet) */
    background: #ffffff !important;

    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.2),
        inset -1px -1px 3px rgba(255, 255, 255, 1),
        0 2px 2px rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(50, 50, 50, 0.8) !important;
}

/* Fekete görgetősáv a classic skin konzoljában */
#aiBotCard.skin-classic .bot-console-inset>div::-webkit-scrollbar-thumb {
    background-color: #000000 !important;
}

/* Sötét szürke szöveg és kurzor a fehér konzol belsőhöz */
#aiBotCard.skin-classic .bot-console-text {
    color: #333333 !important;
    text-shadow: none !important;
}

#aiBotCard.skin-classic .bot-cursor {
    background: #333333 !important;
    box-shadow: none !important;
    /* Nincs zöld glória a klasszikus kurzor körül */
}

/* Szöveg generáló "Enter" gomb az ablakon belül sötétszürke lesz */
#aiBotCard.skin-classic #botTalkBtn {
    color: #333333 !important;
}

#aiBotCard.skin-classic .bot-bottom-area {
    height: 105px !important;
    padding: 2px 14px 14px 14px !important;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

#aiBotCard.skin-classic #botTalkBtnHal {
    display: none;
}

.classic-face-container {
    display: none;
}

/* ---- Z-float for sleep ---- */
@keyframes botZFloat {
    0% {
        opacity: 0.9;
        transform: translateY(0) translateX(0) scale(0.8);
    }

    50% {
        opacity: 0.7;
        transform: translateY(-25px) translateX(8px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) translateX(15px) scale(1.1);
    }
}

/* Keep old eye/mouth helpers for classic skin JS compat */
.bot-eyes-glow {
    box-shadow: 0 0 15px 2px rgba(99, 102, 211, 0.6);
    background: #4431ac;
}

.bot-mouth-el {
    background: #4431ac;
    box-shadow: 0 0 12px 2px rgba(99, 102, 211, 0.6);
    border-radius: 4px;
}

/* ========================================= */
/* === ORIGINAL (FIRST) SKIN OVERRIDE     === */
/* ========================================= */
#aiBotCard.skin-first {
    background: #1B1E28 !important;
    /* dark slate background */
    border-radius: 9px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border: none !important;
    width: 210px !important;
    height: 290px !important;
    max-width: 210px !important;
    max-height: 290px !important;
    min-width: 190px !important;
    min-height: 260px !important;
    padding: 0 !important;
}

#aiBotCard.skin-first .bot-header-area {
    background: transparent !important;
    border-radius: 0 !important;
    border-bottom: none !important;
}

#aiBotCard.skin-first .bot-header-field {
    background: #8B5CF6 !important;
    /* solid purple */
    height: 38px !important;
    margin: 0 !important;
    width: 100% !important;
    border-radius: 9px 9px 0 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    position: relative !important;
}

#aiBotCard.skin-first .bot-title-text {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    text-shadow: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

#aiBotCard.skin-first .bot-btn-3d {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

#aiBotCard.skin-first .bot-btn-3d:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 4px !important;
    transform: none !important;
}

/* Hide HAL parts */
#aiBotCard.skin-first .bot-name-banner-small,
#aiBotCard.skin-first .bot-eye-area {
    display: none !important;
}

#aiBotCard.skin-first .bot-drag-handle-indicator {
    display: none !important;
    /* Hide drag indicator, menu takes first spot */
}

/* Face area - no bezel, just floating on background */
#aiBotCard.skin-first .classic-face-container {
    display: block !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 16px 14px 8px 14px !important;
    height: 115px !important;
    box-shadow: none !important;
}

#aiBotCard.skin-first .bot-screen-inset-classic {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    box-shadow: none !important;
}

/* Square neon green eyes and mouth elements */
#aiBotCard.skin-first .bot-eye {
    width: 28px !important;
    height: 28px !important;
    border-radius: 2px !important;
    background: #34d399 !important;
    /* neon green */
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.4) !important;
}

#aiBotCard.skin-first .bot-mouth-el {
    border-radius: 2px !important;
    background: #34d399 !important;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.4) !important;
    height: 8px !important;
}

#aiBotCard.skin-first #botMouthMiddle {
    width: 40px !important;
}

#aiBotCard.skin-first .bot-separator-line {
    display: none !important;
}

/* Console Area */
#aiBotCard.skin-first .bot-bottom-area {
    height: 120px !important;
    padding: 0 6px 6px 6px !important;
    display: flex !important;
    align-items: flex-end !important;
}

#aiBotCard.skin-first .bot-screen-container {
    display: block !important;
    height: 100% !important;
    width: 100% !important;
}

#aiBotCard.skin-first .bot-console-inset {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 6px !important;
    background: #15181e !important;
    /* Slightly darker than card background */
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Bottom glowing neon line inside console */
#aiBotCard.skin-first .bot-console-inset::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: 8px;
    height: 3px;
    background: #34d399;
    border-radius: 2px;
    box-shadow: 0 0 10px 2px rgba(52, 211, 153, 0.6);
    pointer-events: none;
}

#aiBotCard.skin-first .bot-console-text {
    color: #e2e8f0 !important;
    /* light grey text */
    text-shadow: none !important;
    font-size: 11px !important;
    padding-bottom: 24px !important;
    /* Move text up above glowing line */
    display: inline-block;
}

#aiBotCard.skin-first .bot-cursor {
    background: #a78bfa !important;
    /* Light purple blinking cursor */
    box-shadow: none !important;
}

#aiBotCard.skin-first #botTalkBtn {
    color: #34d399 !important;
    bottom: 12px !important;
    /* Move it up because of the glowing line */
    right: 6px !important;
    opacity: 1 !important;
}

#aiBotCard.skin-first .bot-console-inset>div::-webkit-scrollbar-thumb {
    background-color: #4b5563 !important;
}


/* ---- AI BOT CONTACT MODAL (Matches Stacked-Card Style) ---- */
.bot-modal-card {
    border-radius: 24px;
    background: #f8f9fa;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 16px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.dark .bot-modal-card {
    background: #141e2d;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.dark .bot-modal-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, transparent 45%, rgba(99, 102, 241, 0.06) 100%);
}

/* --- Animated Success Checkmark --- */
.checkbox-wrapper-12 {
    position: relative;
    width: 24px;
    height: 24px;
}

.checkbox-wrapper-12>svg.filter-svg {
    position: absolute;
    top: -130%;
    left: -170%;
    width: 110px;
    pointer-events: none;
}

.checkbox-wrapper-12 * {
    box-sizing: border-box;
}

.checkbox-wrapper-12 input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    margin: 0;
}

.checkbox-wrapper-12 input[type="checkbox"]:focus {
    outline: 0;
}

.checkbox-wrapper-12 .cbx {
    width: 24px;
    height: 24px;
    top: 0;
    left: 0;
    position: relative;
}

.checkbox-wrapper-12 .cbx input {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #bfbfc0;
    border-radius: 50%;
}

.checkbox-wrapper-12 .cbx label {
    width: 24px;
    height: 24px;
    background: none;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate3d(0, 0, 0);
    pointer-events: none;
}

.checkbox-wrapper-12 .cbx svg {
    position: absolute;
    top: 5px;
    left: 4px;
    z-index: 1;
    pointer-events: none;
}

.checkbox-wrapper-12 .cbx svg path {
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 19;
    stroke-dashoffset: 19;
    transition: stroke-dashoffset 0.3s ease;
    transition-delay: 0.2s;
}

.checkbox-wrapper-12 .cbx input:checked+label {
    animation: splash-12 0.6s ease forwards;
}

.checkbox-wrapper-12 .cbx input:checked+label+svg path {
    stroke-dashoffset: 0;
}

@-moz-keyframes splash-12 {
    40% {
        background: #10b981;
        box-shadow: 0 -18px 0 -8px #10b981, 16px -8px 0 -8px #10b981, 16px 8px 0 -8px #10b981, 0 18px 0 -8px #10b981, -16px 8px 0 -8px #10b981, -16px -8px 0 -8px #10b981;
    }

    100% {
        background: #10b981;
        box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
    }
}

@-webkit-keyframes splash-12 {
    40% {
        background: #10b981;
        box-shadow: 0 -18px 0 -8px #10b981, 16px -8px 0 -8px #10b981, 16px 8px 0 -8px #10b981, 0 18px 0 -8px #10b981, -16px 8px 0 -8px #10b981, -16px -8px 0 -8px #10b981;
    }

    100% {
        background: #10b981;
        box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
    }
}

@-o-keyframes splash-12 {
    40% {
        background: #10b981;
        box-shadow: 0 -18px 0 -8px #10b981, 16px -8px 0 -8px #10b981, 16px 8px 0 -8px #10b981, 0 18px 0 -8px #10b981, -16px 8px 0 -8px #10b981, -16px -8px 0 -8px #10b981;
    }

    100% {
        background: #10b981;
        box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
    }
}

@keyframes splash-12 {
    40% {
        background: #10b981;
        box-shadow: 0 -18px 0 -8px #10b981, 16px -8px 0 -8px #10b981, 16px 8px 0 -8px #10b981, 0 18px 0 -8px #10b981, -16px 8px 0 -8px #10b981, -16px -8px 0 -8px #10b981;
    }

    100% {
        background: #10b981;
        box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
    }
}

/* --- Textarea Custom Resizer Handle --- */
#botContactMsg::-webkit-resizer {
    background-color: transparent;
    /* 2 rounded gray-300 (#d1d5db) stripes matching the border */
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 16 L16 11 M6 16 L16 6' stroke='%23d1d5db' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom right;
}

.dark #botContactMsg::-webkit-resizer {
    /* 2 rounded gray-600 (#4b5563) stripes matching dark border */
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 16 L16 11 M6 16 L16 6' stroke='%234b5563' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}

/* ---- Bot Console Action Buttons (Skin Sensitive) ---- */
#botBtnYes,
#botBtnNo {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0 2px;
    transition: all 0.2s ease;
    border-radius: 2px;
}

#botTalkBtn {
    transition: all 0.2s ease;
    opacity: 0.8;
}

#botTalkBtn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#botTalkBtn:active {
    transform: scale(0.95);
}

/* Default / Original Skin */
#botActionBtns {
    background-color: rgba(0, 0, 0, 0.6);
}

#botBtnYes,
#botBtnNo,
#botTalkBtn {
    color: #28a530;
}

#botBtnYes:hover,
#botBtnNo:hover {
    background: #28a530;
    color: #000;
}

/* Classic Skin (MacOS 8.6) */
.skin-classic #botActionBtns {
    background-color: rgba(255, 255, 255, 0.6);
}

.skin-classic #botBtnYes,
.skin-classic #botBtnNo,
.skin-classic #botTalkBtn {
    color: #000;
}

.skin-classic #botBtnYes:hover,
.skin-classic #botBtnNo:hover {
    background: #000;
    color: #fff;
}

.skin-classic.dark #botBtnYes,
.skin-classic.dark #botBtnNo,
.skin-classic.dark #botTalkBtn {
    color: #000;
    /* Assuming classic console is always gray/white like MacOS 8.6 even in dark mode */
}

.skin-classic.dark #botActionBtns {
    background-color: rgba(255, 255, 255, 0.6);
}

/* HAL 9000 Skin */
.skin-hal #botActionBtns {
    background-color: rgba(0, 0, 0, 0.6);
}

.skin-hal #botBtnYes,
.skin-hal #botBtnNo,
.skin-hal #botTalkBtn {
    color: #ff0000;
}

.skin-hal #botBtnYes:hover,
.skin-hal #botBtnNo:hover {
    background: #ff0000;
    color: #000;
}