/* Next Live — Google Cloud Next '25/'26 Theme */
/* 3-Stage Journey: Invitation → Concierge → Keynote */

:root {
    --google-blue: #4285F4;
    --google-red: #EA4335;
    --google-yellow: #FBBC04;
    --google-green: #34A853;
    
    /* Futuristic Light Theme */
    --bg: #f8f9fa; /* Light background */
    --bg-secondary: rgba(248, 249, 250, 0.7);
    --white: #ffffff;
    --surface: rgba(255, 255, 255, 0.7); /* Translucent for glassmorphism */
    --border: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(66, 133, 244, 0.15);
    
    --text: #202124;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    
    --alex-bg: #e8f0fe;
    --alex-border: #d2e3fc;
    --user-bg: #1a73e8;
    --user-text: #ffffff;
    
    --radius: 20px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1), 0 0 40px rgba(66, 133, 244, 0.05);
}

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

body {
    font-family: 'Space Grotesk', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

/* ======================== */
/*     PAGE TRANSITIONS     */
/* ======================== */

.page {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.page-enter {
    opacity: 0;
    transform: scale(0.97);
}

.page-enter-active {
    opacity: 1;
    transform: scale(1);
}

.page-exit {
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
}

/* ======================== */
/*     LANDING PAGE         */
/* ======================== */

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: transparent;
    padding: 24px;
    position: relative;
    z-index: 10;
}

.landing-card {
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 48px;
    max-width: 540px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.landing-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.landing-badge {
    display: inline-block;
    background: rgba(66, 133, 244, 0.15);
    color: #8ab4f8;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    border: 1px solid rgba(66, 133, 244, 0.3);
    box-shadow: 0 0 16px rgba(66, 133, 244, 0.2);
}

.landing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.landing-logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--google-blue);
    letter-spacing: -0.5px;
}

.landing-title {
    font-family: 'Outfit', sans-serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.landing-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--google-blue);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.landing-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.landing-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 16px;
}

/* Email input */
.email-input-group {
    margin-bottom: 16px;
}

.email-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
}

.email-input:focus {
    border-color: var(--google-blue);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

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

.join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(90deg, var(--google-blue), #8ab4f8);
    color: white;
    border: none;
    border-radius: 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.4);
    position: relative;
    overflow: hidden;
}

.join-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.join-btn:hover::before {
    left: 150%;
}

.join-btn:hover {
    box-shadow: 0 6px 24px rgba(66, 133, 244, 0.6);
    transform: translateY(-2px);
}

.join-btn:active {
    transform: translateY(0);
}

.landing-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

.landing-footer {
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ======================== */
/*     INVITATION PAGE      */
/* ======================== */

.invitation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: transparent;
    padding: 24px;
    position: relative;
    z-index: 10;
}

.invitation-card {
    max-width: 560px;
}

.invitation-badge {
    background: rgba(251, 188, 4, 0.15);
    color: var(--google-yellow);
    border: 1px solid rgba(251, 188, 4, 0.3);
    box-shadow: 0 0 16px rgba(251, 188, 4, 0.2);
}

.invitation-loading {
    padding: 40px 0;
    text-align: center;
}

.invitation-loading p {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Google-colored multi-segment spinner */
.google-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto;
}

.google-spinner-svg {
    width: 100%;
    height: 100%;
    animation: googleSpinRotate 1.4s linear infinite;
}

.google-spinner-circle {
    stroke-linecap: round;
}

.google-spinner-blue { stroke: var(--google-blue); }
.google-spinner-red { stroke: var(--google-red); }
.google-spinner-yellow { stroke: var(--google-yellow); }
.google-spinner-green { stroke: var(--google-green); }

@keyframes googleSpinRotate {
    to { transform: rotate(360deg); }
}

/* Shimmer skeleton for invitation image placeholder */
.invitation-shimmer {
    width: 100%;
    max-width: 400px;
    height: 220px;
    margin: 20px auto 0;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Invitation result fade-up entrance */
.invitation-result-hidden {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.invitation-result-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy spinner (kept for compatibility but unused now) */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid var(--border);
    border-top-color: var(--google-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.invitation-image {
    max-width: 100%;
    max-height: 320px;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.invitation-sent {
    font-size: 14px;
    color: var(--google-blue);
    font-weight: 500;
    margin-bottom: 24px;
}

.concierge-btn {
    background: linear-gradient(90deg, var(--google-yellow), #fdd835);
    box-shadow: 0 4px 16px rgba(251, 188, 4, 0.4);
    color: #333;
}

.concierge-btn:hover {
    box-shadow: 0 6px 24px rgba(251, 188, 4, 0.6);
}

/* ======================== */
/*     SESSION PAGE         */
/* ======================== */

.session {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: transparent;
    position: relative;
    z-index: 10;
}

/* Animated SVG wave background */
.session-bg-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 0;
    pointer-events: none;
}

.wave {
    fill-opacity: 0.04;
}

.wave1 {
    fill: var(--google-blue);
    animation: waveFloat 6s ease-in-out infinite;
}

.wave2 {
    fill: var(--google-green);
    animation: waveFloat 8s ease-in-out infinite reverse;
}

.wave3 {
    fill: var(--google-yellow);
    animation: waveFloat 10s ease-in-out infinite;
}

@keyframes waveFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

/* Agent Avatar */
.agent-avatar {
    flex-shrink: 0;
    position: relative;
}

.agent-avatar svg {
    display: block;
}

.agent-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

/* Pulse avatar border when speaking or thinking */
.session-header-left:has(.audio-visualizer.speaking) .agent-avatar.alex-avatar::after,
.agent-avatar.alex-avatar.thinking::after {
    animation: alexAvatarPulse 1.5s ease-in-out infinite;
}

.session-header-left:has(.audio-visualizer.speaking) .agent-avatar.maya-avatar::after,
.agent-avatar.maya-avatar.thinking::after {
    animation: mayaAvatarPulse 1.5s ease-in-out infinite;
}

@keyframes alexAvatarPulse {
    0%, 100% { border-color: rgba(66, 133, 244, 0.3); }
    50% { border-color: rgba(66, 133, 244, 0.8); }
}

@keyframes mayaAvatarPulse {
    0%, 100% { border-color: rgba(251, 188, 4, 0.3); }
    50% { border-color: rgba(251, 188, 4, 0.8); }
}

.session-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    z-index: 20;
    position: relative;
}

.session-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.session-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.session-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ======================== */
/*  STATUS DOT + SONAR RING */
/* ======================== */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background 0.3s;
    position: relative;
}

.status-dot.disconnected { background: var(--google-red); }
.status-dot.connecting { background: var(--google-yellow); animation: pulse 1s infinite; }
.status-dot.connected {
    background: var(--google-green);
    box-shadow: 0 0 6px rgba(52, 168, 83, 0.5);
}

/* Disconnect / End Session button */
.disconnect-btn {
    padding: 10px 22px;
    background: rgba(234, 67, 53, 0.12);
    color: var(--google-red);
    border: 1px solid rgba(234, 67, 53, 0.3);
    border-radius: 24px;
    font-family: 'Outfit', 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.disconnect-btn:hover {
    background: rgba(234, 67, 53, 0.25);
    box-shadow: 0 0 16px rgba(234, 67, 53, 0.2);
    border-color: rgba(234, 67, 53, 0.5);
}

/* Sonar pulse ring when connected */
.status-dot.connected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--google-green);
    transform: translate(-50%, -50%);
    animation: sonarPulse 2s ease-out infinite;
}

@keyframes sonarPulse {
    0% {
        width: 8px;
        height: 8px;
        opacity: 0.7;
    }
    100% {
        width: 28px;
        height: 28px;
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#status-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ======================== */
/*     AUDIO VISUALIZER     */
/* ======================== */

.audio-visualizer {
    display: none;
    align-items: center;
    height: 24px;
}

.audio-visualizer.speaking {
    display: flex;
}

.audio-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.audio-bars .bar {
    display: block;
    width: 3px;
    height: 4px;
    background: var(--google-blue);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.audio-visualizer.speaking .bar {
    animation: barPulse 0.6s ease-in-out infinite alternate;
}

.audio-visualizer.speaking .bar:nth-child(1) { animation-delay: 0s; }
.audio-visualizer.speaking .bar:nth-child(2) { animation-delay: 0.12s; }
.audio-visualizer.speaking .bar:nth-child(3) { animation-delay: 0.24s; }
.audio-visualizer.speaking .bar:nth-child(4) { animation-delay: 0.36s; }
.audio-visualizer.speaking .bar:nth-child(5) { animation-delay: 0.48s; }

@keyframes barPulse {
    0% { height: 4px; }
    100% { height: 20px; }
}

/* ======================== */
/*   TOOL ACTIVITY INDICATOR */
/* ======================== */

.tool-activity {
    padding: 20px 24px;
    background: linear-gradient(135deg, #e8f0fe 0%, #ffffff 50%, #fef7e0 100%);
    border-bottom: 1px solid var(--border);
    animation: slideIn 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Animated progress bar at the top */
.tool-activity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 40%;
    background: linear-gradient(90deg, var(--google-blue), var(--google-green), var(--google-yellow), var(--google-red));
    animation: toolProgress 2s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes toolProgress {
    0% { left: -40%; }
    100% { left: 100%; }
}

.tool-activity-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 800px;
    margin: 0 auto;
}

.tool-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tool-dot {
    width: 10px;
    height: 10px;
    background: var(--google-blue);
    border-radius: 50%;
    animation: toolBounce 1.2s ease-in-out infinite;
}

.tool-dot:nth-child(2) { background: var(--google-red); }
.tool-dot:nth-child(3) { background: var(--google-green); }

.tool-dot:nth-child(1) { animation-delay: 0s; }
.tool-dot:nth-child(2) { animation-delay: 0.2s; }
.tool-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes toolBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.tool-activity-text {
    font-family: 'Google Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.3px;
}

/* ======================== */
/*    TYPING INDICATOR      */
/* ======================== */

.typing-indicator {
    display: flex;
    align-self: flex-start;
    animation: fadeIn 0.2s ease;
}

.typing-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 20px;
    background: var(--alex-bg);
    border: 1px solid var(--alex-border);
    border-radius: var(--radius);
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ======================== */
/*     ITINERARY CARD       */
/* ======================== */

.itinerary-container {
    padding: 16px 24px;
    background: transparent;
    border-bottom: 1px solid var(--border);
    animation: slideIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

/* Confetti particle effect on itinerary reveal */
.itinerary-container::before,
.itinerary-container::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 12px currentColor;
}

.itinerary-container.revealed::before {
    top: 10%;
    left: 15%;
    background: var(--google-blue);
    color: var(--google-blue);
    animation: confettiFloat 2s ease-out forwards;
}

.itinerary-container.revealed::after {
    top: 5%;
    right: 20%;
    background: var(--google-red);
    color: var(--google-red);
    animation: confettiFloat 2s ease-out 0.3s forwards;
}

@keyframes confettiFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-20px) rotate(180deg) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translateY(40px) rotate(360deg) scale(0.5);
    }
}

/* Staggered reveal for each itinerary section */
.itin-reveal {
    opacity: 0;
    transform: translateX(-20px);
    animation: itinSlideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    animation-delay: calc(var(--reveal-order, 0) * 100ms);
}

@keyframes itinSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.itinerary-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    border-top: none;
}

.itinerary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--google-blue) 0%, var(--google-red) 33%, var(--google-yellow) 66%, var(--google-green) 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.itinerary-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.5px;
}

.itinerary-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.itinerary-section:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
}

.itinerary-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    flex-shrink: 0;
    width: 90px;
}

.itinerary-value {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
    flex: 1;
    text-align: right;
}



/* Confirm button with green glow pulse */
.confirm-btn {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 16px 32px;
    background: linear-gradient(90deg, var(--google-green), #66bb6a);
    color: white;
    border: none;
    border-radius: 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 16px rgba(52, 168, 83, 0.4);
    animation: itinSlideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards, greenGlow 2.5s ease-in-out infinite 0.8s;
    animation-delay: calc(var(--reveal-order, 0) * 100ms);
    position: relative;
    overflow: hidden;
}

.confirm-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.confirm-btn:hover::before {
    left: 150%;
}

@keyframes greenGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(52, 168, 83, 0.4);
    }
    50% {
        box-shadow: 0 6px 24px rgba(52, 168, 83, 0.7), 0 0 30px rgba(52, 168, 83, 0.2);
    }
}

.confirm-btn:hover {
    box-shadow: 0 6px 24px rgba(52, 168, 83, 0.6);
    transform: translateY(-2px);
}

.confirm-btn:active {
    transform: translateY(0);
}

/* ======================== */
/*     SLIDE DISPLAY        */
/* ======================== */

.slide-container {
    padding: 20px 24px;
    background: transparent;
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.slide-image {
    max-width: 100%;
    max-height: 280px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    margin: 0 auto 12px;
    background: transparent;
    display: block;
    transition: opacity 0.3s ease;
}

/* Applied via JS on each new slide for re-triggerable animation */
.slide-image.slide-enter {
    animation: slideFadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Slide loading skeleton — shown while Imagen generates */
.slide-skeleton {
    width: 100%;
    max-width: 500px;
    height: 180px;
    margin: 0 auto 12px;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(66,133,244,0.04) 25%, rgba(66,133,244,0.08) 50%, rgba(66,133,244,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: 1px solid var(--border);
}

.slide-topic {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Applied via JS for re-triggerable animation */
.slide-topic.slide-topic-enter {
    animation: slideUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0.1s both;
}

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

/* ======================== */
/*      CHAT MESSAGES       */
/* ======================== */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    position: relative;
    z-index: 5;
}

.message {
    display: flex;
    max-width: 80%;
    animation: fadeIn 0.2s ease;
}

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

.message.user {
    align-self: flex-end;
}

.message.alex {
    align-self: flex-start;
}

.message.system {
    align-self: center;
    max-width: 90%;
}

.bubble {
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
}

.message.user .bubble {
    background: linear-gradient(135deg, var(--google-blue), #8ab4f8);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message.system .bubble {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* Session Footer */
/* ======================== */
/*     IMAGE UPLOAD BAR     */
/* ======================== */

.image-upload-bar {
    padding: 10px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.image-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(66, 133, 244, 0.15);
    color: var(--google-blue);
    border: 1px solid rgba(66, 133, 244, 0.3);
    border-radius: 24px;
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-btn:hover {
    background: rgba(66, 133, 244, 0.25);
    box-shadow: 0 0 16px rgba(66, 133, 244, 0.2);
}

.image-preview-container {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.image-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.image-send-btn {
    padding: 8px 16px;
    background: var(--google-green);
    color: white;
    border: none;
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.image-send-btn:hover {
    background: #2e7d32;
}

.image-cancel-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.image-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.session-footer {
    padding: 10px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--white);
    position: relative;
    z-index: 1;
}

.session-footer p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Responsive */
@media (max-width: 640px) {
    .landing-card { padding: 32px 24px; }
    .landing-title { font-size: 26px; }
    .landing-features { flex-direction: column; align-items: center; }
    .message { max-width: 92%; }
    .session-header { padding: 10px 16px; }
    .chat-messages { padding: 16px; }
    .invitation-image { max-height: 240px; }
    .itinerary-section { flex-direction: column; gap: 4px; }
    .itinerary-label { min-width: auto; }
    .audio-visualizer { margin-left: 8px; }
    .tool-activity { padding: 8px 16px; }
    .slide-image { max-height: 200px; }
    .slide-skeleton { height: 140px; }
    .slide-container { padding: 12px 16px; }
}

/* Particles and Glow Background for Dark Theme */
.glow-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(66, 133, 244, 0.15), transparent 40%),
                radial-gradient(circle at 85% 30%, rgba(234, 67, 53, 0.1), transparent 40%),
                radial-gradient(circle at 50% 80%, rgba(52, 168, 83, 0.08), transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.particles {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.3);
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.1);
    pointer-events: none;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.4; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
