    /* Better floating window close button */
    .floating button {
        padding: 6px 14px;
        border: none;
        border-radius: 10px;
        background: linear-gradient(135deg, #6366f1, #3b82f6);
        color: white;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    /* --- Voice test player styles --- */
    .voice-test {
        display: none;
        margin-top: 8px;
        align-items: center;
        gap: 8px;
    }

   .player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.player-row:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.player-row .label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.2px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #6366f1;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
}


    .icon-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #111827;
        color: white;
        font-size: 16px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }

    .icon-btn[aria-hidden="true"] {
        opacity: 0.45;
        pointer-events: none;
    }

    .voice-test .label {
        font-size: 13px;
        color: #444;
        margin-right: 6px;
    }

    /* Wake word indicator */
    .wake-indicator {
        position: fixed;
        bottom: 80px;
        right: 20px;
        padding: 8px 14px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        z-index: 100;
        animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 0.7;
        }

        50% {
            opacity: 1;
        }
    }

    .floating button:hover {
        background: linear-gradient(135deg, #4f46e5, #2563eb);
        transform: scale(1.05);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    /* Basic reset */
    * {
        box-sizing: border-box;
    }

    body,
    html {
        height: 100%;
        margin: 0;
        font-family: Inter, Arial, sans-serif;
    }

    /* Animated gradient background (pink -> blue -> yellow) */
    :root {
        --bg-gradient: linear-gradient(90deg, #ff9a9e, #a1c4fd, #fddb92);
    }

    body {
        background: var(--bg-gradient);
        background-size: 600% 600%;
        animation: gradientShift 12s ease infinite;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
    }

    #apiStatus {
        display: none;
    }

    @keyframes gradientShift {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    /* App card */
    .app {
        width: 90%;
        /* scale to 90% of viewport width */
        max-width: 1280px;
        height: 95%;
        aspect-ratio: 1280 / 720;
        border-radius: 24px;
        background: transparent;
        box-shadow: 0 8px 20px rgba(12, 18, 30, 0.67);
        overflow: hidden;
        display: flex;
        position: relative;
        transition: all 0.3s ease;
        flex-direction: column;
    }


    /* Left control panel area */
    .left {
        width: 90px;
        background: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px;
        position: relative;
    }

    .control-tab {
        position: absolute;
        left: 20px;
        top: 20px;
        width: 32px;
        height: 32px;
        border-radius: 3px;
        background: rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        user-select: none;
        z-index: 40;
        padding: 4px;
        border:solid;
        /* optional: add padding */
    }

    .control-tab img.control-icon {
        max-width: 24px;
        /* adjust size */
        max-height: 24px;
        /* adjust size */
        display: block;
        padding: 10%;
    }



    .control-panel {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        height: 1280px;
        transform: translateX(-260px);
        transition: transform 0.28s ease;
        background: rgba(255, 255, 255, 0.98);
        border-right: 1px solid rgba(0, 0, 0, 0.06);
        padding: 18px;
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.06);
        z-index: 20;
        display: flex;
        flex-direction: column;

        /* don't intercept clicks while hidden off-screen */
        pointer-events: none;
    }

    /* when panel is open, restore pointer events */
    .control-panel.open {
        transform: translateX(0);
        pointer-events: auto;
    }
    .control-tab.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}


    .panel-header {
        font-weight: 700;
        margin-bottom: 14px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .control-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
    }

    .panel-btn {
        background: #f4f6fb;
        border: none;
        border-radius: 12px;
        padding: 10px;
        text-align: left;
        cursor: pointer;
        transition: background 0.18s, transform 0.08s;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .panel-btn:hover {
        background: #e6eefc;
        transform: translateY(-2px);
    }

    .panel-btn .dot {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06)
    }

    .api-input {
        margin-top: auto;
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .api-input input {
        flex: 1;
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid #ddd;
    }

    .api-input button {
        padding: 8px 10px;
        border-radius: 10px;
        border: none;
        background: #111827;
        color: #fff;
        cursor: pointer;
    }

    .api-status {
        font-size: 12px;
        color: #666;
        margin-left: 8px;
    }

    /* Main area */
    .main {
        flex: 1;
        padding-top: 60px;
        display: flex;
        flex-direction: column;
        gap: 1vw;
        position: relative;
        justify-content: space-between;
        align-content: center;
    }

    .header {
        display: flex;
        flex-direction: column;
        /* Stack logo above greeting */
        align-items: center;
        /* Center horizontally */
        gap: 12px;
        padding: 16px 0;
    }

    .company-logo {
        height: 80px;
        /* adjust as needed */
        width: auto;
        border-radius: 5px;
        object-fit: contain;
    }

    .topbar {
        display: flex;
        justify-content: center;
        /* centers content horizontally */
        align-items: flex-start;
        /* keeps it at the top */
        padding: 20px 0;
        /* spacing from top */
        width: 100%;
        background: transparent;
        /* or use your theme background */
        position: relative;
        /* keeps it in flow */
    }

    .greeting-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
    }

    .greeting {
        font-size: 4rem;
        font-weight: 700;
        color: #000;
        line-height: 1.2;
    }

    .subtext {
        font-size: 2.1rem;
        font-weight: 400;
        color: var(--kiwi-accent);
        opacity: 0.85;
    }


    /* Cards row (center) */
    .cards {
        display: flex;
        gap: 18px;
        align-items: center;
    }

    .card {
        /* light translucent surface to keep readable contrast while showing the gradient */
        background: rgba(255, 255, 255, 0.06);
        border-radius: 14px;
        padding: 18px;
        width: 280px;
        /* softer shadow and faint border so the card reads as a UI element */
        box-shadow: 0 6px 18px rgba(12, 18, 30, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* Robot area container */
    .robot-area {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        position: relative;
        animation: areaFloat 5s ease-in-out infinite;
    }

    /* Subtle container motion (for life-like feel) */
    @keyframes areaFloat {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-6px);
        }
    }

    /* Robot image */
    .robot-img {
        width: auto;
        height: 200px;
        cursor: pointer;
        user-select: none;
        transition: transform 0.3s ease, filter 0.3s ease;
        animation: robotFloat 3s ease-in-out infinite;
    }

    /* Robot floating animation */
    @keyframes robotFloat {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-10px);
        }
    }

    /* Hover response */
    .robot-img:hover {
        transform: scale(1.1);
        filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.2));
        animation: none;
        /* pause floating when hovered */
    }

    /* Speech bubble */
    .robot-bubble {
        font-size: 28px;
        padding: 6px 10px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
        width: 80%;
        text-align: center;
        opacity: 0;
        transform: translateY(10px);
        animation: bubbleAppear 0.8s ease forwards, bubbleFloat 4s ease-in-out infinite 0.8s;
    }

    /* Smooth bubble fade-in animation */
    @keyframes bubbleAppear {
        from {
            opacity: 0;
            transform: translateY(10px) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* Gentle bubble floating */
    @keyframes bubbleFloat {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-5px);
        }
    }

    /* Instruction text */
    .robot-area>div:last-child {
        font-size: 24px;
        color: #666;
        opacity: 0.9;
        margin-top: 4px;
        width: fit-content;
    }


    /* Conversation area (bottom center) */
    /* Conversation area (big white box) — blend it into the gradient */
    .conversation {
        background: rgba(255, 255, 255, 0.06);
        border-radius: 16px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
        width: 90%;
        max-width: 700px;
        min-height: 220px;
        margin: 0 auto;
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(6px) saturate(120%);
        border: 1px solid rgba(255, 255, 255, 0.06);
        transition: all 0.3s ease;
        height: 520px;
        margin-bottom: 2%;
    }

    .messages {
        overflow-y: auto;
        height: 35vh;
        padding-right: 8px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        scroll-behavior: smooth;
    }

    /* Scrollbar styling for neat appearance */
    .messages::-webkit-scrollbar {
        width: 6px;
    }

    .messages::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
    }

    .msg {
        padding: 8px 12px;
        border-radius: 8px;
        max-width: 95%;
        align-self: flex-start;
        font-weight: 500;
        background: rgba(255, 255, 255, 0.03);
        word-wrap: break-word;
        line-height: 1.4;
    }

    .msg.user {
        color: black;
        background: transparent;
        align-self: flex-end;
        text-align: right;
    }

    .msg.bot {
        color: black;
        background: transparent;
    }

    /* Input row */
    .input-row {
        display: flex;
        gap: 8px;
        align-items: center;
        margin-top: 6px;
        width: 100%;
    }

    .input-row input[type="text"] {
        flex: 1;
        padding: 12px;
        border-radius: 14px;
        border: 1px solid #ddd;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        outline: none;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .input-row input[type="text"]:focus {
       border-color: rgba(99, 102, 241, 0.4);
        background: rgba(255, 255, 255, 0.15);
    }

    .send-btn {
        width: 46px;
        height: 46px;
        border-radius: 10px;
        border: none;
        background: #111827;
        color: white;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, background 0.2s ease;
    }

    .send-btn:hover {
        transform: scale(1.05);
        background: #1f2937;
    }

    /* ========================= */
    /* RESPONSIVE ADAPTATION */
    /* ========================= */

    @media (max-width: 768px) {
        .conversation {
            width: 95%;
            padding: 12px;
            border-radius: 12px;
        }

        .input-row input[type="text"] {
            font-size: 14px;
            padding: 10px;
        }

        .send-btn {
            width: 42px;
            height: 42px;
            font-size: 18px;
        }
    }

    @media (max-width: 480px) {
        .conversation {
            width: 96%;
            padding: 10px;
            gap: 10px;
        }

        .messages {
            max-height: 50vh;
        }

        .input-row {
            flex-direction: column;
            align-items: stretch;
        }

        .send-btn {
            width: 100%;
            height: 44px;
            font-size: 18px;
            border-radius: 8px;
        }

        .input-row input[type="text"] {
            width: 100%;
            font-size: 14px;
        }
    }

    /* Floating windows (history/settings/about) */
    .floating {
        position: fixed;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 420px;
        max-height: 80vh;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 255, 0.98) 100%);
        border-radius: 20px;
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
        padding: 24px;
        z-index: 50;
        overflow-y: auto;
        overflow-x: hidden;
        display: none;
        flex-direction: column;
        gap: 16px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .floating.open {
        display: flex;
    }

    /* Modern radio buttons */
    /* Modal overlay for centered settings */
    .modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 48;
        display: none;
        backdrop-filter: blur(2px);
    }

    /* Make a floating window behave like a centered modal */
    /* Make a floating window behave like a centered modal */
    .floating.modal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 70%;
        max-width: 800px;
        max-height: 85vh;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 255, 0.99) 100%);
        border-radius: 20px;
        padding: 28px;
        overflow-y: auto;
        z-index: 100;
        justify-content: center;
        align-items: center;
    }

    /* ABOUT modal rows */
    .about-row {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        margin-top: 8px;
    }

    .about-key {
        font-weight: 700;
        width: 120px;
        color: #2d3748;
    }

    .about-val {
        color: #444;
        word-break: break-word;
    }


    .floating.modal.open {
        display: flex;
    }

    /*-------*/
    .radio-group {
        display: flex;
        gap: 12px;
        padding: 8px;
        background: rgba(240, 242, 247, 0.5);
        border-radius: 12px;
        border: 1px solid rgba(99, 102, 241, 0.1);
    }

    .radio-wrapper {
        flex: 1;
        position: relative;
    }

    .radio-wrapper input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 2;
    }

    .radio-label {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 16px;
        background: white;
        border-radius: 10px;
        transition: all 0.3s ease;
        cursor: pointer;
        font-weight: 500;
        color: #4a5568;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .radio-wrapper input[type="radio"]:checked+.radio-label {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

    /* Modern dropdown */
    .modern-select {
        position: relative;
        width: 100%;
    }

    .modern-select select {
        width: 100%;
        padding: 12px 16px;
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        font-size: 15px;
        transition: all 0.3s ease;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        padding-right: 40px;
    }

    .modern-select select:hover {
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    }

    .modern-select select:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    /* Enhanced slider */
    input[type="range"] {
        -webkit-appearance: none;
        height: 8px;
        background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
        border-radius: 5px;
        outline: none;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        background: white;
        border: 3px solid #667eea;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s ease;
    }

    input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.2);
    }

    /* small waveform canvas */
    .wave-wrap {
        width: 100%;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    canvas#wave {
        width: 100%;
        height: 40px;
        border-radius: 8px;
    }

    .footer {
        width: 100%;
        padding: 12px 24px;
        background-color: #111827;
        /* Dark background for professional look */
        color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 14px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        position: relative;
        bottom: 0;
    }

    .footer-content {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        text-align: center;
    }

    .footer-logo {
        height: 24px;
        width: auto;
        object-fit: contain;
    }

    /* Responsive adjustments */
    @media (max-width: 480px) {
        .footer {
            padding: 10px 12px;
            font-size: 12px;
        }

        .footer-logo {
            height: 20px;
        }
    }


    /* Custom searchable dropdown styles */
    .searchable-dropdown {
        position: relative;
        width: 100%;
    }

    .dropdown-container {
        position: relative;
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .dropdown-container:hover {
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    }

    .dropdown-container.open {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        border-radius: 12px 12px 0 0;
    }

    .dropdown-search {
        width: 100%;
        padding: 12px 40px 12px 16px;
        border: none;
        outline: none;
        font-size: 15px;
        background: transparent;
        cursor: pointer;
    }

    .dropdown-arrow {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
        pointer-events: none;
    }

    .dropdown-container.open .dropdown-arrow {
        transform: translateY(-50%) rotate(180deg);
    }

    /* ===== dropdown panel / options: opaque & theme-aware (REPLACE THIS ENTIRE BLOCK) ===== */
    .dropdown-options {
        display: none;
        /* Initially hidden */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1100;

        /* Force opaque panel so background doesn't bleed through */
        background-color: rgba(255, 255, 255, 0.98) !important;
        border: 1px solid rgba(15, 23, 42, 0.06) !important;
        border-top: none;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
        max-height: 260px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        backdrop-filter: none !important;
        /* Prevent underlying layer from showing through */
        background-clip: padding-box !important;
        isolation: isolate !important;
    }

    /* keep this show control unchanged */
    .dropdown-options.show {
        display: block;
    }

    /* Options: panel supplies the background, options are transparent but force readable text color */
    .dropdown-option {
        padding: 12px 16px;
        cursor: pointer;
        transition: background 0.12s ease, color 0.12s ease;
        color: #111827 !important;
        /* dark readable text on light panel */
        background-color: transparent !important;
        /* leave background to the panel */
        border-bottom: 1px solid rgba(15, 23, 42, 0.04) !important;
    }

    /* last option border correction */
    .dropdown-option:last-child {
        border-bottom: none;
    }

    .dropdown-option.hidden {
        display: none;
    }

    /* Hover / selected */
    .dropdown-option:hover,
    .dropdown-option.highlighted {
        background-color: rgba(102, 126, 234, 0.08) !important;
        color: inherit !important;
    }

    /* Floating settings panel */
    .floating .dropdown-options {
        background-color: rgba(255, 255, 255, 0.96) !important;
        border: 1px solid rgba(15, 23, 42, 0.06) !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    }

    /* ===== Dark-theme (near-opaque dark panel + bright text) ===== */
    body.theme-midnight .dropdown-options,
    body.theme-vaporwave .dropdown-options,
    body.theme-artdeco .dropdown-options,
    body.theme-dracula .dropdown-options {
        background-color: rgba(6, 8, 10, 0.96) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    }

    body.theme-midnight .dropdown-option,
    body.theme-vaporwave .dropdown-option,
    body.theme-artdeco .dropdown-option,
    body.theme-dracula .dropdown-option {
        color: #e6f9ff !important;
        /* bright readable text */
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        background-color: transparent !important;
    }

    body.theme-midnight .dropdown-option:hover,
    body.theme-vaporwave .dropdown-option:hover {
        background-color: rgba(255, 255, 255, 0.03) !important;
    }

    /* Enhanced toast notification styles */
    .toast {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 12px 20px;
        border-radius: 12px;
        font-weight: 500;
        z-index: 10000;
        animation: slideUp 0.3s ease;
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }

    @keyframes slideUp {
        from {
            transform: translateX(-50%) translateY(100px);
            opacity: 0;
        }

        to {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
    }

    /* --- Theme: Midnight / black theme with green accents & subtle wave --- */
    /* ============ ENHANCED THEME SYSTEM ============ */

    /* --- Theme: Midnight (Futuristic Cyber) --- */
    body.theme-midnight {
        --accent: #00ffff;
        --accent-glow: #00ffff;
        --secondary: #ff00ff;
        --tertiary: #ffff00;
        --bg-dark: #000000;
        --panel-dark: rgba(0, 0, 0, 0.85);
        --text-primary: #00ffff;
        --text-secondary: #ffffff;
        background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
        color: #00ffff;
        position: relative;
        overflow-x: hidden;
    }

    /* Animated cyber grid background */
    body.theme-midnight::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image:
            linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
        background-size: 50px 50px;
        animation: gridScroll 10s linear infinite;
        pointer-events: none;
        z-index: 1;
    }

    @keyframes gridScroll {
        0% {
            transform: translate(0, 0);
        }

        100% {
            transform: translate(50px, 50px);
        }
    }

    /* Neon glow effects for all interactive elements */
    body.theme-midnight button,
    body.theme-midnight .panel-btn,
    body.theme-midnight .send-btn,body.theme-midnight .control-tab,body.theme-midnight .more-btn {
        background: linear-gradient(145deg, #000, #111);
        border: 2px solid var(--accent);
        color: var(--accent);
        text-shadow: 0 0 10px var(--accent);
        box-shadow:
            0 0 20px rgba(0, 255, 255, 0.5),
            inset 0 0 20px rgba(0, 255, 255, 0.1);
        transition: all 0.3s ease;
        animation: pulseNeon 2s infinite alternate;
    }

    @keyframes pulseNeon {
        0% {
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), inset 0 0 20px rgba(0, 255, 255, 0.1);
        }

        100% {
            box-shadow: 0 0 40px rgba(0, 255, 255, 0.8), inset 0 0 30px rgba(0, 255, 255, 0.2);
        }
    }

    body.theme-midnight button:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow:
            0 0 40px var(--accent),
            0 10px 40px rgba(0, 255, 255, 0.6),
            inset 0 0 30px rgba(0, 255, 255, 0.3);
    }

    /* Holographic panels */
    body.theme-midnight .conversation,
    body.theme-midnight .floating, body.theme-midnight .modal-content,
    body.theme-midnight .control-panel {
        background: linear-gradient(135deg,
                rgba(0, 255, 255, 0.05) 0%,
                rgba(255, 0, 255, 0.05) 50%,
                rgba(0, 255, 255, 0.05) 100%);
        border: 1px solid rgba(0, 255, 255, 0.3);
        box-shadow:
            0 0 50px rgba(0, 255, 255, 0.2),
            inset 0 0 30px rgba(0, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        animation: hologram 3s ease-in-out infinite alternate;
    }
    body.theme-midnight .about-key,body.theme-midnight .modal-content.h3{
        color: #00ffff;
    }
    body.theme-midnight .about-val{
        color: white;
    }


    @keyframes hologram {
        0% {
            border-color: rgba(0, 255, 255, 0.3);
        }

        50% {
            border-color: rgba(255, 0, 255, 0.3);
        }

        100% {
            border-color: rgba(255, 255, 0, 0.3);
        }
    }

    /* Glitch text effect on hover */
    body.theme-midnight .greeting:hover {
        animation: glitch 0.3s infinite;
    }

    @keyframes glitch {

        0%,
        100% {
            text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
        }

        25% {
            text-shadow: -2px 0 #ff00ff, 2px 0 #ffff00;
        }

        50% {
            text-shadow: 2px 0 #ff00ff, -2px 0 #ffff00;
        }

        75% {
            text-shadow: 0 0 10px #ff00ff, 0 0 20px #ffff00;
        }
    }

    /* Scanner line animation */
    body.theme-midnight .app::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--accent), transparent);
        animation: scan 3s linear infinite;
        z-index: 10;
    }

    @keyframes scan {
        0% {
            top: 0;
        }

        100% {
            top: 100%;
        }
    }

    /* --- Theme: Neumorphism --- */
    body.theme-neumorphism {
        background: #e0e5ec;
        color: #444;
    }

    body.theme-neumorphism button,
    body.theme-neumorphism .panel-btn,
    body.theme-neumorphism .conversation {
        background: #e0e5ec;
        border: none;
        border-radius: 20px;
        box-shadow:
            9px 9px 16px #a3b1c6,
            -9px -9px 16px #ffffff;
        transition: all 0.3s ease;
    }

    body.theme-neumorphism button:hover {
        box-shadow:
            inset 9px 9px 16px #a3b1c6,
            inset -9px -9px 16px #ffffff;
    }

    body.theme-neumorphism input {
        background: #e0e5ec;
        border: none;
        box-shadow:
            inset 6px 6px 10px #a3b1c6,
            inset -6px -6px 10px #ffffff;
    }

    /* --- Theme: Glassmorphism --- */
    body.theme-glassmorphism {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
    }

    body.theme-glassmorphism .conversation,
    body.theme-glassmorphism .floating,
    body.theme-glassmorphism button {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
        transition: all 0.3s ease;
    }

    body.theme-glassmorphism button:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
    }

    /* --- Theme: Vaporwave --- */
    body.theme-vaporwave {
        background: linear-gradient(180deg, #ff006e 0%, #8338ec 50%, #3a86ff 100%);
        color: #fff;
        font-family: 'Courier New', monospace;
    }

    body.theme-vaporwave::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background:
            repeating-linear-gradient(0deg,
                transparent,
                transparent 2px,
                rgba(255, 255, 255, 0.03) 2px,
                rgba(255, 255, 255, 0.03) 4px);
        pointer-events: none;
        animation: vaporScan 8s linear infinite;
    }

    @keyframes vaporScan {
        0% {
            transform: translateY(0);
        }

        100% {
            transform: translateY(20px);
        }
    }

    body.theme-vaporwave button {
        background: linear-gradient(90deg, #ff006e, #8338ec);
        border: 3px solid #fff;
        color: #fff;
        text-transform: uppercase;
        font-weight: bold;
        box-shadow:
            5px 5px 0 #ff006e,
            10px 10px 0 #8338ec;
        transition: all 0.2s ease;
    }

    body.theme-vaporwave button:hover {
        transform: translate(-5px, -5px);
        box-shadow:
            10px 10px 0 #ff006e,
            20px 20px 0 #8338ec;
    }

    /* --- Theme: Art Deco --- */
    body.theme-artdeco {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #d4af37;
        font-family: 'Georgia', serif;
    }

    body.theme-artdeco .conversation,
    body.theme-artdeco button {
        background: #1a1a1a;
        border: 3px solid #d4af37;
        position: relative;
        overflow: hidden;
    }

    body.theme-artdeco button::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, #d4af37 0%, transparent 70%);
        transition: width 0.5s, height 0.5s;
        transform: translate(-50%, -50%);
    }

    body.theme-artdeco button:hover::before {
        width: 300px;
        height: 300px;
    }

    /* --- Theme: Brutalism --- */
    body.theme-brutalism {
        background: #fff;
        color: #000;
        font-family: 'Courier New', monospace;
    }

    body.theme-brutalism button,
    body.theme-brutalism .conversation {
        background: #fff;
        border: 5px solid #000;
        box-shadow: 10px 10px 0 #000;
        transition: none !important;
        animation: none !important;
    }

    body.theme-brutalism button:hover {
        transform: translate(-5px, -5px);
        box-shadow: 15px 15px 0 #000;
    }

    body.theme-brutalism .msg {
        border-left: 10px solid #ff0000;
        background: #ffff00;
        color: #000;
    }

    /* --- Theme: Pixel Art --- */
    body.theme-pixel {
        background: #8bac0f;
        image-rendering: pixelated;
        font-family: 'Courier New', monospace;
    }

    body.theme-pixel button,
    body.theme-pixel .conversation {
        image-rendering: pixelated;
        border: 4px solid #306230;
        background: #9bbc0f;
        position: relative;
        box-shadow:
            0 4px 0 #306230,
            0 8px 0 #0f380f;
    }

    body.theme-pixel button:hover {
        transform: translateY(4px);
        box-shadow:
            0 0 0 #306230,
            0 4px 0 #0f380f;
    }

    /* Add transition effects for theme switching */
    body {
        transition: background 0.5s ease, color 0.5s ease;
    }

    body * {
        transition: all 0.3s ease;
    }

    /* === THEME TEXT COLOR FIXES === */
    /* === DROPDOWN / SEARCH INPUT CONTRAST FIXES (always readable) === */

    /* Default light theme - dark text on light background */
    .dropdown-search,
    .dropdown-container input,
    .modern-select select {
        color: #1a1a1a !important;
        background: #ffffff !important;
        border-color: #e2e8f0 !important;
        border-radius:12px;
    }

    .dropdown-search::placeholder,
    .dropdown-container input::placeholder {
        color: rgba(26, 26, 26, 0.5) !important;
    }

    /* Dark themes - bright text on dark background */
    body.theme-midnight .dropdown-search,
    body.theme-midnight .dropdown-container input,
    body.theme-midnight .modern-select select,
    body.theme-vaporwave .dropdown-search,
    body.theme-vaporwave .dropdown-container input,
    body.theme-artdeco .dropdown-search,
    body.theme-artdeco .dropdown-container input,
    body.theme-dracula .dropdown-search,
    body.theme-dracula .dropdown-container input,
    body.theme-brutalism .dropdown-search,
    body.theme-brutalism .dropdown-container input {
        color: #e6ffff !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    body.theme-midnight .dropdown-search::placeholder,
    body.theme-vaporwave .dropdown-search::placeholder,
    body.theme-artdeco .dropdown-search::placeholder,
    body.theme-dracula .dropdown-search::placeholder,
    body.theme-brutalism .dropdown-search::placeholder {
        color: rgba(230, 255, 255, 0.5) !important;
    }

    /* Dropdown options panel - Force opaque background */
    .dropdown-options {
        background-color: #ffffff !important;
        color: #1a1a1a !important;
    }

    /* Dark theme dropdown options */
    body.theme-midnight .dropdown-options,
    body.theme-vaporwave .dropdown-options,
    body.theme-artdeco .dropdown-options,
    body.theme-dracula .dropdown-options,
    body.theme-brutalism .dropdown-options {
        background-color: rgba(10, 10, 10, 0.98) !important;
        color: #e6ffff !important;
    }

    .dropdown-option {
        color: inherit !important;
    }

    /* Make dropdown option hover visible in both light/dark */
    .dropdown-option:hover {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06)) !important;
        color: inherit !important;
    }

    /* Ensure the floating settings panel retains inherited color (prevents white-on-white) */
    .floating .dropdown-search,
    .floating .dropdown-option {
        color: inherit !important;
    }

    body.theme-neumorphism .greeting,
    body.theme-neumorphism .msg,
    body.theme-neumorphism .footer,
    body.theme-neumorphism label,
    body.theme-neumorphism .panel-btn {
        color: #1a1a1a !important;
    }

    body.theme-glassmorphism .greeting,
    body.theme-glassmorphism .msg,
    body.theme-glassmorphism .footer,
    body.theme-glassmorphism label,
    body.theme-glassmorphism .panel-btn {
        color: #ffffff !important;
    }

    body.theme-vaporwave .greeting,
    body.theme-vaporwave .msg,
    body.theme-vaporwave .footer,
    body.theme-vaporwave label {
        color: #ffffff !important;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    body.theme-artdeco .greeting,
    body.theme-artdeco .msg,
    body.theme-artdeco .footer,
    body.theme-artdeco label {
        color: #d4af37 !important;
    }

    body.theme-brutalism .greeting,
    body.theme-brutalism .msg,
    body.theme-brutalism .footer,
    body.theme-brutalism label {
        color: #000000 !important;
    }

    body.theme-pixel .greeting,
    body.theme-pixel .msg,
    body.theme-pixel .footer,
    body.theme-pixel label {
        color: #0f380f !important;
    }

    body.theme-midnight .greeting,
    body.theme-midnight .msg,
    body.theme-midnight .footer,
    body.theme-midnight label {
        color: #00ffff !important;
    }

    /* For all dark themes - ensure input fields are visible */
    body.theme-midnight input,
    body.theme-artdeco input,
    body.theme-vaporwave input {
        background: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    body.theme-midnight input::placeholder,
    body.theme-artdeco input::placeholder,
    body.theme-vaporwave input::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
    }
    
    
    
    .more-btn {
  display: inline-block;
  margin-top: 8px;
  margin-left: 60px; /* indent to align with bot message text */
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(90deg, #4caf50, #2e7d32);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.more-btn:hover {
  background: linear-gradient(90deg, #66bb6a, #43a047);
  transform: translateY(-1px);
}

.more-btn:active {
  transform: scale(0.96);
}




/* Modal overlay */
#settingsPasswordModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Show modal when active */
#settingsPasswordModal.modal-show {
    display: flex;
}

/* Modal box */
.modal-content {
    width: 360px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Heading */
.modal-content h3 {
    margin: 0 0 12px;
    
}

/* Input */
#settingsPasswordInput {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    box-sizing: border-box;
}

/* Error message */
#passwordErrorMsg {
    display: none;
    margin-top: 8px;
    color: #e53e3e;
    font-size: 13px;
}

/* Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.modal-actions button {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* Cancel button */
#passwordCancelBtn {
    background: #9ca3af;
    color: #fff;
}

/* Submit button */
#passwordSubmitBtn {
    background: #10b981;
    color: #fff;
}

/* Close button (X) */
.modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}
