/**
 * Zirkonyum Diş - Canlı & Hareketli AI Hasta Danışmanı (Living Digital Consultant)
 * Lifelike Breathing, Natural Blinking, Head Movement & 3D Interactive Parallax
 */

:root {
    --toya-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --toya-primary: #0284c7;
    --mouse-x: 0px;
    --mouse-y: 0px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body.toya-portal-body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #000000;
    color: #ffffff;
    font-family: var(--toya-font);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. MODULAR LIVING STAGE (BACKGROUND & CHARACTER ANIMATION)
   ========================================================================== */
.idle-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background: #000;
    perspective: 1000px;
}

/* Background Scene Layer */
.stage-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.stage-bg-layer img, #stage-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: translate3d(calc(var(--mouse-x, 0px) * 0.3), calc(var(--mouse-y, 0px) * 0.3), 0) scale(1.02);
    transition: transform 0.1s ease-out;
}

/* Foreground Character / Video Layer */
.stage-char-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.char-layers-wrap {
    position: absolute;
    inset: 0;
    will-change: transform;
    pointer-events: none;
}

.char-layers-wrap.breathing-active {
    animation: humanBreathing 5s infinite ease-in-out;
}

.char-layer {
    position: absolute;
    bottom: 0;
    right: 6vw;
    height: 100vh;
    height: 100dvh;
    width: auto;
    max-width: 65vw;
    object-fit: contain;
    object-position: bottom center;
    opacity: 0;
    transition: opacity 0.12s cubic-bezier(0.2, 0.8, 0.4, 1);
    will-change: transform, opacity;
    transform: translate3d(var(--mouse-x, 0px), var(--mouse-y, 0px), 0) scale(1.01);
    filter: drop-shadow(-15px 0 35px rgba(0, 0, 0, 0.35));
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 1.5%, black 4%, black 96%, rgba(0,0,0,0.5) 98.5%, transparent 100%),
                        linear-gradient(to bottom, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 1.5%, black 4%, black 96%, rgba(0,0,0,0.5) 98.5%, transparent 100%),
                linear-gradient(to bottom, black 94%, transparent 100%);
}

.char-layer.active {
    opacity: 1;
}

#char-base, .char-layer-base {
    opacity: 1;
}

#char-blink, .char-layer-blink {
    z-index: 3;
}

#char-nod, .char-layer-nod {
    z-index: 2;
}

/* Video Mode Player */
.stage-video-player {
    position: absolute;
    bottom: 0;
    right: 6vw;
    height: 100vh;
    height: 100dvh;
    width: auto;
    max-width: 65vw;
    object-fit: contain;
    object-position: bottom center;
    transform: translate3d(var(--mouse-x, 0px), var(--mouse-y, 0px), 0) scale(1.01);
    transition: transform 0.1s ease-out;
    z-index: 2;
    filter: drop-shadow(-15px 0 35px rgba(0, 0, 0, 0.35));
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 1.5%, black 4%, black 96%, rgba(0,0,0,0.5) 98.5%, transparent 100%),
                        linear-gradient(to bottom, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 1.5%, black 4%, black 96%, rgba(0,0,0,0.5) 98.5%, transparent 100%),
                linear-gradient(to bottom, black 94%, transparent 100%);
}

/* Quick Scene Switcher Removed - Video is Dedicated Mode */
.quick-scene-capsule, .scene-switch-pill, .char-layers-wrap {
    display: none !important;
}

/* Ambient Lighting Shift */
.char-ambient-light {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 4;
    animation: ambientLightGlow 8s infinite alternate ease-in-out;
}

/* Floating "Kliniği Tanıyın" Button */
.showcase-play-btn {
    position: fixed;
    bottom: 80px;
    right: 28%;
    z-index: 10;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.showcase-play-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.03);
}

/* ==========================================================================
   2. LEFT FLOATING CHAT GLASS PANEL
   ========================================================================== */
.toya-main-wrapper {
    position: relative;
    z-index: 20;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 24px;
    pointer-events: none;
}

.chat-window {
    width: 440px;
    max-width: 100%;
    height: calc(100vh - 48px);
    background: rgba(14, 17, 23, 0.72);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    pointer-events: auto;
    position: relative;
    z-index: 30;
}

/* Chat Header */
.chat-window-header {
    padding: 20px 24px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

.header-top-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lang-switcher-btn {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-avatar-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.header-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.header-avatar-img:hover {
    transform: scale(1.05);
}

.voice-start-btn {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.voice-start-btn:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.45);
}

.voice-start-btn.listening {
    background: rgba(2, 132, 199, 0.4);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* Chat Body (Messages Stream) */
.chat-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-window-body::-webkit-scrollbar {
    width: 4px;
}
.chat-window-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-intro-message {
    font-size: 14px;
    line-height: 1.65;
    color: #ffffff;
}

.chat-intro-message p {
    margin-bottom: 12px;
}
.chat-intro-message p:last-child {
    margin-bottom: 0;
}

.msg-row {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.msg-row.user {
    align-items: flex-end;
}

.msg-row.bot {
    align-items: flex-start;
}

.msg-content {
    max-width: 90%;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 18px;
    word-break: break-word;
}

.msg-row.user .msg-content {
    background: rgba(2, 132, 199, 0.85);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.msg-row.bot .msg-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-top-left-radius: 4px;
}

.msg-content strong {
    color: #38bdf8;
    font-weight: 700;
}

.msg-content ul, .msg-content ol {
    margin: 6px 0;
    padding-left: 18px;
}

.msg-content li {
    margin-bottom: 4px;
}

/* Ready Prompt Pills */
.chat-ready-buttons {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 4px 0 12px 0;
    scrollbar-width: none;
}
.chat-ready-buttons::-webkit-scrollbar {
    display: none;
}

.toya-chip {
    background: #ffffff;
    color: #111827;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toya-chip:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.toya-chip span.arrow {
    font-size: 14px;
    font-weight: 800;
}

/* Chat Footer & Input Wrapper */
.chat-window-footer {
    padding: 14px 24px 20px 24px;
    background: rgba(14, 17, 23, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.toya-disclaimer {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 8px;
    text-align: left;
}

.toya-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

#rateConv {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#rateConv:before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, #f22fee, #1614f6, #09e5fb, #ff046b);
    animation: rotateConic 4s linear infinite;
}

#rateConv img, #rateConv i {
    position: relative;
    z-index: 2;
    width: 18px;
    height: 18px;
}

#rateConv:after {
    content: "";
    position: absolute;
    inset: 2px;
    background: #ffffff;
    border-radius: 50%;
    z-index: 1;
}

.toya-input-field-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.toya-input {
    width: 100%;
    background: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 82px 12px 20px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    outline: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.toya-input::placeholder {
    color: #94a3b8;
}

.toya-send-btn {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
}

.toya-send-btn:hover {
    transform: scale(1.15);
}

.toya-send-btn img {
    width: 18px;
    height: 18px;
}

.toya-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    color: #94a3b8;
}

.toya-legal-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   3. RIGHT DYNAMIC SHOWCASE CANVAS
   ========================================================================== */
.preview-content {
    flex: 1;
    height: 100%;
    margin-left: 24px;
    position: relative;
    z-index: 25;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateX(40px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.canvas-top-bar {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.canvas-tab-indicator {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.canvas-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.canvas-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.preview-content-inner {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.preview-content-inner::-webkit-scrollbar {
    width: 6px;
}
.preview-content-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.canvas-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.canvas-view.active {
    display: block;
}

.canvas-hero h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #ffffff;
}

.canvas-hero p {
    font-size: 13.5px;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* Calculator & Price Cards */
.currency-selector {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 18px;
}

.curr-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.curr-btn.active {
    background: var(--toya-primary);
    color: #ffffff;
}

.calc-slider-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.teeth-count-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.custom-range {
    width: 100%;
    accent-color: var(--toya-primary);
    cursor: pointer;
}

.price-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.price-item-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.price-item-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.item-title-wrap h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.item-category {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 600;
}

.item-calc-price {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 12px 0 4px 0;
}

.item-suffix {
    font-size: 11px;
    color: #94a3b8;
}

.canvas-action-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.canvas-primary-btn {
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.canvas-primary-btn:hover {
    transform: translateY(-2px);
}

.canvas-wa-btn {
    background: #10b981;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Comparison Matrix */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.comp-col {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
}

.comp-col-header {
    padding: 16px;
    text-align: center;
}

.comp-col-header.zirkon {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(6, 182, 212, 0.1));
}

.comp-col-header.emax {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.1));
}

.comp-col-header h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 6px 0 2px 0;
}

.comp-features {
    list-style: none;
    padding: 16px;
    font-size: 12.5px;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Forms */
.portal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

.portal-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-form label {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
}

.portal-form input, .portal-form select, .portal-form textarea {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
}

/* ==========================================================================
   4. ANIMATIONS (LIFELIKE BREATHING & AMBIENT GLOW)
   ========================================================================== */
@keyframes humanBreathing {
    0%, 100% {
        transform: translate3d(var(--mouse-x), calc(var(--mouse-y) + 0px), 0) scale(1.02);
    }
    50% {
        transform: translate3d(var(--mouse-x), calc(var(--mouse-y) - 4px), 0) scale(1.024);
    }
}

@keyframes ambientLightGlow {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.08); }
}

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

@keyframes rotateConic {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Adaptation */
@media (max-width: 980px) {
    .toya-main-wrapper {
        padding: 0;
    }

    .chat-window {
        width: 100vw;
        height: 100%;
        border-radius: 0;
        border: none;
    }

    .showcase-play-btn {
        display: none;
    }

    .preview-content {
        position: fixed;
        inset: 0;
        margin-left: 0;
        width: 100vw;
        height: 100%;
        border-radius: 0;
        z-index: 100;
    }

    .stage-video-player, .char-layer {
        right: 0 !important;
        left: 0 !important;
        margin: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        object-fit: cover !important;
        object-position: center 20% !important;
    }
}


/* Toya Language Dropdown */
.toya-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px;
    min-width: 140px;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.toya-lang-dropdown.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toya-lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.toya-lang-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.toya-lang-dropdown a.active {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.toya-input.listening-active {
    box-shadow: 0 0 0 2.5px #ef4444, 0 4px 20px rgba(239, 68, 68, 0.35);
}

.toya-mic-btn {
    position: absolute;
    right: 44px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    z-index: 2;
}

.toya-mic-btn:hover {
    color: #0284c7;
    transform: scale(1.15);
}

.toya-mic-btn.listening {
    color: #ffffff;
    background: #ef4444;
    animation: micPulse 1.2s infinite ease-in-out;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.7);
}

@keyframes micPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.toya-tts-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.toya-tts-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

.toya-tts-btn.speaking {
    color: #10b981;
    animation: pulseSpeaker 1s infinite alternate;
}

@keyframes pulseSpeaker {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}

/* Background Changer Capsule */
.bg-changer-capsule {
    position: fixed;
    bottom: 24px;
    right: 28px;
    z-index: 20;
}

.bg-changer-btn {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.bg-changer-btn:hover {
    background: #0284c7;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.5);
}

.bg-presets-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    gap: 6px;
}

.bg-presets-dropdown.open {
    display: flex;
}

.bg-dropdown-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 4px 8px;
    letter-spacing: 0.5px;
}

.bg-preset-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.bg-preset-item:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.bg-preset-item.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

.bg-upload-item {
    margin-top: 4px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px dashed rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.bg-upload-item:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #ffffff;
}

/* Voice Dictation Status Pill */
.voice-status-pill {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: voicePillFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: fit-content;
    max-width: 100%;
}

.voice-status-pill.active {
    display: inline-flex;
}

.voice-status-pill.listening {
    border-color: rgba(239, 68, 68, 0.7);
    color: #fecaca;
    background: rgba(35, 10, 15, 0.92);
}

.voice-status-pill.warning {
    border-color: rgba(245, 158, 11, 0.7);
    color: #fef08a;
    background: rgba(40, 25, 10, 0.95);
}

.voice-status-pill.success {
    border-color: rgba(16, 185, 129, 0.7);
    color: #a7f3d0;
    background: rgba(6, 35, 25, 0.95);
}

.voice-status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: micPulse 1.2s infinite;
    flex-shrink: 0;
}

.voice-status-pill.warning .dot {
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
    animation: none;
}

.voice-status-pill.success .dot {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: none;
}

.voice-status-pill .status-txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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


/* Hide floating showcase and background buttons */
.showcase-play-btn, .bg-changer-capsule, #showcase-play-btn, #bg-changer-capsule {
    display: none !important;
}
