/* ==========================================================================
   KHIN.AI - Elevated Minimalist Portfolio AI Assistant
   Presented in a clean, elevated minimalist modal viewport matching
   the typing test and documents preview system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Floating Launcher Button (Sticky in Bottom-Right Corner)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   1. Draggable Launcher Button (Default in Bottom-Right Corner)
   -------------------------------------------------------------------------- */
.khin-ai-widget {
    position: absolute;
    z-index: 9995;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transform: translateY(16px) scale(0.92);
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.32s,
                box-shadow 0.25s ease;
}

.khin-ai-widget.is-active-section {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.khin-ai-widget.is-dragging {
    cursor: grabbing !important;
    transition: none !important;
    z-index: 9999 !important;
}

.khin-ai-widget.is-dragging .khin-ai-launcher {
    cursor: grabbing !important;
    transform: scale(1.06) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 
                0 0 28px rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

.khin-ai-launcher {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(18, 18, 22, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 7px 16px 7px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 
                0 0 14px rgba(255, 255, 255, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s ease,
                border-color 0.25s ease,
                background-color 0.25s ease;
    color: #ffffff;
    outline: none;
}

.khin-ai-launcher:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5), 
                0 0 20px rgba(255, 255, 255, 0.16),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.khin-ai-launcher:active {
    cursor: grabbing;
    transform: translateY(-1px) scale(0.98);
}

/* --------------------------------------------------------------------------
   1b. Off-Screen Frame Locator Arrow for khin.ai
   Appears at the edge of the visible frame when khin.ai scrolls outside
   -------------------------------------------------------------------------- */
.khin-ai-locator {
    position: fixed;
    z-index: 9996;
    display: inline-flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.88);
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.28s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.khin-ai-locator.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.khin-ai-locator-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 18, 22, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 6px 14px 6px 8px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55),
                0 0 14px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #ffffff;
    cursor: grab;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.khin-ai-locator-inner:hover {
    transform: scale(1.05);
    border-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(255, 255, 255, 0.2);
}

.khin-ai-locator-inner:active,
.khin-ai-locator.is-dragging .khin-ai-locator-inner {
    cursor: grabbing;
    transform: scale(1.02);
}

.khin-ai-locator-arrow-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.15s ease-out;
}

.khin-ai-locator-arrow-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.6px;
    display: block;
}

.khin-ai-locator-text {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.khin-ai-locator-text .brand-ai {
    color: #ffffff;
    font-weight: 700;
}

.khin-ai-locator-drag-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
}

/* Light Theme Locator Overrides */
body.theme-light .khin-ai-locator-inner {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    color: #121212;
}

body.theme-light .khin-ai-locator-text {
    color: #121212;
}

body.theme-light .khin-ai-locator-text .brand-ai {
    color: #121212;
}

body.theme-light .khin-ai-locator-arrow-icon {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.18);
    color: #0a0a0a;
}

body.theme-light .khin-ai-locator-drag-badge {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.14);
    color: #334155;
}

.khin-ai-launcher-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.khin-ai-launcher-logo svg {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.khin-ai-launcher-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: #ffffff;
}

.khin-ai-launcher-label .brand-ai {
    color: #ffffff;
    font-weight: 700;
}

.khin-ai-pulse-dot {
    display: none !important;
}

/* --------------------------------------------------------------------------
   2. Minimalist Modal Overlay & Viewport (Matching Typing Test exactly)
   -------------------------------------------------------------------------- */
.khin-ai-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
    will-change: opacity, backdrop-filter;
}

.khin-ai-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.theme-light .khin-ai-modal-overlay {
    background: rgba(15, 23, 42, 0.52) !important;
}

/* Floating Elevated Curved Viewport Container */
.khin-ai-viewport-container {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    height: auto;
    background-color: #ffffff;
    color: #0a0a0a;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 4px 18px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: translateY(18px) scale(0.99);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.khin-ai-modal-overlay.is-active .khin-ai-viewport-container {
    transform: translateY(0) scale(1);
}

/* Minimalist Top-Right Exit Button */
.khin-ai-exit-btn {
    position: absolute;
    top: 32px;
    right: 42px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #0a0a0a;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    z-index: 50;
    outline: none;
}

.khin-ai-exit-btn:hover {
    transform: rotate(90deg) scale(1.1);
    opacity: 0.7;
}

.khin-ai-exit-btn svg,
.khin-ai-exit-btn i {
    width: 32px;
    height: 32px;
    stroke: #0a0a0a;
    stroke-width: 2.2px;
}

/* --------------------------------------------------------------------------
   3. Minimalist Centered Workspace Body
   -------------------------------------------------------------------------- */
.khin-ai-minimal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 44px 32px 36px;
    box-sizing: border-box;
    position: relative;
    height: 100%;
}

/* Minimalist Telemetry Bar at top */
.khin-ai-minimal-telemetry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(10, 10, 10, 0.45);
    user-select: none;
}

.khin-ai-telemetry-brand {
    font-weight: 700;
    color: #0a0a0a;
}

.khin-ai-telemetry-brand .brand-ai {
    color: currentColor;
}

.khin-ai-telemetry-sep {
    color: rgba(10, 10, 10, 0.25);
}

.khin-ai-telemetry-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* --------------------------------------------------------------------------
   4. Center Stage & "Got questions?" Disappearing Prompt
   (Formatted identically to Developer Typing Test)
   -------------------------------------------------------------------------- */
.khin-ai-center-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    position: relative;
}

.khin-ai-prompt-wrapper {
    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: text;
}

/* The signature "Got questions?" prompt matching typewriting text font, size and transparency */
.khin-ai-got-questions-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.25rem, 2.3vw, 1.85rem);
    line-height: 1.8;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: #94a3b8;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    user-select: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Caret blinking before "Got questions?" matching .typing-char.char-current in typewriting */
.khin-ai-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background-color: #0a0a0a;
    border-radius: 1px;
    margin-right: 4px;
    vertical-align: middle;
    animation: typingCaretBlink 0.9s infinite;
}

/* When untyped: hide native browser input caret so only the single static cursor is visible */
.khin-ai-prompt-wrapper:not(.has-typed) .khin-ai-hero-input {
    caret-color: transparent !important;
}

/* When the user starts typing, "Got questions?" smoothly disappears without shifting position! */
.khin-ai-prompt-wrapper.has-typed .khin-ai-got-questions-text {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* The Minimalist Input Field matching typing test text styling */
.khin-ai-hero-input {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 860px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.25rem, 2.3vw, 1.85rem);
    line-height: 1.8;
    font-weight: 600;
    color: #0a0a0a;
    text-align: center;
    outline: none;
    caret-color: #0a0a0a;
}

/* --------------------------------------------------------------------------
   5. Conversation Q&A Area (Shown after question is submitted)
   -------------------------------------------------------------------------- */
.khin-ai-qa-area {
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 10px auto;
    overflow-y: auto;
    max-height: 52vh;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    text-align: left;
    box-sizing: border-box;
}

.khin-ai-qa-area::-webkit-scrollbar {
    width: 4px;
}

.khin-ai-qa-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.khin-ai-user-query-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 999px;
    align-self: center;
}

.khin-ai-bot-answer-box {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.4vw, 1.12rem);
    line-height: 1.7;
    color: #1e293b;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 24px 28px;
    width: 100%;
    box-sizing: border-box;
    animation: fadeInAnswer 0.3s ease;
}

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

.khin-ai-bot-answer-box strong {
    color: #0a0a0a;
    font-weight: 700;
}

.khin-ai-bot-answer-box a {
    color: currentColor;
    text-decoration: underline;
    font-weight: 600;
}

.khin-ai-bot-answer-box code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Typing / Thinking animation */
.khin-ai-typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
}

.khin-ai-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0a0a0a;
    animation: typingBlink 1.4s infinite both;
}

.khin-ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.khin-ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* Interactive Action Buttons inside answer */
.khin-ai-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.khin-ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    background: #0a0a0a;
    color: #ffffff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.khin-ai-action-btn:hover {
    background: #27272a;
    color: #ffffff;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   6. Minimal Status Hint & Action Links (Matching Typing Test exactly)
   -------------------------------------------------------------------------- */
.khin-ai-status-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(10, 10, 10, 0.45);
    margin-top: 24px;
    min-height: 22px;
    user-select: none;
    transition: color 0.2s ease;
}

.khin-ai-status-hint strong {
    color: #0a0a0a;
    font-weight: 600;
}

.khin-ai-action-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    user-select: none;
}

.khin-ai-letter-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(10, 10, 10, 0.45);
    cursor: pointer;
    text-transform: lowercase;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    outline: none;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-color: rgba(10, 10, 10, 0.2);
}

.khin-ai-letter-btn:hover {
    color: #0a0a0a;
    text-decoration-color: #0a0a0a;
    transform: translateY(-1px);
}

.khin-ai-letter-sep {
    color: rgba(10, 10, 10, 0.2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   7. Theme Consistency Across Modes (Default, Light, Night)
   -------------------------------------------------------------------------- */

/* Light Mode: Floating Launcher Button (Bottom Right) */
body.theme-light .khin-ai-launcher {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border: 1px solid rgba(0, 0, 0, 0.14) !important;
    color: #0a0a0a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 
                inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

body.theme-light .khin-ai-launcher:hover {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.45) !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.14), 
                inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

body.theme-light .khin-ai-launcher-logo {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .khin-ai-launcher-logo svg .khin-ai-logo-monogram {
    fill: #0a0a0a !important;
}

body.theme-light .khin-ai-launcher-logo svg .khin-ai-sparkle-core {
    fill: #ffffff !important;
}

body.theme-light .khin-ai-launcher-label,
body.theme-light .khin-ai-launcher-label span {
    color: #0a0a0a !important;
}

body.theme-light .khin-ai-launcher-label .brand-ai {
    color: #0a0a0a !important;
}

/* Light Mode: Modal Viewport (Solid Black with Pure White Typography, matching Typing Test) */
body.theme-light .khin-ai-viewport-container {
    background-color: #000000 !important;
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 4px 18px rgba(0, 0, 0, 0.25) !important;
}

body.theme-light .khin-ai-exit-btn {
    color: #ffffff !important;
}

body.theme-light .khin-ai-exit-btn svg,
body.theme-light .khin-ai-exit-btn i {
    stroke: #ffffff !important;
}

body.theme-light .khin-ai-got-questions-text {
    color: rgba(255, 255, 255, 0.28) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.28) !important;
}

body.theme-light .khin-ai-cursor {
    background-color: #ffffff !important;
}

body.theme-light .khin-ai-hero-input {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.theme-light .khin-ai-prompt-wrapper.has-typed .khin-ai-hero-input {
    caret-color: #ffffff !important;
}

body.theme-light .khin-ai-telemetry-brand {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.theme-light .khin-ai-telemetry-status,
body.theme-light .khin-ai-status-hint {
    color: rgba(255, 255, 255, 0.45) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.45) !important;
}

body.theme-light .khin-ai-status-hint strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.theme-light .khin-ai-letter-btn {
    color: rgba(255, 255, 255, 0.42) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.42) !important;
    text-decoration-color: rgba(255, 255, 255, 0.2) !important;
}

body.theme-light .khin-ai-letter-btn:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration-color: #ffffff !important;
}

body.theme-light .khin-ai-letter-sep {
    color: rgba(255, 255, 255, 0.2) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.2) !important;
}

body.theme-light .khin-ai-bot-answer-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}

body.theme-light .khin-ai-bot-answer-box strong {
    color: #ffffff !important;
}

/* Night Mode: (OLED Pure Black) Launcher Button (Bottom Right) */
body.theme-night .khin-ai-launcher {
    background: rgba(0, 0, 0, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 
                inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

body.theme-night .khin-ai-launcher:hover {
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 
                0 0 20px rgba(255, 255, 255, 0.16),
                inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body.theme-night .khin-ai-launcher-logo {
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1) !important;
}

body.theme-night .khin-ai-launcher-logo svg .khin-ai-logo-monogram {
    fill: #ffffff !important;
}

body.theme-night .khin-ai-launcher-label,
body.theme-night .khin-ai-launcher-label span {
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   8. Mobile Responsiveness (Matching Typing Test exactly)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .khin-ai-viewport-container {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 20px;
    }

    .khin-ai-exit-btn {
        top: 20px;
        right: 20px;
    }

    .khin-ai-exit-btn svg,
    .khin-ai-exit-btn i {
        width: 26px;
        height: 26px;
    }

    .khin-ai-minimal-body {
        padding: 24px 16px;
    }

    .khin-ai-got-questions-text {
        font-size: clamp(1.05rem, 4vw, 1.35rem);
        line-height: 1.65;
    }

    .khin-ai-hero-input {
        font-size: clamp(1.05rem, 4vw, 1.35rem);
        line-height: 1.65;
        padding: 0;
    }

    .khin-ai-status-hint {
        margin-top: 18px;
    }

    .khin-ai-action-links {
        gap: 12px;
        margin-top: 20px;
    }

    .khin-ai-letter-btn {
        font-size: 0.8rem;
        padding: 4px 6px;
    }

    .khin-ai-qa-area {
        max-height: 48vh;
    }

    .khin-ai-bot-answer-box {
        padding: 18px 16px;
        font-size: 0.92rem;
    }
}
