/* ── Tokens ── */
:root {
    --tg-cyan: #22d3ee;
    --tg-cyan-dim: rgba(34,211,238,0.08);
    --tg-cyan-border: rgba(34,211,238,0.18);
    --tg-purple: #818cf8;
}

/* ── Hero tweaks ── */
.tg-hero-badge {
    color: var(--tg-cyan);
    background: var(--tg-cyan-dim);
    border-color: rgba(34,211,238,0.25);
    box-shadow: 0 0 20px rgba(34,211,238,0.08), inset 0 0 20px rgba(34,211,238,0.03);
}
.tg-gradient-text {
    background: linear-gradient(135deg, #22d3ee 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Telegram chat preview ── */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.mode-panel {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.02);
}
.mode-panel:hover { 
    border-color: rgba(34,211,238,0.18); 
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.mode-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mode-panel-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #667eea);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
    overflow: hidden; padding: 0;
}
.mode-panel-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mode-panel-avatar-logo { padding: 2px; font-size: 0; }
.mode-panel-meta { flex: 1; min-width: 0; }
.mode-panel-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.mode-panel-sub { font-size: 11px; color: rgba(34,211,238,0.6); }
.mode-panel-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.mode-chat {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 260px;
}
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row.from-grin { justify-content: flex-start; }
.chat-row.from-user { justify-content: flex-end; }
.chat-row.from-other { justify-content: flex-start; }
.chat-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    font-size: 12px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; align-self: flex-end;
}
.chat-avatar-grin { background: linear-gradient(135deg, #22d3ee, #667eea); padding: 2px; overflow: hidden; font-size: 0; }
.chat-avatar-grin img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.chat-avatar-user { background: rgba(255,255,255,0.1); }
.chat-avatar-other { background: rgba(139,92,246,0.3); }
.chat-bubble {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
}
.chat-bubble-grin {
    background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(102,126,234,0.10));
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(34,211,238,0.12);
    border-bottom-left-radius: 4px;
}
.chat-bubble-user {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.55);
    border-bottom-right-radius: 4px;
}
.chat-bubble-other {
    background: rgba(139,92,246,0.08);
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(139,92,246,0.1);
    border-bottom-left-radius: 4px;
}
.chat-name {
    font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
    text-transform: uppercase; margin-bottom: 3px; opacity: 0.45;
}
.chat-name-grin { color: var(--tg-cyan); opacity: 0.7; }
.chat-price-pill {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    color: #22c55e;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 6px;
    padding: 2px 7px;
    margin-top: 5px;
}
.mode-caption {
    padding: 14px 18px 18px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.mode-caption-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.mode-caption-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }

/* ── Commands ── */
.cmd-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.cmd-tab {
    padding: 7px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.45);
    transition: all 0.18s;
}
.cmd-tab:hover { border-color: var(--tg-cyan-border); color: rgba(255,255,255,0.75); }
.cmd-tab.active {
    background: var(--tg-cyan-dim);
    border-color: var(--tg-cyan-border);
    color: var(--tg-cyan);
}
.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.cmd-card {
    padding: 16px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
    cursor: default;
}
.cmd-card:hover {
    border-color: var(--tg-cyan-border);
    background: var(--tg-cyan-dim);
    transform: translateY(-1px);
}
.cmd-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.cmd-slug {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--tg-cyan);
}
.cmd-badges { display: flex; gap: 5px; align-items: center; }
.cmd-badge {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}
.badge-both { color: rgba(34,211,238,0.7); background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.15); }
.badge-group { color: rgba(139,92,246,0.9); background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.2); }
.badge-dm { color: rgba(251,191,36,0.9); background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.15); }
.badge-admin { color: rgba(239,68,68,0.8); background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.15); }
.cmd-desc { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 8px; }
.cmd-example {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 11px;
    color: rgba(34,211,238,0.5);
    background: rgba(34,211,238,0.04);
    border: 1px solid rgba(34,211,238,0.08);
    border-radius: 6px;
    padding: 5px 9px;
}

/* ── Features ── */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.feat-card {
    padding: 26px 22px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 24px;
    transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.02);
}
.feat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}
.feat-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.feat-card:hover::before { opacity: 1; }
.feat-card-cyan::before { background: linear-gradient(90deg, transparent, #22d3ee, transparent); }
.feat-card-purple::before { background: linear-gradient(90deg, transparent, #818cf8, transparent); }
.feat-card-green::before { background: linear-gradient(90deg, transparent, #34d399, transparent); }
.feat-card-orange::before { background: linear-gradient(90deg, transparent, #fb923c, transparent); }
.feat-card-red::before { background: linear-gradient(90deg, transparent, #f87171, transparent); }
.feat-card-yellow::before { background: linear-gradient(90deg, transparent, #fbbf24, transparent); }
.feat-icon-wrap {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 14px;
}
.feat-icon-cyan   { background: rgba(34,211,238,0.1);  border: 1px solid rgba(34,211,238,0.15); }
.feat-icon-purple { background: rgba(129,140,248,0.1);  border: 1px solid rgba(129,140,248,0.15); }
.feat-icon-green  { background: rgba(52,211,153,0.1);   border: 1px solid rgba(52,211,153,0.15); }
.feat-icon-orange { background: rgba(251,146,60,0.1);   border: 1px solid rgba(251,146,60,0.15); }
.feat-icon-red    { background: rgba(248,113,113,0.1);  border: 1px solid rgba(248,113,113,0.15); }
.feat-icon-yellow { background: rgba(251,191,36,0.1);   border: 1px solid rgba(251,191,36,0.15); }
.feat-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.feat-desc { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ── CTA animated chat ── */
.tg-cta-section { text-align: center; padding: 80px 24px; }
.tg-cta-inner {
    max-width: 560px; margin: 0 auto;
    padding: 52px 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(34,211,238,0.15);
    border-radius: 24px;
    position: relative; overflow: hidden;
    box-shadow: 0 0 80px rgba(34,211,238,0.05);
}
.tg-cta-inner::before {
    content: '';
    position: absolute; top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,0.4), transparent);
}
.live-chat-wrap {
    max-width: 360px; margin: 0 auto 32px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(34,211,238,0.08);
    border-radius: 14px;
    overflow: hidden;
}
.live-chat-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.live-chat-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #667eea);
    display: flex; align-items: center; justify-content: center;
    font-size: 0; padding: 2px; overflow: hidden; flex-shrink: 0;
}
.live-chat-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.live-chat-name { font-size: 13px; font-weight: 700; color: var(--text-primary); flex: 1; text-align: left; }
.live-chat-status { font-size: 10px; color: #22c55e; font-weight: 600; }
.live-chat-msgs { padding: 14px 12px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.lc-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; line-height: 1.5; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; }
.lc-msg.visible { opacity: 1; transform: translateY(0); }
.lc-msg-user { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); align-self: flex-start; border-bottom-left-radius: 3px; }
.lc-msg-grin { background: rgba(34,211,238,0.12); color: rgba(34,211,238,0.9); border: 1px solid rgba(34,211,238,0.1); align-self: flex-end; border-bottom-right-radius: 3px; }
.lc-typing { align-self: flex-end; display: flex; gap: 4px; align-items: center; padding: 10px 14px; background: rgba(34,211,238,0.07); border: 1px solid rgba(34,211,238,0.1); border-radius: 12px; border-bottom-right-radius: 3px; opacity: 0; transition: opacity 0.3s; }
.lc-typing.visible { opacity: 1; }
.lc-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--tg-cyan); animation: lcbounce 1.2s infinite; }
.lc-dot:nth-child(2) { animation-delay: 0.2s; }
.lc-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes lcbounce { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
.tg-cta-title { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.tg-cta-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-tg-primary {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 30px;
    background: linear-gradient(135deg, #22d3ee, #0891b2);
    color: #fff; font-size: 15px; font-weight: 700;
    border-radius: 12px; text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(34,211,238,0.2);
    border: 1px solid rgba(34,211,238,0.4);
}
.btn-tg-primary:hover { 
    opacity: 1; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 32px rgba(34,211,238,0.4), 0 0 80px rgba(34,211,238,0.15);
}
.btn-tg-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px;
    background: transparent; color: rgba(255,255,255,0.45);
    font-size: 14px; font-weight: 600; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1); text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.btn-tg-ghost:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.75); }

/* ── Light mode overrides ── */
.light-mode .mode-panel { background: rgba(255,255,255,0.5); border-color: rgba(34,211,238,0.12); }
.light-mode .mode-panel-header { background: rgba(0,0,0,0.02); border-bottom-color: rgba(0,0,0,0.06); }
.light-mode .mode-panel-name { color: #0f172a; }
.light-mode .mode-caption-title { color: #0f172a; }
.light-mode .chat-bubble-user { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.45); }
.light-mode .chat-bubble-other { background: rgba(139,92,246,0.06); color: rgba(0,0,0,0.45); }
.light-mode .chat-bubble-grin { background: rgba(34,211,238,0.1); color: #0e7490; }
.light-mode .cmd-card { background: rgba(255,255,255,0.5); border-color: rgba(34,211,238,0.1); }
.light-mode .cmd-card:hover { background: rgba(255,255,255,0.8); }
.light-mode .cmd-slug { color: rgba(0,140,160,0.9); }
.light-mode .feat-card { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.06); }
.light-mode .feat-title { color: #0f172a; }
.light-mode .live-chat-wrap { background: rgba(0,0,0,0.03); }
.light-mode .live-chat-header { background: rgba(0,0,0,0.02); }
.light-mode .live-chat-name { color: #0f172a; }
.light-mode .lc-msg-user { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.45); }
.light-mode .lc-msg-grin { background: rgba(34,211,238,0.1); color: #0e7490; }
.light-mode .btn-tg-ghost { color: rgba(0,0,0,0.4); border-color: rgba(0,0,0,0.12); }
.light-mode .btn-tg-ghost:hover { border-color: rgba(0,0,0,0.25); color: rgba(0,0,0,0.6); }
.light-mode .cmd-tab { color: rgba(0,0,0,0.4); border-color: rgba(0,0,0,0.1); }
.light-mode .cmd-tab:hover { border-color: rgba(34,211,238,0.3); color: rgba(0,0,0,0.7); }
.light-mode .cmd-tab.active { color: rgba(0,140,160,0.9); }

/* ── Hero stats: 3 boxes, centred ── */
.hero-stats {
    grid-template-columns: repeat(3, 1fr);
    max-width: 520px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .modes-grid { grid-template-columns: 1fr; }
    .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .hero-stats { grid-template-columns: repeat(3, 1fr); max-width: 100%; }
    .feat-grid { grid-template-columns: 1fr; }
    .cmd-grid { grid-template-columns: 1fr; }
    .tg-cta-inner { padding: 36px 20px; }
    .tg-cta-title { font-size: 24px; }
}
