/* DeepZone Showcase Assistant - Modern Dark Theme & Voice UI Styles */

:root {
    --primary-indigo: #6366f1;
    --primary-indigo-dark: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --bg-dark: #0b0f19;
    --surface-card: #1e293b;
    --surface-border: rgba(255, 255, 255, 0.08);
}

/* Smooth scrolling and tap highlight reset */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

/* Status Indicator Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    display: inline-block;
}

/* Glowing Animated Microphone Button */
.mic-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 4px 14px -2px rgba(79, 70, 229, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(165, 180, 252, 0.3);
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px -2px rgba(79, 70, 229, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Material Symbols Icon Font Variations */
.mic-button .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), font-variation-settings 0.2s ease;
    color: #ffffff !important;
}

.mic-button:hover .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700;
}

/* Idle State */
.mic-button.mic-idle {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 4px 14px -2px rgba(79, 70, 229, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(165, 180, 252, 0.3);
}

.mic-button.mic-idle .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 600;
}

.mic-button.mic-idle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px -2px rgba(79, 70, 229, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.mic-button.mic-idle:hover .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700;
}

/* Connecting State */
.mic-button.mic-connecting {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    border: 1px solid rgba(103, 232, 249, 0.7);
    animation: pulseRing 1.5s infinite;
}

/* Active Listening State (Hands-Free) */
.mic-button.mic-listening {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.8), 0 0 15px rgba(16, 185, 129, 0.6);
    border: 2px solid rgba(110, 231, 183, 0.9);
    animation: listeningGlow 2s infinite ease-in-out;
}

.mic-button.mic-listening .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700;
}

/* Speaking State (Gemini Aoede Speaking) */
.mic-button.mic-speaking {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.8), 0 0 50px rgba(99, 102, 241, 0.4);
    border: 2px solid rgba(125, 211, 252, 0.9);
    animation: speakingPulse 1.2s infinite ease-in-out;
}

.mic-button.mic-speaking .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700;
}

/* Muted State */
.mic-button.mic-muted {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    border: 1px solid rgba(252, 165, 165, 0.4);
}

/* PTT Ready State (Waiting for user to press) */
.mic-button.mic-ptt-ready {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(253, 230, 138, 0.85);
}

.mic-button.mic-ptt-ready .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700;
}

.mic-button.mic-ptt-ready:hover {
    transform: scale(1.05);
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.85);
}

/* PTT Active State (Held down & transmitting) */
.mic-button.mic-ptt-active {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.95);
    border: 2px solid rgba(110, 231, 183, 1);
    animation: listeningGlow 1.2s infinite ease-in-out;
}

.mic-button.mic-ptt-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700;
}

/* Keyframe Animations */
@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(6, 182, 212, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

@keyframes listeningGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5), 0 0 0 0 rgba(16, 185, 129, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 35px rgba(16, 185, 129, 0.8), 0 0 0 10px rgba(16, 185, 129, 0);
        transform: scale(1.04);
    }
}

@keyframes speakingPulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(56, 189, 248, 0.6), 0 0 40px rgba(99, 102, 241, 0.3);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 40px rgba(56, 189, 248, 0.9), 0 0 60px rgba(99, 102, 241, 0.6);
        transform: scale(1.06);
    }
}

/* Visual Audio Waveform Bars */
.wave-bar {
    width: 4px;
    height: 20%;
    min-height: 4px;
    max-height: 24px;
    background: linear-gradient(to top, #6366f1, #38bdf8);
    border-radius: 9999px;
    transition: height 0.08s ease-out;
}

/* Markdown Rendering Inside Chat Bubbles */
.markdown-body {
    line-height: 1.6;
}

.markdown-body p {
    margin-bottom: 0.6rem;
}

.markdown-body p:last-child {
    margin-bottom: 0;
}

.markdown-body pre {
    background-color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    margin: 0.6rem 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.markdown-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.15em 0.35em;
    border-radius: 0.35rem;
    color: #e2e8f0;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.markdown-body ul, .markdown-body ol {
    margin: 0.4rem 0 0.6rem 1.2rem;
    padding: 0;
}

.markdown-body ul {
    list-style-type: disc;
}

.markdown-body ol {
    list-style-type: decimal;
}

.markdown-body li {
    margin-bottom: 0.2rem;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.82rem;
    display: block;
    overflow-x: auto;
}

.markdown-body th, .markdown-body td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.75rem;
    text-align: left;
}

.markdown-body th {
    background: rgba(99, 102, 241, 0.2);
    font-weight: 600;
    color: #ffffff;
}

.markdown-body tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.markdown-body blockquote {
    border-left: 3px solid #6366f1;
    padding-left: 0.75rem;
    margin: 0.6rem 0;
    color: #94a3b8;
    font-style: italic;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

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