/* ══════════════════════════════════════════
   LINKDB — LANDING PAGE STYLES
   Premium Dark SaaS Design
══════════════════════════════════════════ */

:root {
    --bg:       #07071a;
    --bg2:      #0d0d2b;
    --surface:  rgba(255,255,255,0.04);
    --border:   rgba(255,255,255,0.08);
    --accent:   #8b5cf6;
    --accent2:  #3b82f6;
    --pink:     #ec4899;
    --green:    #10b981;
    --text:     #f1f5f9;
    --muted:    #64748b;
    --glow:     rgba(139,92,246,0.45);
    --glow2:    rgba(59,130,246,0.3);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 10px; }

/* ── Background mesh ───────────────────── */
.bg-mesh {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(139,92,246,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 80%, rgba(59,130,246,0.15) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 60% 30%, rgba(236,72,153,0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* ══════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════ */
header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0 5%;
    height: 72px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(7,7,26,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
    background: rgba(7,7,26,0.95);
}

.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text);
}

.nav-logo .logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
    box-shadow: 0 0 20px var(--glow);
}

.nav-logo span {
    font-size: 22px; font-weight: 800;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

nav { display: flex; align-items: center; gap: 32px; }

nav a {
    text-decoration: none; color: var(--muted);
    font-size: 14px; font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn { display:inline-flex; align-items:center; gap:8px; text-decoration:none;
    padding: 9px 20px; border-radius: 10px; font-family:'Outfit',sans-serif;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.25s;
    border: none;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover { background: var(--surface); border-color: rgba(255,255,255,0.2); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6d28d9);
    color: #fff;
    box-shadow: 0 4px 20px var(--glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow);
}

.btn-xl {
    padding: 15px 32px; font-size: 16px; border-radius: 14px;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(139,92,246,0.5);
    color: var(--accent);
}
.btn-outline:hover { background: rgba(139,92,246,0.1); border-color: var(--accent); }

/* ══════════════════════════════════════════
   SECTIONS COMMON
══════════════════════════════════════════ */
section { position: relative; z-index: 1; }

.container {
    max-width: 1200px; margin: 0 auto; padding: 0 5%;
}

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 20px; padding: 5px 14px;
    font-size: 12px; font-weight: 600;
    color: var(--accent); letter-spacing: 1px; text-transform: uppercase;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 16px;
}

.section-sub {
    font-size: 17px; color: var(--muted); max-width: 580px;
    line-height: 1.7;
}

.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }
.gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
#hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding: 120px 5% 80px;
}

.hero-inner {
    max-width: 1200px; margin: 0 auto; width: 100%;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3);
    border-radius: 20px; padding: 5px 14px; font-size: 12px;
    color: var(--green); font-weight: 600; letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.hero-badge span { width:8px;height:8px;border-radius:50%;background:var(--green);
    animation: pulse-dot 1.5s ease-in-out infinite; display:inline-block; }

@keyframes pulse-dot {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:0.5; transform:scale(1.4); }
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900; line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .line2 {
    background: linear-gradient(135deg, var(--accent), var(--accent2), var(--pink));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 18px; color: var(--muted); line-height: 1.7;
    margin-bottom: 38px; max-width: 500px;
}

.hero-actions { display:flex; gap:14px; flex-wrap:wrap; align-items:center; margin-bottom: 48px; }

.hero-trust {
    display: flex; gap: 24px; align-items: center;
    padding-top: 24px; border-top: 1px solid var(--border);
}

.trust-item { display:flex; flex-direction:column; gap:3px; }
.trust-num  { font-size: 22px; font-weight: 800; color: var(--text); }
.trust-lbl  { font-size: 12px; color: var(--muted); letter-spacing:0.5px; }
.trust-divider { width:1px; height:38px; background:var(--border); }

/* ── Hero Visual ── */
.hero-visual {
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.hero-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    width: 100%; max-width: 460px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(139,92,246,0.1);
    position: relative;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

.hero-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}

.hc-title { font-size: 14px; font-weight: 700; }
.hc-badge {
    background: rgba(16,185,129,0.15); color: var(--green);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600;
}

.dr-bars { display:flex; flex-direction:column; gap:10px; }

.dr-bar-item { display:flex; align-items:center; gap:12px; }
.dr-bar-label { font-size: 12px; color: var(--muted); width: 90px; flex-shrink:0; }
.dr-bar-track { flex:1; height:8px; background:rgba(255,255,255,0.06); border-radius:99px; overflow:hidden; }
.dr-bar-fill  { height:100%; border-radius:99px; transition: width 1.5s cubic-bezier(0.4,0,0.2,1); width:0; }
.dr-bar-fill.w100 { background: linear-gradient(to right, var(--accent), var(--accent2)); }
.dr-bar-fill.w95  { background: linear-gradient(to right, var(--accent2), #06b6d4); }
.dr-bar-fill.w93  { background: linear-gradient(to right, var(--green), #06b6d4); }
.dr-bar-fill.w90  { background: linear-gradient(to right, var(--green), var(--accent2)); }
.dr-bar-fill.w88  { background: linear-gradient(to right, #f59e0b, var(--green)); }
.dr-bar-num  { font-size: 12px; font-weight: 700; color: var(--text); width:28px; text-align:right; flex-shrink:0; }

.hero-float-badge {
    position: absolute;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600;
    animation: floatBadge 4s ease-in-out infinite;
}

.hero-float-badge.f1 { top: -20px; right: -20px; animation-delay: 0s; }
.hero-float-badge.f2 { bottom: 10px; left: -30px; animation-delay: -2s; }

@keyframes floatBadge {
    0%,100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-8px) rotate(1deg); }
}

.fbadge-icon { font-size: 20px; }

/* ══════════════════════════════════════════
   STATS TICKER
══════════════════════════════════════════ */
#stats-bar {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.stats-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 5%;
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item { text-align:center; }
.stat-num {
    font-size: 2.4rem; font-weight: 900;
    background: linear-gradient(to right, var(--text), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ══════════════════════════════════════════
   REAL-TIME ANALYTICS WIDGET
══════════════════════════════════════════ */
#realtime { padding: 80px 0; }

.rt-dashboard {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ── Left panel ── */
.rt-left {
    padding: 28px 28px 16px;
    border-right: 1px solid var(--border);
}

/* Metric row */
.rt-metrics {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.rt-metric { padding: 4px 16px 4px 0; }
.rt-metric:not(:last-child) { border-right: 1px solid var(--border); margin-right: 16px; }

.rt-metric-label {
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rt-metric-value {
    font-size: 1.8rem; font-weight: 800;
    color: var(--text); line-height: 1.1;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.rt-metric-delta {
    font-size: 12px; font-weight: 700;
}
.rt-metric-delta.positive { color: var(--green); }
.rt-metric-delta.negative { color: #ef4444; }

/* Chart area */
.rt-chart-wrap { width: 100%; }

.rt-chart-legend {
    display: flex; gap: 20px; margin-bottom: 12px;
}

.legend-item {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; color: var(--muted);
}

.legend-line {
    display: inline-block; width: 24px; height: 2px; border-radius: 2px;
}
.solid-line  { background: #4285f4; }
.dashed-line { background: repeating-linear-gradient(to right, #94a3b8 0, #94a3b8 4px, transparent 4px, transparent 8px); }

.rt-x-labels {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--muted);
    padding: 6px 6px 0;
}

/* ── Right panel ── */
.rt-right {
    background: rgba(255,255,255,0.02);
    padding: 24px 20px;
    display: flex; flex-direction: column; gap: 4px;
}

.rt-realtime-header {
    font-size: 10px; font-weight: 700;
    color: var(--muted); letter-spacing: 1px;
    text-transform: uppercase; margin-bottom: 4px;
}

.rt-live-count {
    font-size: 2.8rem; font-weight: 900;
    color: var(--text); line-height: 1;
    margin-bottom: 4px;
    transition: all 0.4s ease;
}

/* Per-minute bars */
.rt-bars {
    display: flex; align-items: flex-end; gap: 2px;
    height: 44px; margin-bottom: 8px;
}

.rt-bar {
    flex: 1; border-radius: 2px 2px 0 0;
    background: #4285f4;
    opacity: 0.85;
    transition: height 0.5s cubic-bezier(0.4,0,0.2,1);
    min-height: 4px;
}

.rt-bar.newest { background: #8b5cf6; opacity: 1; }

/* Countries */
.rt-countries-header {
    display: flex; justify-content: space-between;
    font-size: 10px; font-weight: 700;
    color: var(--muted); letter-spacing: 0.8px;
    text-transform: uppercase;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 4px; margin-bottom: 8px;
}

.rt-country-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 8px;
}

.rt-country-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rt-country-info > span { font-size: 12px; color: var(--text); }

.rt-country-bar {
    height: 3px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden;
}

.rt-country-fill {
    height: 100%; border-radius: 99px;
    transition: width 0.8s ease;
}

.rt-country-num {
    font-size: 12px; font-weight: 700; color: var(--text);
    width: 28px; text-align: right; flex-shrink: 0;
    transition: all 0.4s ease;
}

/* Live dot */
.rt-live-dot-row {
    display: flex; align-items: center; gap: 8px;
    margin-top: auto; padding-top: 12px;
    border-top: 1px solid var(--border);
}

.rt-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
    animation: live-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes live-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
    100%{ box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* Responsive */
@media (max-width: 900px) {
    .rt-dashboard { grid-template-columns: 1fr; }
    .rt-left { border-right: none; border-bottom: 1px solid var(--border); }
    .rt-metrics { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
    .rt-metrics { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════
   COMMUNITY — TESTIMONIAL CARDS
══════════════════════════════════════════ */
#community { padding: 80px 0; }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.testi-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.3s;
    position: relative; overflow: hidden;
}

.testi-card::before {
    content:''; position:absolute; top:0; left:0; right:0; height:2px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity 0.3s;
}

.testi-card:hover {
    border-color: rgba(139,92,246,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}

.testi-card:hover::before { opacity: 1; }

.testi-top {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
}

.testi-avatar {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}

.testi-name { font-size: 14px; font-weight: 700; color: var(--text); }
.testi-role { font-size: 12px; color: var(--muted); margin-top: 2px; }

.testi-stars {
    margin-left: auto; font-size: 13px;
    color: #f59e0b; letter-spacing: 1px;
}

.testi-text {
    font-size: 14px; color: rgba(241,245,249,0.8);
    line-height: 1.65; font-style: italic;
}

@media (max-width: 900px) {
    .testimonials-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .testimonials-grid { grid-template-columns: 1fr; }
}

/* ===========================================
   FLOATING CHAT - MONOPOLYGO STYLE
=========================================== */
.float-chat-wrap {
    position: fixed;
    bottom: 24px; left: 24px;
    z-index: 9999;
    display: flex; flex-direction: column;
    align-items: flex-start; gap: 14px;
}
.float-chat-btn {
    width: 60px; height: 60px; border-radius: 50%;
    background: #ef4444;
    border: none; color: #fff; font-size: 24px;
    cursor: pointer; position: relative;
    box-shadow: 0 6px 24px rgba(239,68,68,0.55);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    display: flex; align-items: center; justify-content: center;
}
.float-chat-btn:hover { transform: scale(1.1); box-shadow: 0 10px 36px rgba(239,68,68,0.7); }
.float-notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: #dc2626; color: #fff;
    font-size: 10px; font-weight: 800;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #0a0a0a;
    animation: badge-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badge-pop { from{transform:scale(0)} to{transform:scale(1)} }
.float-chat-panel {
    width: 420px;
    background: #111111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    opacity: 0; pointer-events: none;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom left;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34,1.2,0.64,1);
}
.float-chat-panel.open { opacity:1; pointer-events:all; transform:translateY(0) scale(1); }
.float-chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px;
    background: #111111;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.float-chat-hl { display: flex; align-items: center; gap: 12px; }
.chat-live-dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: #ef4444;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff; flex-shrink: 0;
    animation: red-pulse 2s ease-in-out infinite;
}
@keyframes red-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100%{ box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.float-chat-title { font-size: 16px; font-weight: 700; color: #fff; }
.float-chat-subtitle {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: rgba(200,200,200,0.6); margin-top: 1px;
}
.float-chat-hr { display: flex; align-items: center; gap: 10px; }
.fc-online-pill { font-size: 13px; color: rgba(200,200,200,0.75); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.fc-join-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #5865f2; color: #fff;
    padding: 7px 14px; border-radius: 8px;
    text-decoration: none; font-size: 13px; font-weight: 700;
    transition: background 0.2s; white-space: nowrap;
}
.fc-join-btn:hover { background: #4752c4; }
.float-close-btn {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.07); border: none;
    color: rgba(200,200,200,0.7); font-size: 13px;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.float-close-btn:hover { background: rgba(239,68,68,0.2); color: #ef4444; }
.float-chat-messages {
    background: #0d0d0d; height: 340px; overflow-y: auto;
    padding: 0; display: flex; flex-direction: column; gap: 0;
}
.float-chat-messages::-webkit-scrollbar { width: 3px; }
.float-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
.chat-msg {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 11px 16px;
    background: #181818; border-bottom: 1px solid #0d0d0d;
    transition: background 0.15s;
    animation: msgSlideIn 0.3s cubic-bezier(0.34,1.2,0.64,1) both;
}
@keyframes msgSlideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.chat-msg:hover { background: #1e1e1e; }
.chat-msg.bot-msg { background: rgba(139,92,246,0.1); border-left: 3px solid #8b5cf6; }
.msg-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.msg-name { font-size: 13px; font-weight: 700; color: #fff; }
.msg-verified { color: #4285f4; font-size: 11px; }
.msg-time { font-size: 11px; color: rgba(180,180,180,0.5); margin-left: auto; }
.msg-saved {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; color: rgba(180,180,180,0.55);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px; padding: 1px 6px;
}
.msg-text { font-size: 13px; color: rgba(220,220,220,0.88); line-height: 1.55; word-break: break-word; }
.float-chat-typing {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    background: #181818; border-top: 1px solid #0d0d0d;
}
.typing-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.typing-dots { display: flex; gap: 4px; align-items: center; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: #8b5cf6; animation: typingBounce 1.2s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%,60%,100% { transform:translateY(0); opacity:0.4; }
    30%          { transform:translateY(-5px); opacity:1; }
}
.float-chat-input-row {
    display: flex; align-items: center; gap: 0;
    padding: 12px 14px; background: #111111;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.float-chat-input {
    flex: 1; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 24px 0 0 24px;
    padding: 11px 16px; color: #e2e8f0;
    font-family: 'Outfit', sans-serif; font-size: 13px; outline: none;
    transition: border-color 0.2s;
}
.float-chat-input:focus { border-color: rgba(239,68,68,0.5); }
.float-chat-input::placeholder { color: rgba(180,180,180,0.3); }
.float-send-btn {
    width: 44px; height: 44px; border-radius: 0 24px 24px 0;
    background: #ef4444; border: 1px solid rgba(255,255,255,0.08); border-left: none;
    color: #fff; font-size: 15px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.float-send-btn:hover { background: #dc2626; }
.float-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 480px) {
    .float-chat-panel { width: calc(100vw - 32px); }
    .float-chat-wrap  { left: 12px; bottom: 12px; }
}

#features { padding: 100px 0; }


.chat-widget {
    max-width: 780px;
    margin: 0 auto;
    background: rgba(5, 5, 18, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

/* ── Header ── */
.chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

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

.chat-live-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239,68,68,0.5);
    animation: live-pulse 1.5s infinite;
    flex-shrink: 0;
}

.chat-title { font-size: 16px; font-weight: 700; color: var(--text); }

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

.chat-online-badge {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; color: var(--muted);
}

.chat-join-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff;
    padding: 7px 16px; border-radius: 8px;
    text-decoration: none; font-size: 13px; font-weight: 700;
    transition: all 0.25s;
}
.chat-join-btn:hover { background: #7c3aed; transform: translateY(-1px); }

/* ── Messages ── */
.chat-messages {
    height: 380px;
    overflow-y: auto;
    padding: 20px 20px 8px;
    display: flex; flex-direction: column; gap: 4px;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.chat-msg {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 14px;
    border-radius: 12px;
    transition: background 0.2s;
    animation: msgSlideIn 0.35s cubic-bezier(0.34,1.2,0.64,1) both;
}

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

.chat-msg:hover { background: rgba(255,255,255,0.03); }

.chat-msg.bot-msg {
    background: rgba(139,92,246,0.07);
    border: 1px solid rgba(139,92,246,0.15);
}

.msg-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #fff;
    flex-shrink: 0;
}

.msg-body { flex: 1; min-width: 0; }

.msg-meta {
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 5px; flex-wrap: wrap;
}

.msg-name {
    font-size: 13px; font-weight: 700; color: var(--text);
}

.msg-verified {
    color: #4285f4; font-size: 11px;
}

.msg-time {
    font-size: 11px; color: var(--muted);
    margin-left: auto;
}

.msg-text {
    font-size: 14px; color: rgba(241,245,249,0.85);
    line-height: 1.5; word-break: break-word;
}

.msg-saved {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; color: var(--muted);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px; padding: 1px 7px;
}

/* ── Typing indicator ── */
.chat-typing {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.typing-avatar {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
}

.typing-dots {
    display: flex; gap: 4px; align-items: center;
}

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

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

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

/* ── Input ── */
.chat-input-row {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.02);
}

.chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px; outline: none;
    transition: all 0.3s;
}

.chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
    background: rgba(139,92,246,0.05);
}

.chat-input::placeholder { color: rgba(148,163,184,0.5); }

.chat-send-btn {
    width: 44px; height: 44px; border-radius: 12px; border: none;
    background: var(--accent);
    color: #fff; font-size: 16px;
    cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(139,92,246,0.4);
}

.chat-send-btn:hover { background: #7c3aed; transform: translateY(-2px); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@media (max-width: 640px) {
    .chat-messages { height: 280px; }
    .chat-header { flex-wrap: wrap; gap: 8px; }
}

/* ══════════════════════════════════════════
   FEATURES
══════════════════════════════════════════ */
#features { padding: 100px 0; }



.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; margin-top: 56px;
}

.feat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    transition: all 0.3s;
    position: relative; overflow: hidden;
}

.feat-card::before {
    content:''; position:absolute;
    top:0;left:0;right:0;height:2px;
    background:linear-gradient(to right,transparent,var(--accent),transparent);
    opacity:0; transition:opacity 0.3s;
}

.feat-card:hover { transform:translateY(-6px); border-color:rgba(139,92,246,0.3);
    box-shadow:0 12px 40px rgba(0,0,0,0.35); }
.feat-card:hover::before { opacity:1; }

.feat-icon {
    width: 52px; height: 52px;
    border-radius: 14px; display:flex; align-items:center; justify-content:center;
    font-size: 22px; margin-bottom: 20px;
}

.icon-purple { background:rgba(139,92,246,0.15); color:var(--accent); }
.icon-blue   { background:rgba(59,130,246,0.15);  color:var(--accent2); }
.icon-green  { background:rgba(16,185,129,0.15);  color:var(--green); }
.icon-pink   { background:rgba(236,72,153,0.15);  color:var(--pink); }
.icon-amber  { background:rgba(245,158,11,0.15);  color:#f59e0b; }
.icon-cyan   { background:rgba(6,182,212,0.15);   color:#06b6d4; }

.feat-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feat-desc  { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ══════════════════════════════════════════
   GRAPH / INFOGRAPHIC
══════════════════════════════════════════ */
#graph { padding: 100px 0; }

.graph-inner {
    display: grid; grid-template-columns: 1fr 2fr;
    gap: 60px; align-items: center;
}

.graph-stats { display:flex; flex-direction:column; gap:24px; }

.g-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px; padding: 22px 24px;
    display: flex; align-items: center; gap: 16px;
    transition: all 0.3s;
}

.g-stat-card:hover { border-color: rgba(139,92,246,0.3); transform:translateX(4px); }
.g-stat-icon { font-size: 24px; }
.g-stat-num  { font-size: 1.8rem; font-weight: 800; }
.g-stat-lbl  { font-size: 12px; color: var(--muted); }

.chart-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 16px; font-weight: 700; margin-bottom: 4px;
}

.chart-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.canvas-wrap {
    position: relative;
    flex: 1;
    min-height: 260px;
    width: 100%;
}

/* ══════════════════════════════════════════
   PRICING
══════════════════════════════════════════ */
#pricing { padding: 100px 0; }

.pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; margin-top: 56px; align-items: start;
}

.price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px; padding: 36px 32px;
    transition: all 0.3s; position:relative; overflow:hidden;
}

.price-card.popular {
    border-color: var(--accent);
    background: rgba(139,92,246,0.08);
    box-shadow: 0 0 60px rgba(139,92,246,0.15);
    transform: scale(1.04);
}

.popular-tag {
    position:absolute; top:0; right:24px;
    background: var(--accent); color:#fff;
    font-size:11px; font-weight:700; letter-spacing:0.5px;
    padding:5px 14px 7px; border-radius:0 0 12px 12px;
}

.price-card:hover { transform:translateY(-6px); }
.price-card.popular:hover { transform:scale(1.04) translateY(-6px); }

.price-icon  { font-size:36px; margin-bottom:20px; }
.price-plan  { font-size:14px; font-weight:600; color:var(--muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:1px; }
.price-amount{
    font-size: 3rem; font-weight: 900;
    display:flex; align-items:baseline; gap:4px; margin-bottom:8px;
}
.price-amount sup { font-size:1.2rem; font-weight:500; margin-top:8px; align-self:flex-start; }
.price-amount sub { font-size:14px; color:var(--muted); font-weight:400; }
.price-desc  { font-size:14px; color:var(--muted); margin-bottom:28px; padding-bottom:28px; border-bottom:1px solid var(--border); }

.price-features { display:flex; flex-direction:column; gap:12px; margin-bottom:32px; }
.pf-item { display:flex; align-items:center; gap:12px; font-size:14px; }
.pf-item i { font-size:14px; flex-shrink:0; }
.pf-item .ok  { color:var(--green); }
.pf-item .no  { color:var(--muted); }

.btn-plan {
    width:100%; padding:13px; border-radius:12px;
    font-family:'Outfit',sans-serif; font-size:15px; font-weight:700;
    cursor:pointer; border:none; transition:all 0.25s;
    text-align:center; text-decoration:none; display:block;
}

.btn-plan-primary {
    background:linear-gradient(135deg,var(--accent),#6d28d9);
    color:#fff; box-shadow:0 4px 20px var(--glow);
}
.btn-plan-primary:hover { box-shadow:0 8px 30px var(--glow); transform:translateY(-2px); }

.btn-plan-ghost {
    background:var(--surface); color:var(--text);
    border:1px solid var(--border);
}
.btn-plan-ghost:hover { background:rgba(255,255,255,0.08); }

/* ══════════════════════════════════════════
   CTA BANNER
══════════════════════════════════════════ */
#cta {
    padding: 100px 0;
}

.cta-inner {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.15));
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 32px; padding: 72px;
    text-align: center; position:relative; overflow:hidden;
}

.cta-inner::before{
    content:''; position:absolute; inset:-1px;
    background:linear-gradient(135deg,var(--accent),var(--accent2),var(--pink),var(--accent));
    border-radius:32px; z-index:-1; opacity:0.15;
    background-size:300% 300%; animation:gradient-move 6s linear infinite;
}

@keyframes gradient-move {
    0%  {background-position:0% 50%}
    50% {background-position:100% 50%}
    100%{background-position:0% 50%}
}

.cta-inner h2 { font-size:clamp(2rem,4vw,3rem); font-weight:900; margin-bottom:16px; }
.cta-inner p { font-size:17px; color:var(--muted); margin-bottom:40px; }
.cta-actions { display:flex; justify-content:center; gap:16px; flex-wrap:wrap; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 5% 32px;
    position: relative; z-index: 1;
}

.footer-inner {
    max-width:1200px; margin:0 auto;
    display:grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap:48px; margin-bottom:48px;
}

.footer-brand .nav-logo { margin-bottom:16px; display:inline-flex; }
.footer-brand p { font-size:14px; color:var(--muted); line-height:1.7; max-width:280px; }

.footer-social { display:flex; gap:12px; margin-top:20px; }
.social-btn {
    width:36px;height:36px; border-radius:9px;
    background:var(--surface); border:1px solid var(--border);
    display:flex;align-items:center;justify-content:center;
    color:var(--muted); font-size:15px; text-decoration:none;
    transition:all 0.25s;
}
.social-btn:hover { background:rgba(139,92,246,0.15); color:var(--accent); border-color:rgba(139,92,246,0.3); }

.footer-col h4 { font-size:14px; font-weight:700; margin-bottom:16px; color:var(--text); }
.footer-col ul { list-style:none; display:flex;flex-direction:column;gap:10px; }
.footer-col a { text-decoration:none; color:var(--muted); font-size:14px; transition:color 0.2s; }
.footer-col a:hover { color:var(--text); }

.footer-bottom {
    max-width:1200px; margin:0 auto;
    padding-top:24px; border-top:1px solid var(--border);
    display:flex; justify-content:space-between; align-items:center;
    font-size:13px; color:var(--muted);
    flex-wrap:wrap; gap:12px;
}

.footer-bottom a { color:var(--muted); text-decoration:none; }
.footer-bottom a:hover { color:var(--text); }

/* ══════════════════════════════════════════
   AUTH PAGES (Login/Signup)
══════════════════════════════════════════ */
.auth-page {
    min-height:100vh; display:flex; flex-direction:column;
}

.auth-main {
    flex:1; display:flex; align-items:center; justify-content:center;
    padding:100px 5% 60px;
}

.auth-card {
    background:rgba(255,255,255,0.04);
    border:1px solid var(--border);
    border-radius:24px;
    padding:48px 44px;
    width:100%; max-width:460px;
    backdrop-filter:blur(10px);
    box-shadow:0 20px 60px rgba(0,0,0,0.5);
    animation: cardFadeIn 0.5s cubic-bezier(0.34,1.2,0.64,1) both;
}

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

.auth-logo {
    display:flex; flex-direction:column; align-items:center;
    gap:8px; margin-bottom:36px; text-align:center;
}
.auth-logo .logo-icon { width:52px;height:52px;border-radius:14px;font-size:24px; }
.auth-logo h1 { font-size:26px;font-weight:800; }
.auth-logo p  { font-size:14px;color:var(--muted); }

.auth-form  { display:flex; flex-direction:column; gap:16px; }
.form-row   { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.form-group { display:flex; flex-direction:column; gap:6px; }
.form-label { font-size:13px; font-weight:600; color:var(--muted); }

.form-field {
    position:relative; display:flex; align-items:center;
}
.form-field i {
    position:absolute; left:15px;
    color:var(--muted); font-size:14px; pointer-events:none; transition:color 0.3s;
}
.form-field:focus-within i { color:var(--accent); }
.form-field input {
    width:100%; padding:13px 14px 13px 42px;
    background:rgba(0,0,0,0.2); border:1px solid var(--border);
    border-radius:11px; color:var(--text);
    font-family:'Outfit',sans-serif; font-size:14px; outline:none;
    transition:all 0.3s;
}
.form-field input:focus {
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(139,92,246,0.15);
    background:rgba(139,92,246,0.05);
}
.form-field .toggle-pw {
    position:absolute; right:13px; background:none; border:none;
    color:var(--muted); cursor:pointer; font-size:14px; transition:color 0.2s;
}
.form-field .toggle-pw:hover { color:var(--accent); }

.form-error {
    display:none; align-items:center; gap:8px; font-size:13px;
    color:#ef4444; background:rgba(239,68,68,0.1);
    border:1px solid rgba(239,68,68,0.3); border-radius:9px; padding:10px 14px;
    animation:slideIn 0.3s ease;
}
.form-error.show { display:flex; }

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

.form-success {
    display:none; align-items:center; gap:8px; font-size:13px;
    color:var(--green); background:rgba(16,185,129,0.1);
    border:1px solid rgba(16,185,129,0.3); border-radius:9px; padding:10px 14px;
}
.form-success.show { display:flex; }

.form-meta {
    display:flex; justify-content:space-between; align-items:center;
    font-size:13px;
}
.form-meta a { color:var(--accent); text-decoration:none; }
.form-meta a:hover { text-decoration:underline; }
.form-check { display:flex; align-items:center; gap:8px; cursor:pointer; }
.form-check input { accent-color:var(--accent); }

.btn-submit {
    width:100%; padding:14px; border:none; border-radius:12px;
    background:linear-gradient(135deg,var(--accent),#6d28d9);
    color:#fff; font-family:'Outfit',sans-serif; font-size:15px; font-weight:700;
    cursor:pointer; transition:all 0.3s; box-shadow:0 4px 20px var(--glow);
    display:flex; align-items:center; justify-content:center; gap:10px;
}
.btn-submit:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 8px 30px var(--glow); }
.btn-submit:disabled { opacity:0.6; cursor:not-allowed; transform:none; }

.auth-switch {
    text-align:center; margin-top:24px; font-size:14px; color:var(--muted);
}
.auth-switch a { color:var(--accent); text-decoration:none; font-weight:600; }
.auth-switch a:hover { text-decoration:underline; }

/* Verify step */
.verify-box {
    background:rgba(16,185,129,0.06); border:1px solid rgba(16,185,129,0.2);
    border-radius:16px; padding:28px; text-align:center; margin-bottom:24px;
}
.verify-icon { font-size:40px; margin-bottom:12px; }
.verify-title { font-size:18px; font-weight:700; margin-bottom:6px; }
.verify-sub   { font-size:13px; color:var(--muted); line-height:1.6; }

.code-display {
    background:rgba(139,92,246,0.12); border:2px dashed rgba(139,92,246,0.4);
    border-radius:12px; padding:18px; text-align:center;
    font-size:2rem; font-weight:800; letter-spacing:12px;
    color:var(--accent); margin:8px 0 4px; font-variant-numeric:tabular-nums;
}

.code-hint { font-size:12px; color:var(--muted); text-align:center; margin-bottom:8px; }

.code-input-group {
    display:flex; gap:10px;
}

.code-input-group input {
    flex:1; text-align:center; font-size:1.8rem; font-weight:700;
    letter-spacing:8px; padding:16px;
}

.shake { animation:shake 0.5s both; }
@keyframes shake {
    10%,90%{transform:translateX(-4px)}
    20%,80%{transform:translateX(6px)}
    30%,50%,70%{transform:translateX(-6px)}
    40%,60%{transform:translateX(6px)}
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns:1fr; }
    .hero-visual { display:none; }
    .features-grid { grid-template-columns:1fr 1fr; }
    .graph-inner  { grid-template-columns:1fr; }
    .pricing-grid { grid-template-columns:1fr; }
    .price-card.popular { transform:none; }
    .footer-inner { grid-template-columns:1fr 1fr; }
    .stats-inner  { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 640px) {
    nav { display:none; }
    .features-grid { grid-template-columns:1fr; }
    .stats-inner  { grid-template-columns:1fr 1fr; }
    .cta-inner    { padding:40px 24px; }
    .footer-inner { grid-template-columns:1fr; }
    .auth-card    { padding:32px 24px; }
    .form-row     { grid-template-columns:1fr; }
}

/* =============================================
   EMBEDDED COMMUNITY CHAT — SITE THEME
============================================= */
#community { padding: 80px 0; }

.embed-chat {
    max-width: 820px;
    margin: 0 auto;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(139,92,246,0.1);
    backdrop-filter: blur(20px);
}

/* Header */
.embed-chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px;
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.08));
    border-bottom: 1px solid rgba(139,92,246,0.15);
}
.embed-chat-hl { display: flex; align-items: center; gap: 12px; }
.embed-chat-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(139,92,246,0.4);
}
.embed-chat-title { font-size: 16px; font-weight: 700; color: #fff; }
.embed-chat-sub {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: rgba(148,163,184,0.8); margin-top: 2px;
}
.embed-live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
    animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
    100%{ box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.embed-chat-hr { display: flex; align-items: center; gap: 10px; }
.embed-online-badge {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; color: rgba(148,163,184,0.75);
}
.embed-join-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff; padding: 8px 18px; border-radius: 10px;
    text-decoration: none; font-size: 13px; font-weight: 700;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}
.embed-join-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139,92,246,0.5); }

/* Messages */
.embed-messages {
    height: 380px; overflow-y: auto;
    padding: 12px 0 8px;
    display: flex; flex-direction: column;
    gap: 8px;                          /* space between each card */
    background: rgba(0,0,0,0.2);
}
.embed-messages::-webkit-scrollbar { width: 4px; }
.embed-messages::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 4px; }

/* ── Card-bubble message rows (monopolygo style) ── */
.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 18px;
    background: transparent;
    border-bottom: none;
    transition: none;
    animation: msgSlideIn 0.32s cubic-bezier(0.34,1.2,0.64,1) both;
}
@keyframes msgSlideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* Round avatar — sits outside the card */
.msg-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    flex-shrink: 0; margin-top: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* The card bubble */
.msg-body {
    flex: 1; min-width: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 10px 14px;
    transition: background 0.2s, border-color 0.2s;
}
.chat-msg:hover .msg-body {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.2);
}

/* Bot message card */
.chat-msg.bot-msg .msg-body {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.25);
}

/* Top row inside card */
.msg-meta {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 6px; flex-wrap: nowrap;
}
.msg-name   { font-size: 13px; font-weight: 700; color: #fff; }
.msg-verified { color: #4285f4; font-size: 11px; flex-shrink: 0; }
.msg-time   { font-size: 11px; color: rgba(148,163,184,0.5); margin-left: auto; white-space: nowrap; }

/* Saved badge */
.msg-saved {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; color: rgba(148,163,184,0.6);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px; padding: 1px 7px; flex-shrink: 0;
}

/* Message text */
.msg-text {
    font-size: 13.5px; color: rgba(226,232,240,0.85);
    line-height: 1.55; word-break: break-word;
}


/* Typing */
.embed-typing {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 20px;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.embed-typing-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg,#8b5cf6,#3b82f6);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.typing-dots { display: flex; gap: 4px; align-items: center; }
.typing-dots span {
    width: 7px; height: 7px; border-radius: 50%; background: #8b5cf6;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%,60%,100% { transform:translateY(0); opacity:0.4; }
    30%          { transform:translateY(-6px); opacity:1; }
}

/* Input */
.embed-input-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(139,92,246,0.12);
}
.embed-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 12px; padding: 12px 16px;
    color: #f1f5f9;
    font-family: 'Outfit', sans-serif; font-size: 14px; outline: none;
    transition: all 0.25s;
}
.embed-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
    background: rgba(139,92,246,0.05);
}
.embed-input::placeholder { color: rgba(148,163,184,0.4); }
.embed-send-btn {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none; color: #fff; font-size: 17px;
    cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(139,92,246,0.4);
}
.embed-send-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139,92,246,0.55); }
.embed-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@media (max-width: 640px) {
    .embed-messages { height: 280px; }
    .embed-chat-header { flex-wrap: wrap; gap: 10px; }
}

