@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-deep: #0a0a0f;
    --bg-surface: rgba(26, 26, 35, 0.6);
    --accent-primary: #a78bfa;
    /* Lavender */
    --accent-secondary: #c084fc;
    /* Purple */
    --accent-glow: rgba(167, 139, 250, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --user-bubble: rgba(139, 92, 246, 0.15);
    --ai-bubble: rgba(255, 255, 255, 0.05);
    --shadow-premium: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

body:not(.scrollable) {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* --- Premium Background & Lottie --- */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 40% 40%, #1a1a2e 0%, #0a0a0f 100%);
    overflow: hidden;
}

/* Scoped to background only */
.background-effects lottie-player {
    position: absolute;
    top: 45%;
    left: 40%;
    /* Repositioned left of center */
    transform: translate(-50%, -50%);
    width: 45%;
    /* Scale down */
    height: 45%;
    z-index: 10;
    opacity: 0.3;
    /* More subtle */
    pointer-events: none;
}

.orb {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.1;
    animation: floatOrb 20s infinite ease-in-out;
    z-index: 5;
}

.orb-1 {
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    background: var(--accent-secondary);
    bottom: -10%;
    right: -5%;
    animation-delay: -8s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(80px, 40px) scale(1.1);
    }

    66% {
        transform: translate(-40px, 80px) scale(0.95);
    }
}

/* --- Layout: Premium Interface --- */
.app-interface {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    background: transparent;
    /* Ensure it stays clean */
}

/* Header */
.main-header {
    width: 100%;
    z-index: 1000;
    position: sticky;
    top: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 40px;
    /* Reduced from 15px */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Add background specifically for scrollable pages (About) or when needed */
.scrollable .main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.main-header.header-hidden {
    transform: translateY(-100%);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.branding {
    display: flex;
    flex-direction: column;
}

.title-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    /* Prevent wrapping */
    gap: 15px;
}

.branding h1 {
    font-size: 1.8rem;
    /* Reduced from 2.2rem */
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hide header emoji on desktop if desired, or keep it subtle */
.header-emoji {
    font-size: 1.5rem;
    /* Reduced from 1.8rem */
    display: flex;
    align-items: center;
}

.branding p {
    font-size: 0.85rem;
    /* Reduced from 0.95rem */
    color: var(--accent-primary);
    font-weight: 500;
    opacity: 0.8;
}

.profile-btn,
.info-btn,
.mute-btn {
    width: 38px;
    /* Reduced from 44px */
    height: 38px;
    /* Reduced from 44px */
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-btn:hover,
.info-btn:hover,
.mute-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}



.mobile-branding {
    display: none;
    /* Desktop default */
}

/* Chat Viewport */
.chat-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.chat-viewport::after {
    content: "";
    display: block;
    min-height: 340px;
    flex: 0 0 auto;
    width: 100%;
}

.chat-viewport::-webkit-scrollbar {
    display: none;
}

.message {
    max-width: 60%;
    animation: messageFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bubble {
    padding: 18px 24px;
    border-radius: 24px;
    font-size: 1.1rem;
    line-height: 1.5;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f1f5f9;
}

.user-message {
    align-self: flex-end;
}

.user-message .bubble {
    background: var(--user-bubble);
    border-color: rgba(167, 139, 250, 0.3);
    border-bottom-right-radius: 4px;
}

.ai-message {
    align-self: flex-start;
}

.ai-message .bubble {
    border-bottom-left-radius: 4px;
}

/* Interaction Center */
.interaction-center {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    /* Stronger gradient to hide scrolling text efficiently */
    background: linear-gradient(to top, var(--bg-deep) 60%, rgba(10, 10, 15, 0.8) 80%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    z-index: 200;
    pointer-events: none;
    /* Let clicks pass through the transparent top part if needed, but buttons catch events */
}

.interaction-center>* {
    pointer-events: auto;
    /* Re-enable events for children */
}

.voice-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mic-btn {
    width: 84px;
    height: 84px;
    border-radius: 42px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

.mic-btn:hover {
    transform: scale(1.1);
    background: rgba(167, 139, 250, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 50px var(--accent-glow);
}

.mic-btn.listening {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.mic-btn.listening::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ef4444;
    animation: micPulse 2s infinite linear;
}

@keyframes micPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.mic-btn.transcribing {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(167, 139, 250, 0.1);
    box-shadow: 0 0 30px var(--accent-glow);
}

.mic-btn.transcribing::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: micPulse 1.5s infinite linear;
}

#statusText {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    opacity: 0.6;
}

.text-input-bar {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 10px 10px 10px 30px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.text-input-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.1);
}

.text-input-bar,
.text-input-bar * {
    flex-shrink: 0;
}

.text-input-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    min-width: 0;
    /* Allow shrinking if needed, but flex:1 grows it */
    flex-shrink: 1;
    /* Input CAN shrink if needed, unlike buttons */
}

.send-btn {
    width: 46px;
    height: 46px;
    min-width: 46px;
    /* Prevent squeezing */
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: #0c0c12;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* Critical for mobile */
}

.send-btn:hover {
    transform: scale(1.1) rotate(-8deg);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Mobile Specific */
@media (max-width: 768px) {
    .app-interface {
        padding: 0 20px;
    }

    .header-content {
        padding: 12px 16px;
        /* Optimized for small screens */
    }

    .main-header {
        background: transparent;
        /* Removed gradient to keep animation clear */
    }

    .main-header .branding {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        /* Increased gap for better touch targets */
    }

    .main-header .branding h1 {
        font-size: 1.6rem;
        /* Slightly reduced to accommodate mute button */
        margin-bottom: 0;
        line-height: 1;
    }

    .main-header .branding p {
        display: none;
    }

    .header-emoji {
        font-size: 1.5rem;
        line-height: 1;
        /* Stable alignment without margin adjustments */
    }

    .mobile-branding {
        display: none;
        /* Hide the old centered branding */
    }

    .header-actions {
        gap: 8px;
        /* Tighter gap for buttons on mobile */
    }

    .chat-viewport {
        padding-top: 10px;
        padding-bottom: 20px;
    }

    .chat-viewport::after {
        min-height: 280px;
    }

    .message {
        max-width: 92%;
    }

    .bubble {
        font-size: 1rem;
        padding: 14px 18px;
    }

    .interaction-center {
        padding: 20px;
        gap: 15px;
    }

    .mic-btn {
        width: 70px;
        height: 70px;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- About Page Specifics --- */
.content-area {
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 24px 60px;
    /* added side padding */
    box-sizing: border-box;
}

.about-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.about-section h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-section .subtitle {
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-bottom: 25px;
    font-weight: 500;
    opacity: 0.9;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
    opacity: 0.85;
    margin-bottom: 20px;
}

.emphasis-block {
    margin: 30px 0;
    padding: 20px 30px;
    background: rgba(167, 139, 250, 0.05);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px 16px 16px 4px;
}

.emphasis-block p {
    margin-bottom: 10px;
    font-style: italic;
    opacity: 1;
    color: var(--accent-primary);
}

.emphasis-block p:last-child {
    margin-bottom: 0;
}

/* Custom Lists */
.about-section ul {
    list-style: none;
    margin: 20px 0 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-section ul li {
    font-size: 1.1rem;
    color: var(--text-main);
    opacity: 0.85;
    position: relative;
    padding-left: 28px;
    line-height: 1.5;
}

.about-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.check-list li::before {
    content: '✓';
}

.feature-list li::before {
    content: '“';
    font-size: 1.5rem;
    top: -4px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-primary);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.back-btn:hover {
    transform: translateX(-4px);
}

.cta-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-group {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--accent-primary);
    color: #0c0c12;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* margin-top: 30px; Removed in favor of button-group */
    box-shadow: 0 10px 30px var(--accent-glow);
}

.contact-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 40px var(--accent-glow);
    background: #fff;
}

.contact-button svg {
    transition: transform 0.3s ease;
}

.contact-button:hover svg {
    transform: rotate(10deg);
}

/* Founder Words CTA */
.founder-cta-container {
    margin-top: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.founder-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.founder-link .icon {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--accent-secondary);
}

.founder-link:hover {
    color: #fff;
    border-color: var(--accent-secondary);
    background: rgba(192, 132, 252, 0.05);
    transform: translateY(-2px);
    opacity: 1;
}

/* Bottom Decorative Animation */
.bottom-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    margin-bottom: 40px;
    opacity: 0.4;
    pointer-events: none;
}

.bottom-animation lottie-player {
    filter: saturate(0.8);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 0 20px 80px 20px;
        gap: 30px;
    }

    .about-section {
        padding: 30px 24px;
    }

    .about-section h1 {
        font-size: 2.2rem;
    }

    .about-section .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    .about-section {
        padding: 24px 18px;
    }

    .about-section h1 {
        font-size: 1.8rem;
    }

    .about-section h2 {
        font-size: 1.4rem;
    }

    .about-section p,
    .about-section ul li {
        font-size: 0.95rem;
    }

    .interaction-center {
        width: 100%;
        padding: 0 16px 20px 16px;
    }

    .text-input-bar input {
        padding: 14px 18px;
        font-size: 0.95rem;
    }
}

/* --- Typing Indicator --- */
.typing-indicator .bubble {
    display: flex;
    gap: 6px;
    padding: 16px 20px;
    min-width: 60px;
    justify-content: center;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out;
    opacity: 0.6;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Security Note */
.security-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 4px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Testimonials Section */
.testimonials-section {
    margin-top: 30px;
    /* Reduced from 60px */
    overflow: hidden;
    padding-bottom: 20px;
    position: relative;
}

/* Glow separator effect */
.testimonials-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 100%);
    opacity: 0.5;
}

.testimonials-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.testimonials-scroll {
    display: flex;
    overflow: hidden;
    /* Hide scrollbar */
    padding: 10px 0;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
}

.testimonials-track {
    display: flex;
    gap: 20px;
    animation: scrollTestimonials 40s linear infinite;
    width: max-content;
}

.testimonials-track:hover {
    animation-play-state: paused;
}

@keyframes scrollTestimonials {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 10px));
        /* -50% of track width minus half gap */
    }
}

.testimonials-scroll::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    min-width: 280px;
    max-width: 280px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    /* Clearer border on hover */
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.9;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
}

.review-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stars {
    color: #FFD700;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Founder CTA tweaks */
.founder-cta-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.vision-btn.black-theme {
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.vision-btn.black-theme:hover {
    background: #1a1a1a;
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(167, 139, 250, 0.25);
    /* Lavender Glow */
}

@media (max-width: 480px) {
    .testimonial-card {
        min-width: 260px;
        max-width: 260px;
    }

    .about-section {
        padding: 25px 20px;
    }
}