/* ===================================================================
   CHATBOT.CSS — ROUNAK AI ASSISTANT
   Premium glassmorphism chat UI with animations.
   Theme-aware via CSS custom properties.
   =================================================================== */


/* ===================================================================
   1. CHAT PANEL (the main chat window)
   =================================================================== */

/* Container — slides up from bottom */
.chat-panel {
    position: fixed;
    bottom: 90px;
    left: 2rem;
    right: auto;
    width: 440px;
    height: 680px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: rgba(12, 14, 32, 0.92);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.08) inset;
    z-index: 99999 !important;
    overflow: hidden;
    overscroll-behavior: contain;

    /* Animation — starts hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px) scale(0.92);
    transform-origin: bottom left;
    transition:
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.4s;
}

.chat-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Disable transitions during drag for smooth movement */
.chat-panel.dragging {
    transition: none !important;
}

/* Accent gradient bar at top */
.chat-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
    z-index: 10;
}


/* ===================================================================
   2. CHAT HEADER
   =================================================================== */
.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Avatar glow removed — mascot handles its own styling */
.chat-avatar::after {
    display: none;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.2;
}

.chat-header-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-secondary);
}

.chat-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    position: relative;
}

.chat-status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #22c55e;
    opacity: 0.5;
    animation: chatStatusPulse 2s ease-in-out infinite;
}

@keyframes chatStatusPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

.chat-close-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Drag grip indicator */
.chat-drag-grip {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 0.8rem;
    cursor: grab;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-drag-grip:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.chat-panel.dragging .chat-drag-grip {
    cursor: grabbing;
    opacity: 1;
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.12);
}


/* ===================================================================
   3. CHAT MESSAGES AREA
   =================================================================== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
    min-height: 0;
    overscroll-behavior: contain;
}

/* Custom scrollbar for messages */
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }


/* ── Message Bubble ── */
.chat-msg {
    display: flex;
    gap: 0.6rem;
    max-width: 88%;
    animation: chatMsgIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.chat-msg--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg--ai {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-msg--ai .chat-msg-avatar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chat-msg--user .chat-msg-avatar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-msg-bubble {
    padding: 0.8rem 1rem;
    border-radius: 16px;
    font-size: 0.84rem;
    line-height: 1.6;
    font-family: var(--font-secondary);
    word-break: break-word;
}

.chat-msg--ai .chat-msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    border-top-left-radius: 4px;
}

.chat-msg--user .chat-msg-bubble {
    background: var(--gradient-primary);
    color: #fff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

/* Markdown rendering inside AI messages */
.chat-msg-bubble strong { color: var(--text-primary); font-weight: 600; }
.chat-msg-bubble em { font-style: italic; }
.chat-msg-bubble ul, .chat-msg-bubble ol {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}
.chat-msg-bubble li { margin-bottom: 0.25rem; }
.chat-msg-bubble code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: 'Fira Code', monospace;
}
.chat-msg-bubble a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.chat-msg-bubble a:hover { opacity: 0.8; }
.chat-msg-bubble p { margin-bottom: 0.5rem; }
.chat-msg-bubble p:last-child { margin-bottom: 0; }

/* Typewriter cursor blink while AI is streaming text */
.chat-msg-typing-anim::after {
    content: '▋';
    display: inline-block;
    color: var(--primary-color);
    animation: blink-cursor 0.7s step-end infinite;
    margin-left: 1px;
}
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ===================================================================
   4. TYPING INDICATOR
   =================================================================== */
.chat-typing {
    display: flex;
    gap: 0.6rem;
    align-self: flex-start;
    max-width: 88%;
    animation: chatMsgIn 0.3s ease both;
}

.chat-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.85rem 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    border-top-left-radius: 4px;
}

.chat-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.5;
    animation: chatTypingBounce 1.2s ease-in-out infinite;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}


/* ===================================================================
   5. CHIP GRID (unified clickable chips inside welcome)
   =================================================================== */
.chat-suggestions {
    /* kept for JS compatibility — hidden, chips live inside welcome now */
    display: none;
}

.pracy-chip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-top: 0.9rem;
    text-align: left;
}

.chat-chip {
    padding: 0.38rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.chat-chip:hover {
    background: rgba(167, 139, 250, 0.14);
    border-color: rgba(167, 139, 250, 0.35);
    color: #e9d5ff;
    transform: translateY(-1px);
}

.chat-chip:active {
    transform: translateY(0) scale(0.96);
}


/* ===================================================================
   6. CHAT INPUT AREA
   =================================================================== */
.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    padding: 0.9rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
}

.chat-input-wrapper {
    flex: 1;
    position: relative;
}

.chat-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-family: var(--font-secondary);
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
    max-height: 100px;
    min-height: 40px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.chat-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.chat-input:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gradient-primary);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.chat-send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.chat-send-btn:active {
    transform: translateY(0) scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* ===================================================================
   7. ORBIT DOCK — AI BUTTON STYLES
   =================================================================== */
.orbit-item--ai .orbit-icon {
    background: rgba(139, 92, 246, 0.18);
    color: #a78bfa;
}
.orbit-item--ai:hover .orbit-icon {
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}
.orbit-item--ai:hover .orbit-label {
    color: #a78bfa;
}

/* Active state when chat is open */
.orbit-item--ai.chat-active .orbit-icon {
    background: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}

/* AI badge notification dot */
@keyframes aiDotPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

.orbit-ai-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    border: 1.5px solid rgba(8, 10, 26, 0.9);
    position: relative;
}

.orbit-ai-dot::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 50%;
    background: #a78bfa;
    opacity: 0.5;
    animation: aiDotPulse 2.5s ease-in-out infinite;
    z-index: -1;
}


/* ===================================================================
   8. RESPONSIVE — MOBILE
   =================================================================== */
@media (max-width: 768px) {
    .chat-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100%;
        border-radius: 0;
        z-index: 9900;
        transform: translateY(100%);
        transform-origin: bottom center;
    }

    .chat-panel.open {
        transform: translateY(0);
    }

    .chat-panel::before {
        border-radius: 0;
    }

    .chat-header {
        padding: 1rem 1.1rem;
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    }

    .chat-messages {
        padding: 1rem;
    }

    .chat-input-area {
        padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
    }

    .chat-msg { max-width: 92%; }

    .chat-suggestions {
        padding: 0 1rem 0.6rem;
    }

    .chat-input {
        font-size: 16px !important;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .chat-msg-bubble { font-size: 0.8rem; padding: 0.7rem 0.85rem; }
    .chat-chip { font-size: 0.68rem; padding: 0.35rem 0.7rem; }
    .chat-input { font-size: 0.8rem; }
}

/* Very tall desktop: allow taller panel */
@media (min-height: 900px) and (min-width: 769px) {
    .chat-panel { max-height: 680px; }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-panel {
        max-height: 100vh;
    }
    .chat-messages {
        padding: 0.75rem;
    }
}


/* ===================================================================
   9. WELCOME MESSAGE SPECIAL STYLING
   =================================================================== */
.chat-welcome {
    text-align: center;
    padding: 0.9rem 0.75rem 0.5rem;
    animation: chatMsgIn 0.5s ease 0.2s both;
}

.chat-welcome-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    position: relative;
    background: none;
    box-shadow: none;
}

.chat-welcome-icon::after {
    display: none;
}

.chat-welcome h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.chat-welcome p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 270px;
    margin: 0 auto;
}


/* ===================================================================
   10. ERROR STATE
   =================================================================== */
.chat-msg--error .chat-msg-bubble {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}


/* ===================================================================
   11. CHAT PANEL BACKDROP (mobile overlay)
   =================================================================== */
.chat-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .chat-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9899;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s;
        overscroll-behavior: contain;
    }
    .chat-backdrop.open {
        opacity: 1;
        visibility: visible;
    }
}

/* ===================================================================
   12. LUMI CUTE PERSONALITY & CTA STYLES
   =================================================================== */

/* Hero Button: Ask Lumi AI */
.btn-ai-lumi {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.25) 0%, rgba(102, 126, 234, 0.25) 100%);
    border: 1px solid rgba(240, 147, 251, 0.4);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.15);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.btn-ai-lumi:hover {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.4) 0%, rgba(102, 126, 234, 0.4) 100%);
    border-color: rgba(240, 147, 251, 0.6);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.3), 0 0 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

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

/* About Section Lumi Card */
.about-lumi-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(240, 147, 251, 0.05);
    border: 1px dashed rgba(240, 147, 251, 0.3);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-top: 1.5rem;
}

.about-lumi-icon {
    color: var(--accent-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.about-lumi-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    line-height: 1.4;
}

.about-lumi-link {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-secondary);
    transition: color 0.2s ease;
}

.about-lumi-link:hover {
    color: #fff;
}

/* Orbit Dock AI Tooltip */
.orbit-ai-tooltip {
    position: absolute;
    bottom: 75px;
    left: -10px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.6rem 0.9rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10000;
    pointer-events: auto;
    white-space: nowrap;
    
    /* Animation setup */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbit-ai-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.orbit-ai-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 24px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #667eea transparent;
    display: block;
    width: 0;
}

.orbit-ai-tooltip span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    font-family: var(--font-primary);
}

.orbit-ai-tooltip-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s ease;
}

.orbit-ai-tooltip-close:hover {
    color: #fff;
}

/* ===== PRACY SVG KAWAII BEAR — FULL REDESIGN ===== */

/* Container */
.pracy-avatar-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    width: 100%;
    height: 100%;
}

.pracy-avatar-container:hover {
    transform: scale(1.1) translateY(-3px);
}

.pracy-avatar-container.small {
    width: 100%;
    height: 100%;
}

.pracy-avatar-container.tiny-inline {
    width: 100%;
    height: 100%;
}

/* The SVG itself */
.pracy-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* --- FLOATING BODY --- */
.pracy-body-group {
    animation: pracy-float 3.2s ease-in-out infinite;
    transform-origin: center bottom;
}

/* --- HOLOGRAPHIC HALO --- */
.pracy-halo-group {
    animation: pracy-halo-float 3.5s ease-in-out infinite;
    transform-origin: 36px 11px;
}

@keyframes pracy-halo-float {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0.9; }
    50%      { transform: translateY(-3px) scale(1.05) rotate(2deg); opacity: 1; }
}

/* --- SIDE HAIR STRANDS (wag like ears) --- */
.pracy-ear-left-group {
    transform-origin: 18px 26px;
    animation: pracy-ear-left 4s ease-in-out infinite;
}
.pracy-ear-right-group {
    transform-origin: 54px 26px;
    animation: pracy-ear-right 4s ease-in-out infinite;
}

/* --- EYES BLINK --- */
.pracy-eye-left-group {
    transform-origin: 26px 51px;
    animation: pracy-blink 5s ease-in-out infinite;
}
.pracy-eye-right-group {
    transform-origin: 46px 51px;
    animation: pracy-blink 5s ease-in-out infinite;
}

/* --- SPARKLE STARS --- */
.pracy-star-1 { animation: pracy-sparkle 2.4s ease-in-out infinite 0s; opacity: 0; }
.pracy-star-2 { animation: pracy-sparkle 2.4s ease-in-out infinite 0.8s; opacity: 0; }
.pracy-star-3 { animation: pracy-sparkle 2.4s ease-in-out infinite 1.6s; opacity: 0; }

/* --- STAR HAIR CLIP PULSE --- */
.pracy-heart { animation: pracy-heart-beat 1.6s ease-in-out infinite; transform-origin: 19px 27px; }

/* ===== KEYFRAMES ===== */
@keyframes pracy-float {
    0%, 100% { transform: translateY(0px) rotate(-0.5deg); }
    50%       { transform: translateY(-5px) rotate(0.5deg); }
}

@keyframes pracy-ear-left {
    0%, 80%, 100% { transform: rotate(0deg); }
    85%           { transform: rotate(-22deg); }
    92%           { transform: rotate(8deg); }
}

@keyframes pracy-ear-right {
    0%, 80%, 100% { transform: rotate(0deg); }
    85%           { transform: rotate(22deg); }
    92%           { transform: rotate(-8deg); }
}

@keyframes pracy-blink {
    0%, 87%, 92%, 97%, 100% { transform: scaleY(1); }
    89%, 94%                { transform: scaleY(0.06); }
}

@keyframes pracy-sparkle {
    0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
    40%, 60% { opacity: 0.9; transform: scale(1.1) rotate(25deg); }
}

@keyframes pracy-heart-beat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

/* Bounce on send */
@keyframes pracy-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    30%      { transform: translateY(-8px) scale(1.08); }
    60%      { transform: translateY(-2px) scale(0.96); }
}

.pracy-body-group.bouncing {
    animation: pracy-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}



/* ===== PRACY SUPERPOWERS CARD — CLICKABLE CHIPS ===== */
.pracy-superpowers-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(168, 85, 247, 0.04) 100%);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    text-align: left;
}


.pracy-superpowers-card h5 {
    font-size: 0.78rem;
    font-weight: 700;
    color: #c084fc;
    margin-bottom: 0.65rem;
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pracy-superpowers-card ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Each item is a clickable chip */
.pracy-superpowers-card li {
    font-size: 0.77rem;
    color: var(--text-secondary);
    padding: 0.38rem 0.7rem !important;
    position: relative !important;
    line-height: 1.4;
    font-family: var(--font-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
    margin-bottom: 0 !important;
}

.pracy-superpowers-card li:hover {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.3);
    color: #e9d5ff;
    transform: translateX(2px);
}

.pracy-superpowers-card li:active {
    transform: translateX(2px) scale(0.97);
}

.pracy-superpowers-card li::before {
    content: '⚡';
    font-size: 0.7rem;
    flex-shrink: 0;
    position: static !important;
    padding: 0 !important;
}

/* ===== PRACY CHAT CONTENT FORMATTING ===== */
.chat-msg-bubble ul {
    list-style: none !important;
    padding-left: 0.2rem !important;
    margin: 0.6rem 0 !important;
}

.chat-msg-bubble li {
    position: relative !important;
    padding-left: 1.2rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.5 !important;
}

.chat-msg-bubble li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.75rem;
}

.chat-msg-bubble strong {
    color: #fff !important;
    background: linear-gradient(120deg, rgba(102, 126, 234, 0.25) 0%, rgba(240, 147, 251, 0.25) 100%);
    padding: 0.05rem 0.25rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Beautiful blocks/cards inside chat response (Markdown Blockquotes) */
.chat-info-block {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--primary-color);
    padding: 0.6rem 0.8rem;
    border-radius: 4px 8px 8px 4px;
    margin: 0.6rem 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.chat-info-block.green {
    border-left-color: #11998e;
    background: rgba(17, 153, 142, 0.04);
}

.chat-info-block.purple {
    border-left-color: var(--secondary-color);
    background: rgba(118, 75, 162, 0.04);
}

.chat-info-block.pink {
    border-left-color: var(--accent-color);
    background: rgba(240, 147, 251, 0.04);
}

/* Override existing background containers for digital mascot */
.chat-avatar {
    background: none !important;
    box-shadow: none !important;
}
.chat-avatar::after {
    display: none !important;
}

.chat-welcome-icon {
    background: none !important;
    box-shadow: none !important;
}
.chat-welcome-icon::after {
    display: none !important;
}

.chat-msg--ai .chat-msg-avatar {
    background: none !important;
    box-shadow: none !important;
}

/* Ask AI Button — subtle hover, no glow pulse */
.btn-ai-lumi {
    animation: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-ai-lumi:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.25) !important;
}

.btn-ai-lumi:hover .pracy-body-group {
    animation: pracy-float 1.5s ease-in-out infinite !important;
}

/* Dock AI — no glow pulse, just subtle ring on hover */
#dockAi {
    animation: none !important;
}

/* Bounce animation for superpower click feedback */
@keyframes pracy-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-6px) scale(1.05); }
    60% { transform: translateY(-2px) scale(0.98); }
}

.pracy-body-group.bouncing {
    animation: pracy-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@media (max-width: 576px) {
    .chat-panel {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
}

.fade-in-chips {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeInChipsUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInChipsUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Translucent state during form fill */
.chat-panel.chat-panel--translucent {
    opacity: 0.12 !important;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Glowing contact form highlight */
.contact-form-wrapper.highlight-fill-active {
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.6) !important;
    border-color: rgba(139, 92, 246, 0.8) !important;
    transform: scale(1.015);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===================================================================
   HOLOGRAPHIC MASCOT AND CONTACT WIDGET STYLES
   =================================================================== */

.pracy-contact-widget {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.1rem;
    margin-top: 1.5rem;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.pracy-contact-widget:hover {
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.3);
}

.pracy-hologram-container {
    width: 105px;
    height: 105px;
    border-radius: 16px;
    overflow: visible;
    position: relative;
    border: 1.5px solid rgba(139, 92, 246, 0.35);
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    background: rgba(8, 8, 16, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(25px); /* Push out slightly for 3D parallax depth */
}

.pracy-hologram-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hologram-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 4px;
    z-index: 2;
    opacity: 0.65;
}

.pracy-widget-status {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) translateZ(10px);
    background: rgba(5, 5, 10, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 0.64rem;
    white-space: nowrap;
    z-index: 3;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
}

.status-dot.pulsing {
    animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.pracy-widget-info {
    flex-grow: 1;
    text-align: left;
    transform: translateZ(15px);
}

.pracy-widget-info h4 {
    color: #fff;
    margin-bottom: 0.2rem;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.pracy-widget-info p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
}

.pracy-widget-btn {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.38rem 0.9rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.pracy-widget-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Tiny frames for chat bubble & header */
.pracy-avatar-small-frame {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(10, 10, 20, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pracy-avatar-small-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Welcome Card Big Frame */
.pracy-avatar-welcome-frame {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    overflow: visible;
    margin: 0 auto 0.75rem;
    border: 2px solid rgba(139, 92, 246, 0.55);
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 16, 0.6);
}

.pracy-avatar-welcome-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    .pracy-contact-widget {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .pracy-widget-info {
        text-align: center;
    }
}

/* ==========================================================================
   PRACY V3 DYNAMIC VECTOR CYBER-GIRL MASCOT ANIMATIONS (BREAKOUT & WAVING)
   ========================================================================== */

/* Outer SVG frame sizing and positioning */
.pracy-svg-mascot {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.25));
    transition: filter 0.3s ease;
}

.pracy-svg-mascot:hover {
    filter: drop-shadow(0 0 14px rgba(236, 72, 153, 0.45));
}

/* Transform Origins for precise rotational and scaling animations */
.mascot-character {
    transform-origin: 50px 80px;
    animation: cyberBreathing 3.6s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-head-group {
    transform-origin: 50px 52px;
    animation: cyberHeadBob 4.8s ease-in-out infinite;
}

.left-arm-group {
    transform-origin: 32px 70px;
    transition: transform 0.3s ease;
}

.left-eye-group {
    transform-origin: 41px 48px;
    animation: cyberBlink 4.2s infinite;
}

.right-eye-group {
    transform-origin: 59px 48px;
    animation: cyberBlink 4.2s infinite;
}

.cyber-dashed-ring {
    transform-origin: 50px 50px;
    animation: cyberRingRotate 18s linear infinite;
}

.cyber-halo {
    transform-origin: 50px 18px;
    animation: cyberHaloFloat 3s ease-in-out infinite;
}

.float-hex-1 {
    transform-origin: 15px 32px;
    animation: floatHex1 5s ease-in-out infinite;
}

.float-hex-2 {
    transform-origin: 85px 47px;
    animation: floatHex2 6s ease-in-out infinite;
}

/* 1. Cyber Breathing (Organic body movement) */
@keyframes cyberBreathing {
    0%, 100% {
        transform: translateY(0) scaleY(1);
    }
    50% {
        transform: translateY(-0.8px) scaleY(0.985) scaleX(1.005);
    }
}

/* 2. Head Bobbing */
@keyframes cyberHeadBob {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-0.6px) rotate(1deg);
    }
}

/* 3. High-Fidelity Eye Blinking */
@keyframes cyberBlink {
    0%, 90%, 94%, 98%, 100% {
        transform: scaleY(1);
    }
    92%, 96% {
        transform: scaleY(0.08);
    }
}

/* 4. Dashed Background Ring Rotation */
@keyframes cyberRingRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 5. Cybernetic Halo Float */
@keyframes cyberHaloFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 0 1px #8b5cf6);
    }
    50% {
        transform: translateY(-1.5px) rotate(-1.5deg);
        filter: drop-shadow(0 0 4px #a78bfa);
    }
}

/* 6. Particles Floating */
@keyframes floatHex1 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-3px) rotate(10deg); opacity: 0.55; }
}

@keyframes floatHex2 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    50% { transform: translateY(-4px) rotate(-12deg); opacity: 0.65; }
}


/* ==========================================================================
   DYNAMIC INTERACTIVE MASCOT STATE STYLES
   ========================================================================== */

/* State-based Mouth & Eye displays */
.pracy-svg-mascot .mouth-idle,
.pracy-svg-mascot .mouth-thinking,
.pracy-svg-mascot .mouth-happy,
.pracy-svg-mascot .mouth-greet {
    display: none;
}

.pracy-svg-mascot .eye-closed-left,
.pracy-svg-mascot .eye-closed-right {
    display: none;
}

/* Default state: Idle */
.pracy-svg-mascot.state-idle .mouth-idle {
    display: block;
}

/* GREET State (3D circle breakout & enthusiastic hand wave!) */
.pracy-svg-mascot.state-greet .mouth-greet {
    display: block;
}
.pracy-svg-mascot.state-greet .left-eye-group {
    animation: none;
    transform: scaleY(0.08); /* Left eye winks cute */
}
.pracy-svg-mascot.state-greet .right-eye-group {
    animation: none;
    transform: scaleY(1);
}
.pracy-svg-mascot.state-greet .mascot-character {
    animation: popAndGreet 3.5s ease-in-out;
}
.pracy-svg-mascot.state-greet .left-arm-group {
    animation: waveHand 3.5s ease-in-out;
}

@keyframes popAndGreet {
    0% { transform: translateY(0) scale(1); }
    15% { transform: translateY(-13px) scale(1.18); } /* Break out of circle frame! */
    80% { transform: translateY(-13px) scale(1.18); }
    100% { transform: translateY(0) scale(1); } /* Float back down smoothly */
}

@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    12% { transform: rotate(-65deg); } /* Swing arm up high */
    20%, 36%, 52%, 68% { transform: rotate(-85deg); } /* Wave hand back & forth! */
    28%, 44%, 60%, 76% { transform: rotate(-55deg); }
    84% { transform: rotate(-65deg); }
}

/* HAPPY State (Smiling broadly, cute cheek glows & happy bounce!) */
.pracy-svg-mascot.state-happy .mouth-happy {
    display: block;
}
.pracy-svg-mascot.state-happy .mascot-character {
    animation: popAndHappy 2.8s ease-in-out;
}
.pracy-svg-mascot.state-happy .mascot-head-group {
    animation: cyberHeadHappy 1.4s ease-in-out infinite;
}

@keyframes popAndHappy {
    0% { transform: translateY(0) scale(1); }
    15% { transform: translateY(-8px) scale(1.12); }
    85% { transform: translateY(-8px) scale(1.12); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes cyberHeadHappy {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    30% { transform: translateY(-2px) rotate(2deg) scale(1.02); }
    70% { transform: translateY(-1px) rotate(-2deg) scale(1.02); }
}

/* THINKING State (Close eyes peacefully & pulse/spin fast) */
.pracy-svg-mascot.state-thinking .mouth-thinking {
    display: block;
}
.pracy-svg-mascot.state-thinking .left-eye-group,
.pracy-svg-mascot.state-thinking .right-eye-group {
    animation: none;
    transform: scaleY(0.08);
}
.pracy-svg-mascot.state-thinking .cyber-dashed-ring {
    animation: cyberRingRotate 4s linear infinite;
}
.pracy-svg-mascot.state-thinking .cyber-halo {
    animation: cyberHaloFloatThinking 1.2s ease-in-out infinite;
}
@keyframes cyberHaloFloatThinking {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 2px #3b82f6); }
    50% { transform: translateY(-2.5px) scale(1.05); filter: drop-shadow(0 0 6px #3b82f6); }
}

/* Mobile performance optimizations for the mascot */
@media (max-width: 768px) {
    /* Disable expensive filter drop shadows */
    .pracy-svg-mascot,
    .pracy-svg-mascot:hover,
    [filter="url(#cyberNeonGlow)"] {
        filter: none !important;
    }
    
    /* Disable complex float animations & decoration rings that cause layout/paint on mobile */
    .cyber-ring-group,
    .cyber-particles,
    .cyber-halo,
    .float-hex-1,
    .float-hex-2 {
        display: none !important;
        animation: none !important;
    }
    
    /* Simplify keyframe animations for mascot character to reduce draw calls */
    .mascot-character {
        animation-duration: 6s !important; /* Slow down updates to reduce CPU usage */
    }
    
    .mascot-head-group,
    .left-arm-group,
    .right-arm-group {
        animation: none !important; /* Disable multi-layered animations on mobile */
    }
}


