/* ═══════════════════════════════════════════
   Sunfare Discovery Chatbot — Styles
   EzeMind AI | Sunfare Farming Branding
   ═══════════════════════════════════════════ */

:root {
    --sf-green-dark: #2d5016;
    --sf-green: #4a7c2e;
    --sf-green-light: #6ba340;
    --sf-green-muted: #3a6623;
    --sf-gold: #d4a843;
    --sf-gold-light: #e8c56d;
    --sf-gold-dark: #b8922e;
    --sf-bg-dark: #0a0e14;
    --sf-bg-card: #131c28;
    --sf-bg-card-light: #182333;
    --sf-text: #e0e0e0;
    --sf-text-light: #8b949e;
    --sf-text-muted: #6b7280;
    --sf-bot-bubble: #162016;
    --sf-bot-bubble-border: rgba(74, 124, 46, 0.35);
    --sf-user-bubble: #4a7c2e;
    --sf-user-bubble-hover: #3a6623;
    --sf-border: rgba(74, 124, 46, 0.15);
    --sf-shadow: rgba(0, 0, 0, 0.5);
    --sf-radius: 20px;
    --sf-radius-sm: 12px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--sf-bg-dark);
    color: var(--sf-text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

/* ═══════════════════════════════════════════
   PHOTO SLIDESHOW BACKGROUND (desktop only)
   ═══════════════════════════════════════════ */

.bg-slideshow {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.bg-slideshow .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    filter: blur(3px) saturate(0.3) brightness(0.45);
}

/* Each slide gets its own keyframes — no delay needed, works every cycle */
.slide-1 { animation: slide1 56s linear infinite; }
.slide-2 { animation: slide2 56s linear infinite; }
.slide-3 { animation: slide3 56s linear infinite; }
.slide-4 { animation: slide4 56s linear infinite; }
.slide-5 { animation: slide5 56s linear infinite; }
.slide-6 { animation: slide6 56s linear infinite; }
.slide-7 { animation: slide7 56s linear infinite; }

/* 7 slides, each visible for ~14% of cycle with 2% fade in/out */
@keyframes slide1 {
    0%    { opacity: 0; transform: scale(1.06); }
    2%    { opacity: 1; transform: scale(1.04); }
    12%   { opacity: 1; transform: scale(1.0); }
    14%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}
@keyframes slide2 {
    0%    { opacity: 0; }
    14%   { opacity: 0; transform: scale(1.06); }
    16%   { opacity: 1; transform: scale(1.04); }
    26%   { opacity: 1; transform: scale(1.0); }
    28%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}
@keyframes slide3 {
    0%    { opacity: 0; }
    28%   { opacity: 0; transform: scale(1.06); }
    30%   { opacity: 1; transform: scale(1.04); }
    40%   { opacity: 1; transform: scale(1.0); }
    42%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}
@keyframes slide4 {
    0%    { opacity: 0; }
    42%   { opacity: 0; transform: scale(1.06); }
    44%   { opacity: 1; transform: scale(1.04); }
    54%   { opacity: 1; transform: scale(1.0); }
    56%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}
@keyframes slide5 {
    0%    { opacity: 0; }
    56%   { opacity: 0; transform: scale(1.06); }
    58%   { opacity: 1; transform: scale(1.04); }
    68%   { opacity: 1; transform: scale(1.0); }
    70%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}
@keyframes slide6 {
    0%    { opacity: 0; }
    70%   { opacity: 0; transform: scale(1.06); }
    72%   { opacity: 1; transform: scale(1.04); }
    82%   { opacity: 1; transform: scale(1.0); }
    84%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}
@keyframes slide7 {
    0%    { opacity: 0; }
    84%   { opacity: 0; transform: scale(1.06); }
    86%   { opacity: 1; transform: scale(1.04); }
    96%   { opacity: 1; transform: scale(1.0); }
    98%   { opacity: 0; transform: scale(1.0); }
    100%  { opacity: 0; }
}

/* Dark tinted overlay on top of photos to maintain mood */
.slide-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(10, 14, 20, 0.2) 0%, rgba(10, 14, 20, 0.55) 100%),
        linear-gradient(180deg, rgba(10, 14, 20, 0.3) 0%, transparent 30%, transparent 70%, rgba(10, 14, 20, 0.4) 100%);
    z-index: 1;
}

/* ═══════════════════════════════════════════
   ANIMATED BACKGROUND
   ═══════════════════════════════════════════ */

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(45, 80, 22, 0.3) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(212, 168, 67, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 85%, rgba(74, 124, 46, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(45, 80, 22, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #060a10 0%, #0a0e14 30%, #0d1218 70%, #060a10 100%);
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { filter: brightness(1) saturate(1); }
    33% { filter: brightness(1.1) saturate(1.15); }
    66% { filter: brightness(0.95) saturate(1.05); }
    100% { filter: brightness(1.05) saturate(1.1); }
}

/* Subtle grid / mesh pattern */
.bg-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(74, 124, 46, 0.06) 1px, transparent 0);
    background-size: 40px 40px;
    animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* Noise texture overlay */
.bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* ═══════════════════════════════════════════
   FLOATING PARTICLES
   ═══════════════════════════════════════════ */

.particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

/* Green particles - small */
.particle-1 {
    width: 4px; height: 4px;
    background: radial-gradient(circle, rgba(107, 163, 64, 0.8), transparent);
    box-shadow: 0 0 6px rgba(107, 163, 64, 0.4);
    left: 10%; animation-duration: 18s; animation-delay: 0s;
}
.particle-2 {
    width: 3px; height: 3px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.8), transparent);
    box-shadow: 0 0 6px rgba(212, 168, 67, 0.3);
    left: 25%; animation-duration: 22s; animation-delay: 2s;
}
.particle-3 {
    width: 5px; height: 5px;
    background: radial-gradient(circle, rgba(74, 124, 46, 0.7), transparent);
    box-shadow: 0 0 10px rgba(74, 124, 46, 0.3);
    left: 45%; animation-duration: 20s; animation-delay: 4s;
}
.particle-4 {
    width: 3px; height: 3px;
    background: radial-gradient(circle, rgba(232, 197, 109, 0.7), transparent);
    box-shadow: 0 0 5px rgba(232, 197, 109, 0.3);
    left: 60%; animation-duration: 25s; animation-delay: 1s;
}
.particle-5 {
    width: 4px; height: 4px;
    background: radial-gradient(circle, rgba(107, 163, 64, 0.6), transparent);
    box-shadow: 0 0 8px rgba(107, 163, 64, 0.3);
    left: 75%; animation-duration: 19s; animation-delay: 3s;
}
.particle-6 {
    width: 3px; height: 3px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.6), transparent);
    box-shadow: 0 0 5px rgba(212, 168, 67, 0.3);
    left: 90%; animation-duration: 23s; animation-delay: 5s;
}
/* Additional particles for density */
.particle-7 {
    width: 2px; height: 2px;
    background: rgba(107, 163, 64, 0.5);
    box-shadow: 0 0 4px rgba(107, 163, 64, 0.3);
    left: 15%; animation-duration: 26s; animation-delay: 7s;
}
.particle-8 {
    width: 6px; height: 6px;
    background: radial-gradient(circle, rgba(74, 124, 46, 0.4), transparent);
    box-shadow: 0 0 12px rgba(74, 124, 46, 0.2);
    left: 35%; animation-duration: 28s; animation-delay: 6s;
}
.particle-9 {
    width: 2px; height: 2px;
    background: rgba(232, 197, 109, 0.5);
    box-shadow: 0 0 4px rgba(232, 197, 109, 0.3);
    left: 55%; animation-duration: 21s; animation-delay: 8s;
}
.particle-10 {
    width: 4px; height: 4px;
    background: radial-gradient(circle, rgba(107, 163, 64, 0.5), transparent);
    box-shadow: 0 0 8px rgba(107, 163, 64, 0.3);
    left: 80%; animation-duration: 24s; animation-delay: 9s;
}
.particle-11 {
    width: 3px; height: 3px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.5), transparent);
    box-shadow: 0 0 6px rgba(212, 168, 67, 0.2);
    left: 5%; animation-duration: 27s; animation-delay: 10s;
}
.particle-12 {
    width: 5px; height: 5px;
    background: radial-gradient(circle, rgba(74, 124, 46, 0.5), transparent);
    box-shadow: 0 0 10px rgba(74, 124, 46, 0.2);
    left: 68%; animation-duration: 30s; animation-delay: 11s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(110vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translateY(90vh) translateX(10px) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(50vh) translateX(-20px) scale(1.2);
    }
    90% {
        opacity: 0.6;
        transform: translateY(10vh) translateX(15px) scale(0.8);
    }
    100% {
        transform: translateY(-10vh) translateX(0) scale(0);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════
   GLOWING ORBS
   ═══════════════════════════════════════════ */

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

.orb-green {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(74, 124, 46, 0.35), transparent 70%);
    top: -100px;
    left: -100px;
    animation: orbFloat1 16s ease-in-out infinite alternate;
}

.orb-gold {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.2), transparent 70%);
    bottom: -80px;
    right: -80px;
    animation: orbFloat2 20s ease-in-out infinite alternate;
}

.orb-green-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(107, 163, 64, 0.2), transparent 70%);
    top: 50%;
    right: 15%;
    animation: orbFloat3 14s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.15); }
    66% { transform: translate(40px, 120px) scale(0.9); }
    100% { transform: translate(100px, 40px) scale(1.1); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, -80px) scale(1.2); }
    100% { transform: translate(-30px, -40px) scale(0.95); }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(-40px, 30px) scale(1.3); opacity: 0.5; }
    100% { transform: translate(20px, -20px) scale(0.9); opacity: 0.25; }
}

/* ═══════════════════════════════════════════
   LIGHT RAYS
   ═══════════════════════════════════════════ */

.light-rays {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ray {
    position: absolute;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(212, 168, 67, 0.08), rgba(74, 124, 46, 0.06), transparent);
    transform-origin: top center;
}

.ray-1 {
    height: 120%;
    left: 20%;
    top: -10%;
    transform: rotate(-15deg);
    animation: rayPulse 8s ease-in-out infinite;
    animation-delay: 0s;
}

.ray-2 {
    height: 130%;
    left: 55%;
    top: -15%;
    transform: rotate(5deg);
    animation: rayPulse 10s ease-in-out infinite;
    animation-delay: 3s;
}

.ray-3 {
    height: 110%;
    right: 15%;
    top: -5%;
    transform: rotate(12deg);
    animation: rayPulse 12s ease-in-out infinite;
    animation-delay: 6s;
}

@keyframes rayPulse {
    0%, 100% { opacity: 0; width: 1px; }
    50% { opacity: 1; width: 3px; }
}

/* ═══════════════════════════════════════════
   SUNFARE LOGO DISPLAY
   ═══════════════════════════════════════════ */

.logo-display {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: logoFadeIn 1s ease-out 0.3s both;
}

.logo-img {
    width: 320px;
    height: auto;
    /* Remove white background by blending — whites become transparent on dark bg */
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 20px rgba(74, 124, 46, 0.3)) drop-shadow(0 0 40px rgba(212, 168, 67, 0.15)) brightness(1.1) contrast(1.05);
    animation: logoGlow 4s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 15px rgba(74, 124, 46, 0.25)) drop-shadow(0 0 30px rgba(212, 168, 67, 0.1)) brightness(1.1) contrast(1.05); }
    100% { filter: drop-shadow(0 0 25px rgba(74, 124, 46, 0.4)) drop-shadow(0 0 50px rgba(212, 168, 67, 0.2)) brightness(1.15) contrast(1.1); }
}

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

/* ─── Powered By (below chat) ─── */
.powered-by {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    z-index: 5;
    font-size: 11px;
    color: var(--sf-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    animation: poweredBySlideUp 0.8s ease-out 1.5s both;
}

.powered-by strong {
    color: var(--sf-green-light);
}

@keyframes poweredBySlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(40px);
    }
    to {
        opacity: 0.6;
        transform: translateX(-50%) translateY(0);
    }
}

.powered-by:hover {
    opacity: 1;
    transition: opacity 0.3s;
}

/* ═══════════════════════════════════════════
   CHAT CONTAINER
   ═══════════════════════════════════════════ */

.chat-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    height: 78vh;
    max-height: 720px;
    margin-top: 70px;
    display: flex;
    flex-direction: column;
    background: rgba(19, 28, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--sf-radius);
    border: 1px solid var(--sf-border);
    box-shadow:
        0 0 0 1px rgba(74, 124, 46, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(74, 124, 46, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
    animation: containerSlideUp 0.7s ease-out 0.5s both;
}

@keyframes containerSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glow border animation */
.chat-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--sf-radius);
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(74, 124, 46, 0.3),
        transparent 40%,
        transparent 60%,
        rgba(212, 168, 67, 0.2)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
    animation: borderGlow 6s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ─── Chat Header ─── */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.6) 0%, rgba(58, 102, 35, 0.4) 100%);
    border-bottom: 1px solid rgba(74, 124, 46, 0.2);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

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

.header-avatar {
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(74, 124, 46, 0.15);
}

.header-info h1 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 12px rgba(74, 222, 128, 0.3); }
}

/* ─── Progress Dots ─── */
.progress-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.progress-dot.active {
    background: var(--sf-gold);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.6), 0 0 20px rgba(212, 168, 67, 0.2);
    transform: scale(1.2);
}

.progress-dot.completed {
    background: var(--sf-green-light);
    box-shadow: 0 0 8px rgba(107, 163, 64, 0.5);
}

/* ─── Progress Bar ─── */
.progress-bar-container {
    position: relative;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sf-green) 0%, var(--sf-green-light) 50%, var(--sf-gold) 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(107, 163, 64, 0.4);
    position: relative;
}

/* Shimmer effect on progress bar */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

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

.progress-label {
    position: absolute;
    right: 10px;
    top: 6px;
    font-size: 10px;
    color: var(--sf-text-muted);
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-bar-container:hover .progress-label {
    opacity: 1;
}

/* ─── Chat Messages Area ─── */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(74, 124, 46, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 124, 46, 0.35);
}

/* ─── Message Bubbles ─── */
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: messageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

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

.message-bubble {
    padding: 11px 15px;
    border-radius: var(--sf-radius-sm);
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.message.bot .message-bubble {
    background: var(--sf-bot-bubble);
    border: 1px solid var(--sf-bot-bubble-border);
    color: var(--sf-text);
    border-bottom-left-radius: 4px;
}

.message.bot .message-bubble:hover {
    box-shadow: 0 0 15px rgba(74, 124, 46, 0.1);
}

.message.user .message-bubble {
    background: linear-gradient(135deg, var(--sf-user-bubble) 0%, #3d6b24 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(74, 124, 46, 0.2);
}

.message-time {
    font-size: 10px;
    color: var(--sf-text-muted);
    margin-top: 3px;
    padding: 0 4px;
}

.message.user .message-time {
    text-align: right;
}

/* Bot label */
.message.bot .message-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sf-green-light);
    margin-bottom: 3px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bot-icon {
    display: inline-block;
    font-size: 12px;
}

/* ─── Typing Indicator ─── */
.typing-indicator {
    padding: 4px 16px 12px;
    flex-shrink: 0;
}

.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--sf-bot-bubble);
    border: 1px solid var(--sf-bot-bubble-border);
    padding: 12px 18px;
    border-radius: var(--sf-radius-sm);
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--sf-green-light);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(107, 163, 64, 0.4);
}

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

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

/* ─── Summary Panel ─── */
.summary-panel {
    padding: 16px;
    border-top: 1px solid var(--sf-border);
    background: var(--sf-bg-card-light);
    flex-shrink: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.summary-header h2 {
    font-size: 16px;
    color: var(--sf-gold);
    margin-bottom: 4px;
}

.summary-header p {
    font-size: 12px;
    color: var(--sf-text-muted);
    margin-bottom: 12px;
}

.summary-content {
    background: var(--sf-bg-dark);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-sm);
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--sf-text);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.summary-content.visible {
    display: block;
}

.summary-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sf-gold) 0%, var(--sf-gold-dark) 100%);
    color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(212, 168, 67, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--sf-gold-light) 0%, var(--sf-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--sf-green-light);
    border: 1px solid rgba(74, 124, 46, 0.4);
}

.btn-outline:hover {
    background: rgba(74, 124, 46, 0.15);
    border-color: var(--sf-green-light);
    transform: translateY(-2px);
}

/* ─── Input Area ─── */
.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid rgba(74, 124, 46, 0.1);
    background: rgba(24, 35, 51, 0.8);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10, 14, 20, 0.7);
    border: 1px solid rgba(74, 124, 46, 0.15);
    border-radius: 25px;
    padding: 4px 4px 4px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:focus-within {
    border-color: rgba(74, 124, 46, 0.5);
    box-shadow: 0 0 0 3px rgba(74, 124, 46, 0.1), 0 0 20px rgba(74, 124, 46, 0.08);
}

#chatInput {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--sf-text);
    font-size: 14px;
    font-family: inherit;
    padding: 8px 0;
}

#chatInput::placeholder {
    color: var(--sf-text-muted);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sf-gold) 0%, var(--sf-gold-dark) 100%);
    color: #1a1a1a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(212, 168, 67, 0.2);
}

.send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--sf-gold-light) 0%, var(--sf-gold) 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.35);
}

.send-btn:disabled {
    background: rgba(45, 55, 72, 0.5);
    color: var(--sf-text-muted);
    cursor: not-allowed;
    opacity: 0.4;
    box-shadow: none;
}

.send-btn:active:not(:disabled) {
    transform: scale(0.93);
}

/* ─── Attach Button ─── */
.attach-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--sf-text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.attach-btn:hover {
    color: var(--sf-green-light);
    background: rgba(74, 124, 46, 0.15);
}

/* ─── Upload Hint ─── */
.upload-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--sf-text-muted);
    padding: 4px 18px 0;
    opacity: 0.6;
}

/* ─── Drop Zone ─── */
.drop-zone {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(10, 14, 20, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--sf-green);
    border-radius: var(--sf-radius);
    animation: dropZoneFadeIn 0.2s ease-out;
}

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

.drop-zone-content {
    text-align: center;
    color: var(--sf-green-light);
}

.drop-zone-content p {
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.drop-zone-content span {
    font-size: 12px;
    color: var(--sf-text-muted);
}

/* ─── Uploaded Files Panel ─── */
.uploaded-files {
    border-top: 1px solid var(--sf-border);
    background: var(--sf-bg-card-light);
    padding: 8px 16px;
    max-height: 120px;
    overflow-y: auto;
    flex-shrink: 0;
}

.uploaded-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--sf-green-light);
    margin-bottom: 6px;
}

.close-uploads-btn {
    background: none;
    border: none;
    color: var(--sf-text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
}

.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: rgba(74, 124, 46, 0.1);
    border: 1px solid rgba(74, 124, 46, 0.2);
    border-radius: 8px;
    font-size: 12px;
    color: var(--sf-text);
    animation: messageIn 0.3s ease-out;
}

.uploaded-file-item .file-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.uploaded-file-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploaded-file-item .file-size {
    font-size: 10px;
    color: var(--sf-text-muted);
    flex-shrink: 0;
}

.uploaded-file-item .file-status {
    font-size: 10px;
    color: var(--sf-green-light);
    flex-shrink: 0;
}

.uploaded-file-item .file-status.uploading {
    color: var(--sf-gold);
}

.uploaded-file-item .file-status.error {
    color: #f87171;
}

/* ─── Chat Footer ─── */
.chat-footer {
    padding: 10px 16px;
    text-align: center;
    font-size: 11px;
    color: var(--sf-text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    line-height: 1.5;
}

.chat-footer span {
    color: var(--sf-green-light);
    font-weight: 600;
}

.chat-footer a {
    color: var(--sf-gold);
    text-decoration: none;
    transition: color 0.2s;
}

.chat-footer a:hover {
    color: var(--sf-gold-light);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 520px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }

    body {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .logo-display {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        padding: 10px 0 6px;
        z-index: 10;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .logo-img {
        width: 180px;
        display: block;
    }

    .powered-by {
        font-size: 9px;
        bottom: 4px;
        letter-spacing: 1px;
    }

    .chat-container {
        max-width: 100%;
        width: 100%;
        flex: 1;
        height: auto;
        max-height: none;
        margin-top: 0;
        border-radius: var(--sf-radius) var(--sf-radius) 0 0;
        border: none;
        border-top: 1px solid var(--sf-border);
    }

    .chat-container::before {
        display: none;
    }

    .chat-header {
        padding: 10px 14px;
    }

    .header-info h1 {
        font-size: 13px;
    }

    .message {
        max-width: 90%;
    }

    .message-bubble {
        font-size: 13px;
        padding: 9px 12px;
    }

    .chat-footer {
        padding: 8px 12px;
        font-size: 10px;
    }

    .orb { display: none; }
    .light-rays { display: none; }
    .bg-slideshow { display: none; }

    /* Keep some particles but fewer */
    .particle-7, .particle-8, .particle-9,
    .particle-10, .particle-11, .particle-12 {
        display: none;
    }
}

@media (max-height: 700px) {
    .logo-display {
        top: 6px;
    }

    .logo-img {
        width: 180px;
    }

    .chat-container {
        margin-top: 48px;
        height: calc(100vh - 58px);
        max-height: none;
    }

    .powered-by {
        display: none;
    }
}

@media (max-height: 400px) {
    .logo-display {
        display: none;
    }

    .chat-container {
        margin-top: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        flex: none;
    }
}

/* ─── Quick Reply Buttons ─── */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    animation: messageIn 0.35s ease-out;
}

.quick-reply-btn {
    padding: 6px 14px;
    border-radius: 20px;
    background: transparent;
    color: var(--sf-green-light);
    border: 1px solid rgba(74, 124, 46, 0.3);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
}

.quick-reply-btn:hover {
    background: rgba(74, 124, 46, 0.2);
    border-color: var(--sf-green-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 124, 46, 0.15);
}

/* ─── Error State ─── */
.error-message {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--sf-radius-sm);
    font-size: 13px;
    margin: 8px 16px;
    animation: messageIn 0.3s ease-out;
}

.error-message button {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.25);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 6px;
    font-family: inherit;
    transition: background 0.2s;
}

.error-message button:hover {
    background: rgba(220, 38, 38, 0.25);
}
