/* ============================================================================
   JULIE AI - JARVIS Inspired Futuristic Homepage
   System-based dark/light mode with cyan holographic aesthetics
   ============================================================================ */

:root {
    /* Core Brand Colors */
    --cyan-primary: #00D4FF;
    --cyan-bright: #00F0FF;
    --cyan-glow: rgba(0, 212, 255, 0.6);
    --orange-accent: #FF6B00;
    --orange-glow: rgba(255, 107, 0, 0.6);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Light Mode Colors (default based on system preference) */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7F7F8;
    --bg-surface: #FAFAFA;
    --text-primary: #0D0D0D;
    --text-secondary: #4A4A4A;
    --text-muted: #8E8E8E;
    --border-color: rgba(0, 0, 0, 0.1);
    --composer-bg: #F0F0F0;
    --message-user-bg: rgba(0, 212, 255, 0.1);
    --message-assistant-bg: #F7F7F8;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark Mode - System Preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0A0A0A;
        --bg-secondary: #1A1A1A;
        --bg-surface: #2A2A2A;
        --text-primary: #E5E5E5;
        --text-secondary: #B0B0B0;
        --text-muted: #8E8E8E;
        --border-color: rgba(0, 212, 255, 0.2);
        --composer-bg: #2F2F2F;
        --message-user-bg: rgba(0, 212, 255, 0.15);
        --message-assistant-bg: rgba(255, 255, 255, 0.05);
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================================================
   STICKY HEADER
   ============================================================================ */

/* ============================================================================
   HAMBURGER MENU
   ============================================================================ */

.hamburger-menu {
    display: flex; /* Always visible on all screen sizes */
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Navigation Menu Overlay - Modal Style (like Chosen site) */
.nav-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent backdrop */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.nav-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-menu-container {
    background: white;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-menu-overlay.active .nav-menu-container {
    transform: scale(1);
}

.nav-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: transparent;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 24px;
    font-weight: 300;
}

.nav-close-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.nav-close-btn svg {
    width: 20px;
    height: 20px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: left;
    margin-top: 1rem;
}

.nav-menu-item {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e5e7eb;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.nav-menu-item:last-child {
    border-bottom: none;
}

.nav-menu-item:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    padding-left: 0.5rem;
}

.nav-menu-overlay.active .nav-menu-item {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu-overlay.active .nav-menu-item:nth-child(1) { transition-delay: 0.1s; }
.nav-menu-overlay.active .nav-menu-item:nth-child(2) { transition-delay: 0.15s; }
.nav-menu-overlay.active .nav-menu-item:nth-child(3) { transition-delay: 0.2s; }
.nav-menu-overlay.active .nav-menu-item:nth-child(4) { transition-delay: 0.25s; }
.nav-menu-overlay.active .nav-menu-item:nth-child(5) { transition-delay: 0.3s; }
.nav-menu-overlay.active .nav-menu-item:nth-child(6) { transition-delay: 0.35s; }
.nav-menu-overlay.active .nav-menu-item:nth-child(7) { transition-delay: 0.4s; }

.nav-menu-item:hover {
    color: var(--cyan-primary);
    transform: translateX(10px);
}

@media (max-width: 768px) {
    .nav-menu-item {
        font-size: 1.8rem;
    }
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Transparent header on scroll */
.sticky-header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 20px var(--shadow-color);
}

@media (prefers-color-scheme: dark) {
    .sticky-header.scrolled {
        background: rgba(10, 10, 10, 0.8);
    }
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image-wrapper {
    position: relative;
    width: 45px;
    height: 45px;
}

.logo-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan-primary);
    position: relative;
    z-index: 2;
}

.logo-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid var(--cyan-primary);
    border-radius: 50%;
    animation: logoRingPulse 3s ease-in-out infinite;
}

@keyframes logoRingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.8;
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--cyan-primary);
    letter-spacing: 2px;
    line-height: 1;
    text-shadow: 0 0 10px var(--cyan-glow);
}

.logo-version {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.header-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--border-color);
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

.header-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--cyan-primary);
}

.header-btn.primary {
    background: var(--cyan-primary);
    color: #000;
    border-color: var(--cyan-primary);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.header-btn.primary:hover {
    background: var(--cyan-bright);
    box-shadow: 0 0 30px var(--cyan-glow);
}

/* ============================================================================
   LOADING SEQUENCE - Video → Overlay → Title → Buttons
   ============================================================================ */

/* Video loads first */
.video-container {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

/* Overlay and scan lines load second */
.scan-line,
.video-overlay {
    opacity: 0;
    animation: fadeIn 0.6s ease 0.8s forwards;
}

/* Title and subtitle load third */
.hero-title,
.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.4s forwards;
}

/* Buttons load last with slide-in animations */
.hero-ctas {
    opacity: 1; /* Keep visible for button animations */
}

.cta-btn.primary {
    opacity: 0;
    animation: slideInFromLeft 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.2s forwards,
               wiggle 0.5s ease 3.0s;
}

.cta-btn.secondary {
    opacity: 0;
    animation: slideInFromRight 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 2.2s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-120px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(120px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    15% { transform: translateX(-8px) rotate(-3deg); }
    30% { transform: translateX(8px) rotate(3deg); }
    45% { transform: translateX(-6px) rotate(-2deg); }
    60% { transform: translateX(6px) rotate(2deg); }
    75% { transform: translateX(-3px) rotate(-1deg); }
    85% { transform: translateX(3px) rotate(1deg); }
}

/* ============================================================================
   HERO SECTION - NO FADE IN
   ============================================================================ */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
    overflow: hidden;
    margin-top: 70px;
}

/* Video Background - NO ANIMATION */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Matrix Canvas Overlay - HIDDEN */
.matrix-canvas {
    display: none;
}

/* Video Overlay - Original JARVIS Effect (No Blur) */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
    z-index: 3;
}

@media (prefers-color-scheme: dark) {
    .video-overlay {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%);
    }
}

/* JARVIS Holographic Scan Lines - Scanning Down Video */
.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 20%,
        var(--cyan-primary) 50%,
        rgba(0, 212, 255, 0.3) 80%,
        transparent 100%);
    box-shadow: 0 0 15px var(--cyan-glow), 0 0 30px rgba(0, 212, 255, 0.4);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    top: -10px;
}

/* Scan lines animate from top to bottom */
.scan-line-1 {
    animation: scanDown1 6s ease-in-out infinite;
}

.scan-line-2 {
    animation: scanDown2 8s ease-in-out infinite;
}

.scan-line-3 {
    animation: scanDown3 7s ease-in-out infinite;
}

@keyframes scanDown1 {
    0% { opacity: 0; top: -10px; }
    5% { opacity: 0.9; top: 10%; }
    15% { opacity: 0.9; top: 85%; }
    20% { opacity: 0; top: 95%; }
    100% { opacity: 0; top: 95%; }
}

@keyframes scanDown2 {
    0% { opacity: 0; top: -10px; }
    30% { opacity: 0; top: -10px; }
    35% { opacity: 0.9; top: 15%; }
    50% { opacity: 0.9; top: 90%; }
    55% { opacity: 0; top: 100%; }
    100% { opacity: 0; top: 100%; }
}

@keyframes scanDown3 {
    0% { opacity: 0; top: -10px; }
    60% { opacity: 0; top: -10px; }
    65% { opacity: 0.9; top: 20%; }
    80% { opacity: 0.9; top: 80%; }
    85% { opacity: 0; top: 95%; }
    100% { opacity: 0; top: 95%; }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* CTA Buttons */
.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.cta-btn.primary {
    background: var(--cyan-primary);
    color: #000;
    box-shadow: 0 10px 30px var(--cyan-glow);
}

.cta-btn.primary:hover {
    background: var(--cyan-bright);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px var(--cyan-glow);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid var(--dark-border);
    backdrop-filter: blur(10px);
}

.cta-btn.secondary:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--cyan-primary);
    transform: translateY(-2px);
}

.cta-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   CAPABILITIES CAROUSEL - MOVED TO AFTER VIDEO
   ============================================================================ */

.capabilities-carousel {
    position: relative;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 3rem;
    animation: carouselScroll 25s linear infinite; /* Faster: 40s → 25s */
}

@keyframes carouselScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.carousel-track:hover {
    animation-play-state: paused;
}

.capability-item {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: rockingMotion 3s ease-in-out infinite;
}

/* Stagger the rocking animation */
.capability-item:nth-child(2n) {
    animation-delay: 0.3s;
}

.capability-item:nth-child(3n) {
    animation-delay: 0.6s;
}

.capability-item:nth-child(4n) {
    animation-delay: 0.9s;
}

@keyframes rockingMotion {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

.capability-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

.capability-item:hover {
    animation-play-state: paused;
    transform: translateY(-10px);
}

.capability-item:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
}

/* ============================================================================
   STATS BANNER - REMOVED
   ============================================================================ */

.stats-banner {
    display: none;
}

/* ============================================================================
   CORE SYSTEMS - Rotating Cards Section
   ============================================================================ */

.core-systems-section {
    background: var(--dark-bg);
    padding: 5rem 2rem;
    overflow: hidden;
}

.core-systems-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.core-systems-header::before,
.core-systems-header::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        var(--cyan-primary) 20%,
        var(--cyan-primary) 80%,
        transparent
    );
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.core-systems-title-wrapper {
    flex-shrink: 0;
}

.core-systems-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #000000; /* Black in light mode */
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .core-systems-header h2 {
        color: var(--cyan-primary); /* Cyan in dark mode */
        text-shadow: 0 0 20px var(--cyan-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.core-systems-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.rotating-cards-container {
    max-width: 900px; /* Smaller container */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns on desktop */
    gap: 1.5rem;
}

.card-pair {
    display: contents;
}

.rotating-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem; /* Even smaller padding */
    max-width: 400px; /* Limit card width */
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* Slower, smoother - no bounce */
    transform-style: preserve-3d;
    opacity: 0;
    /* Very subtle lift from bottom - gradual like therapy site */
    transform: perspective(1200px) rotateX(8deg) translateY(50px) scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rotating-card.visible {
    opacity: 1;
    /* Gradual lift to position - no overshoot, no bounce */
    transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
}

.rotating-card:hover {
    background: var(--bg-primary);
    border-color: var(--cyan-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px) scale(1.02);
}

.card-icon {
    font-size: 20px;
    margin-bottom: 0.5rem;
    color: var(--cyan-primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.rotating-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px; /* Smaller text */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .rotating-card h3 {
        color: #FFFFFF;
    }
}

.rotating-card p {
    color: var(--text-secondary);
    font-size: 10.5px; /* Smaller text */
    line-height: 1.3;
}

/* ============================================================================
   CHAT SECTION
   ============================================================================ */

.chat-section {
    padding: 5rem 2rem 0 2rem; /* Removed bottom padding - composer-area provides spacing */
    background: var(--bg-secondary);
    min-height: 100vh;
}

.chat-header {
    text-align: center;
    margin-bottom: 3rem;
}

.chat-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
    .chat-header h2 {
        color: var(--cyan-primary);
        text-shadow: 0 0 15px var(--cyan-glow), 0 3px 10px rgba(0, 0, 0, 0.3);
    }
}

.chat-header p {
    font-size: 18px;
    color: var(--text-secondary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Messages Area */
.messages-area {
    max-width: 900px;
    margin: 0 auto 2rem;
    min-height: 500px;
    padding: 0 2rem 2rem 2rem;
    overflow-y: auto;
    max-height: 600px;
}

.messages-container {
    max-width: 768px; /* Match ChatGPT/Claude width */
    margin: 0 auto; /* Center it */
}

/* Message Styles */
.message {
    margin-bottom: 2rem;
    animation: messageSlide 0.4s ease;
    display: flex;
    justify-content: flex-start; /* Default left alignment for assistant messages */
}

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

.message-bubble {
    position: relative;
    width: fit-content;
    max-width: 85%;
    padding: 1.25rem 1.5rem;
    padding-bottom: 2.5rem; /* Extra space for action buttons */
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Initial greeting - left-aligned, drops from top */
#messagesContainer .message:first-child {
    display: flex;
    justify-content: flex-start; /* Force left alignment */
    animation: dropInMessage 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#messagesContainer .message:first-child.slide-in {
    /* Animation already applied by default above */
}

@keyframes dropInMessage {
    0% {
        opacity: 0;
        transform: translateY(-60px) scale(0.92);
    }
    60% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Markdown Formatting within Message Bubbles */
.message-bubble p {
    margin-bottom: 12px;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble strong {
    font-weight: 600;
}

.message-bubble em {
    font-style: italic;
}

.message-bubble a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.9;
}

.message-bubble a:hover {
    opacity: 1;
}

.message.user .message-bubble a {
    color: #FFFFFF;
    text-decoration: underline;
}

.message.assistant .message-bubble a {
    color: #007AFF;
}

/* Lists */
.message-bubble ul,
.message-bubble ol {
    margin: 12px 0;
    padding-left: 24px;
}

.message-bubble li {
    margin-bottom: 6px;
}

.message-bubble li:last-child {
    margin-bottom: 0;
}

/* Headings */
.message-bubble h1,
.message-bubble h2,
.message-bubble h3 {
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 10px;
}

.message-bubble h1:first-child,
.message-bubble h2:first-child,
.message-bubble h3:first-child {
    margin-top: 0;
}

.message-bubble h1 {
    font-size: 1.5em;
}

.message-bubble h2 {
    font-size: 1.3em;
}

.message-bubble h3 {
    font-size: 1.1em;
}

/* Blockquotes */
.message-bubble blockquote {
    border-left: 3px solid rgba(0, 0, 0, 0.2);
    padding-left: 12px;
    margin: 12px 0;
    font-style: italic;
    opacity: 0.9;
}

.message.user .message-bubble blockquote {
    border-left-color: rgba(255, 255, 255, 0.5);
}

/* Code Blocks */
.message-code-block {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.code-block-language {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.code-block-copy:hover {
    background: #3d3d3d;
    border-color: #5d5d5d;
    color: #d1d5db;
}

.code-block-copy.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.code-block-copy svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.code-block-content {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #1e1e1e;
}

.code-block-content code {
    color: #d4d4d4;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

/* Inline Code */
.inline-code {
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: inherit;
}

.message.user .message-bubble .inline-code {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Syntax Highlighting */
.hljs-keyword {
    color: #c586c0;
}

.hljs-string {
    color: #ce9178;
}

.hljs-number {
    color: #b5cea8;
}

.hljs-comment {
    color: #6a9955;
    font-style: italic;
}

.hljs-function {
    color: #dcdcaa;
}

.hljs-class {
    color: #4ec9b0;
}

@media (max-width: 768px) {
    .message-bubble {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .message-bubble {
        max-width: 95%;
    }
}

/* iPhone iMessage Style Bubbles */
.message.user {
    justify-content: flex-end; /* Right-align user messages */
}

.message.user .message-bubble {
    background: #007AFF;
    color: #FFFFFF;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message.assistant {
    justify-content: flex-start; /* Left-align assistant messages */
}

.message.assistant .message-bubble {
    background: #E5E5EA;
    color: #000000;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .message.assistant .message-bubble {
        background: #3A3A3C;
        color: #FFFFFF;
    }
}

/* Message Actions - Copy, Thumbs Up, Thumbs Down */
.message-actions {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-bubble:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    width: 24px;
    height: 24px;
}

.message-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

@media (prefers-color-scheme: dark) {
    .message-action-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.message-action-btn svg {
    width: 14px;
    height: 14px;
}

.message-action-btn.copied {
    color: var(--cyan-primary);
}

.message-action-btn.liked {
    color: var(--cyan-primary);
}

.message-action-btn.disliked {
    color: #FF6B00;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    gap: 6px;
    padding: 1rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan-primary);
    animation: loadingBounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px var(--cyan-glow);
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* ============================================================================
   COMPOSER AREA - DARK THEME (Matching Logged-in)
   ============================================================================ */

.composer-area {
    max-width: 900px;
    margin: 0 auto;
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    padding: 1rem 1rem 0.5rem 1rem; /* Reduced bottom padding to remove white border */
    width: 100%; /* Full width on mobile */
    box-sizing: border-box;
}

.composer-disclaimer {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 auto 1rem auto; /* Center it */
    max-width: 768px; /* Match input wrapper width */
}

.composer-disclaimer a {
    color: var(--cyan-primary);
    text-decoration: underline;
}

/* Active Chips (Web Search) */
.active-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--cyan-primary);
    font-weight: 500;
}

/* Composer Wrapper - iPhone iMessage Style */
.composer-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    position: relative;
}

.composer-wrapper:focus-within {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Composer Buttons - Match Logged-In Style */
.composer-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.composer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

.composer-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.composer-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}

.composer-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #FFFFFF;
    -webkit-text-fill-color: #FFFFFF;
    resize: none;
    outline: none;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.5;
    padding: 6px 8px;
}

.composer-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.composer-input::-webkit-scrollbar {
    width: 6px;
}

.composer-input::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.send-btn {
    background: #00D4FF;
    color: #000;
    width: 32px;
    height: 32px;
    min-width: 32px;
}

.send-btn:hover {
    background: #00F0FF;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Plus Menu with Nested Submenu */
.plus-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
    min-width: 240px;
    z-index: 100;
}

.plus-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.plus-menu-item:hover {
    background: rgba(0, 212, 255, 0.15);
}

.plus-menu-item svg:first-child {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.plus-menu-item > span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    flex: 1;
}

/* Arrow icon for submenu items */
.plus-menu-item .arrow-right {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

/* Preferences Submenu - Appears to the right */
.preferences-submenu {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.plus-menu-item.has-submenu:hover .preferences-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: all;
}

.submenu-header {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
}

.submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.submenu-item:hover {
    background: rgba(0, 212, 255, 0.08);
}

.submenu-item-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
}

.submenu-item-info svg {
    width: 20px;
    height: 20px;
    color: var(--cyan-primary);
    flex-shrink: 0;
}

.submenu-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.submenu-item-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.submenu-item-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--cyan-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.composer-footer {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 1rem auto 0 auto; /* Center it */
    max-width: 768px; /* Match input wrapper width */
}

.login-link {
    color: var(--cyan-primary);
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

/* ============================================================================
   MODAL - Signup
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px var(--shadow-color);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 212, 255, 0.1);
    color: var(--cyan-primary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(0, 212, 255, 0.2);
}

.signup-modal h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--cyan-primary);
    margin-bottom: 0.5rem;
}

.signup-modal > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--cyan-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.signup-submit-btn {
    padding: 1rem;
    background: var(--cyan-primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.signup-submit-btn:hover {
    background: var(--cyan-bright);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-footer a {
    color: var(--cyan-primary);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    /* 1 column on mobile */
    .rotating-cards-container {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        max-width: 500px;
    }

    .rotating-card {
        padding: 1.25rem;
    }
}

@media (max-width: 968px) {
    .sticky-header {
        padding: 1rem 1.5rem;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .capability-item {
        width: 100px;
        height: 100px;
    }

    .core-systems-header h2 {
        font-size: 36px;
    }

    .core-systems-header::before,
    .core-systems-header::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .logo-name {
        font-size: 18px;
    }

    .header-btn {
        padding: 0.5rem 1rem;
        font-size: 13px;
    }

    .chat-header h2 {
        font-size: 32px;
    }

    .messages-area {
        padding: 1rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .capability-item {
        width: 80px;
        height: 80px;
    }

    .stats-banner {
        padding: 2rem 1rem;
    }

    .stat-banner-value {
        font-size: 28px;
    }

    .stat-banner-label {
        font-size: 10px;
    }

    .core-systems-header h2 {
        font-size: 28px;
    }

    .rotating-card {
        padding: 0.625rem;
    }

    .rotating-card h3 {
        font-size: 14px;
    }

    .rotating-card p {
        font-size: 10px;
    }

    .card-icon {
        font-size: 18px;
        margin-bottom: 0.4rem;
    }

    .composer-wrapper {
        padding: 8px 10px;
        gap: 6px;
    }

    .composer-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .send-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .composer-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ============================================================================
   MODERN COMPOSE AREA - ChatGPT/Claude Combined Style (From Logged-In)
   ============================================================================ */

.chat-input-container-modern {
    padding: 16px 2rem 24px 2rem;
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    position: sticky;
    bottom: 0;
    z-index: 100;
    opacity: 1; /* Always visible on desktop */
}

.chat-input-wrapper-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 768px; /* Match ChatGPT/Claude width */
    margin: 0 auto; /* Center it */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    padding: 10px 12px;
    transition: all 0.25s ease;
}

.chat-input-wrapper-modern:focus-within {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
    .chat-input-wrapper-modern {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Attach Button (Plus) - No background shape, only cyan highlight on hover */
.attach-btn-modern {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 0;
}

.attach-btn-modern:hover {
    background: transparent;
    color: #00d4ff;
}

@media (prefers-color-scheme: dark) {
    .attach-btn-modern {
        color: #999;
    }
    .attach-btn-modern:hover {
        color: #00d4ff;
    }
}

.attach-btn-modern svg {
    width: 24px;
    height: 24px;
}

/* Text Input - Dark text in light mode, white in dark mode */
.chat-input-modern {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    padding: 6px 8px;
    line-height: 1.5;
}

textarea.chat-input-modern {
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
}

#messageInput {
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
}

.chat-input-modern::placeholder {
    color: #999;
}

@media (prefers-color-scheme: dark) {
    .chat-input-modern,
    textarea.chat-input-modern,
    #messageInput {
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }

    .chat-input-modern::placeholder {
        color: #666;
    }
}

.chat-input-modern::-webkit-scrollbar {
    width: 6px;
}

.chat-input-modern::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Dictation Button - No background shape, only cyan highlight on hover */
.dictation-btn-modern {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 0;
}

.dictation-btn-modern:hover {
    background: transparent;
    color: #00d4ff;
}

@media (prefers-color-scheme: dark) {
    .dictation-btn-modern {
        color: #999;
    }
    .dictation-btn-modern:hover {
        color: #00d4ff;
    }
}

.dictation-btn-modern.active {
    background: #ff4444;
    color: white;
    animation: pulse 2s infinite;
}

.dictation-btn-modern svg {
    width: 18px;
    height: 18px;
}

/* Voice Mode Button - No background shape, only cyan highlight on hover */
.voice-mode-btn-modern {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 0;
}

.voice-mode-btn-modern:hover {
    background: transparent;
    color: #00d4ff;
}

@media (prefers-color-scheme: dark) {
    .voice-mode-btn-modern {
        color: #999;
    }
    .voice-mode-btn-modern:hover {
        color: #00d4ff;
    }
}

.voice-mode-btn-modern svg {
    width: 20px;
    height: 20px;
}

/* Send Button - Rounded square, no background on hover */
.send-btn-modern {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 0;
}

.send-btn-modern:hover {
    background: transparent;
    color: #00d4ff;
}

@media (prefers-color-scheme: dark) {
    .send-btn-modern {
        color: #999;
    }
    .send-btn-modern:hover {
        color: #00d4ff;
    }
}

.send-btn-modern.enabled {
    background: #00d4ff;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.send-btn-modern.enabled:hover {
    background: #00e4ff;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    transform: scale(1.05);
}

.send-btn-modern svg {
    width: 20px;
    height: 20px;
}

/* Attach Menu Dropdown */
.attach-menu-modern {
    position: absolute;
    bottom: 70px;
    left: 24px;
    background: rgba(20, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: slideUpFadeIn 0.2s ease;
}

.attach-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-gray-200);
    font-size: 14px;
}

.attach-menu-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--text-white);
}

.attach-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-cyan);
}

/* Preferences Menu Popup */
.preferences-menu-modern {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    z-index: 2000;
    animation: slideUpFadeIn 0.3s ease;
}

.preferences-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preferences-menu-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
}

.preferences-close-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-gray-300);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preferences-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.preferences-menu-content {
    padding: 16px 24px 24px 24px;
}

.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info {
    flex: 1;
    margin-right: 16px;
}

.preference-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-white);
}

.preference-description {
    font-size: 13px;
    color: var(--text-gray-400);
    line-height: 1.4;
}

.preference-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preference-badge.all-users {
    background: rgba(100, 200, 100, 0.15);
    color: #64c864;
}

/* Toggle Switch Styling */
.preference-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.preference-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.preference-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-radius: 28px;
}

.preference-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.preference-toggle input:checked + .preference-toggle-slider {
    background: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.preference-toggle input:checked + .preference-toggle-slider:before {
    transform: translateX(20px);
}

.preference-toggle:hover .preference-toggle-slider {
    background: rgba(255, 255, 255, 0.15);
}

.preference-toggle input:checked:hover + .preference-toggle-slider {
    background: #00e4ff;
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
}

/* Chat Section - Ensure proper height for sticky behavior */
.chat-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.messages-area {
    flex: 1;
    min-height: 400px;
    padding-bottom: 40px; /* Reduced space for transparent sticky input */
}

/* Mobile Responsive for Modern Compose */
@media (max-width: 768px) {
    .chat-input-container-modern {
        padding: 12px 0 16px 0; /* Remove horizontal padding for full width */
        position: fixed;
        bottom: -200px; /* Start off-screen */
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        opacity: 0;
        transition: bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    }

    .chat-input-container-modern.visible {
        bottom: 0; /* Slide up when visible */
        opacity: 1;
        animation: slideUpFromBottom 0.4s ease forwards;
    }

    /* Full width wrapper on mobile */
    .chat-input-wrapper-modern {
        margin: 0 12px; /* Edge padding inside container */
        max-width: calc(100% - 24px);
    }

    .composer-disclaimer {
        padding: 0 12px; /* Match wrapper padding */
    }

    @keyframes slideUpFromBottom {
        from {
            bottom: -200px;
            opacity: 0;
        }
        to {
            bottom: 0;
            opacity: 1;
        }
    }

    .chat-section {
        padding-bottom: 0; /* No bottom padding - composer handles spacing */
    }

    .messages-area {
        padding-bottom: 60px; /* Reduced space on mobile */
    }

    .chat-input-wrapper-modern {
        border-radius: 20px;
        padding: 8px 10px;
        gap: 6px;
        max-width: 100%; /* Full width on mobile */
        margin: 0; /* Remove auto margin */
    }

    .chat-input-modern {
        font-size: 16px;  /* Prevent zoom on iOS */
    }

    .attach-btn-modern,
    .dictation-btn-modern,
    .voice-mode-btn-modern {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .send-btn-modern {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .chat-input-wrapper-modern {
        gap: 4px;
        padding: 6px 8px;
    }

    .attach-btn-modern svg,
    .dictation-btn-modern svg,
    .voice-mode-btn-modern svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================================================
   DICTATION PULSE ANIMATION
   ============================================================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* ============================================================================
   VOICE MODE PROMPT MODAL (ChatGPT-style)
   ============================================================================ */

.voice-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .voice-prompt-modal {
        background: rgba(15, 15, 35, 0.98);
    }
}

.voice-prompt-modal.active {
    opacity: 1;
    visibility: visible;
}

.voice-prompt-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.voice-prompt-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.voice-prompt-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.voice-prompt-close svg {
    width: 20px;
    height: 20px;
}

.voice-prompt-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Animated Orb with Circular Lines */
.voice-prompt-orb-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-prompt-orb {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, #00FF88 0%, #00D4FF 50%, #0066FF 100%);
    animation: orbBreathing 4s ease-in-out infinite;
    box-shadow:
        0 0 60px rgba(0, 255, 136, 0.6),
        0 0 120px rgba(0, 212, 255, 0.5),
        0 0 180px rgba(0, 102, 255, 0.3),
        inset 0 0 60px rgba(255, 255, 255, 0.2);
    z-index: 0;
}

@keyframes orbBreathing {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.1);
    }
}

.voice-prompt-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
}

.voice-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 300px;
}

.voice-prompt-btn {
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.voice-prompt-btn.primary {
    background: #000;
    color: #fff;
    border: none;
}

@media (prefers-color-scheme: dark) {
    .voice-prompt-btn.primary {
        background: #fff;
        color: #000;
    }
}

.voice-prompt-btn.primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.voice-prompt-link {
    color: var(--text-primary);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.voice-prompt-link:hover {
    color: var(--cyan-primary);
}

@media (max-width: 768px) {
    .voice-prompt-container {
        padding: 40px 24px;
        gap: 24px;
    }

    .voice-prompt-title {
        font-size: 24px;
    }

    .voice-prompt-orb-wrapper {
        width: 180px;
        height: 180px;
    }

    .voice-prompt-orb {
        width: 120px;
        height: 120px;
    }
}
