/* ─── СТРАНИЦА TELEGRAM БОТА ─── */
:root {
    --bot-card-bg: rgba(255,255,255,0.04);
    --bot-card-border: rgba(255,255,255,0.06);
    --bot-card-shadow: 0 8px 30px rgba(0,0,0,0.06);
    --bot-card-shadow-hover: 0 16px 48px rgba(139,92,246,0.10);
    --demo-phone-bg: var(--bg-card);
    --demo-screen-bg: var(--bg-sidebar);
}

body.dark-theme {
    --bot-card-bg: rgba(255,255,255,0.02);
    --bot-card-border: rgba(255,255,255,0.08);
    --bot-card-shadow: 0 8px 30px rgba(0,0,0,0.3);
    --bot-card-shadow-hover: 0 16px 48px rgba(139,92,246,0.15);
    --demo-phone-bg: var(--bg-secondary);
    --demo-screen-bg: var(--bg-primary);
}

.bot-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ─── Hero секция ─── */
.bot-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.hero-content {
    flex: 1;
    max-width: 550px;
    min-width: 280px;
}
.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
}
.hero-title .accent-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-main);
    color: #fff;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(139,92,246,0.25);
    transition: var(--transition);
    margin-bottom: 28px;
}
.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(139,92,246,0.35);
}
.hero-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bot-card-bg);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bot-card-border);
}
.feature i {
    color: var(--accent-1);
}

/* ─── Телефончик ─── */
.bot-demo {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 280px;
}
.desktop-only {
    display: flex;
}
.mobile-pager {
    display: none;
}

.demo-phone {
    width: 280px;
    height: 560px;
    background: var(--demo-phone-bg);
    border-radius: 36px;
    padding: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 0 0 2px rgba(139,92,246,0.08);
    position: relative;
}
.demo-phone::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 3px;
    opacity: 0.3;
}
.demo-screen {
    background: var(--demo-screen-bg);
    border-radius: 24px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.demo-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border-glass);
}
.demo-logo {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.demo-logo span {
    color: var(--accent-1);
}
.demo-menu {
    color: var(--text-secondary);
    font-size: 18px;
}
.demo-character {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-glass);
    background: var(--bot-card-bg);
}
.demo-char-avatar {
    width: 38px;
    height: 38px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}
.demo-char-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.demo-char-status {
    font-size: 0.7rem;
    color: #22c55e;
}
.demo-chat {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.78rem;
}
.demo-msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 16px;
    word-wrap: break-word;
    animation: msgAppear 0.5s ease forwards;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.demo-msg.bot {
    background: var(--bg-card);
    color: var(--text-primary);
    align-self: flex-start;
    border: 1px solid var(--border-glass);
}
.demo-msg.user {
    background: var(--gradient-main);
    color: #fff;
    align-self: flex-end;
}
.demo-msg.typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.5s infinite;
    margin-right: 3px;
}
.demo-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.demo-msg.typing span:nth-child(3) { animation-delay: 0.4s; }

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

/* ─── Мобильный пейджер ─── */
.mobile-pager {
    display: none;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    height: 280px;
    width: 100%;
    box-shadow: var(--shadow-card);
}
.pager-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    background: var(--bot-card-bg);
    flex-shrink: 0;
}
.pager-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
}
.pager-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.pager-status {
    font-size: 0.7rem;
    color: #22c55e;
}
.pager-logo {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.pager-logo span {
    color: var(--accent-1);
}
.pager-chat {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
}

/* ─── Блок возможностей ─── */
.capabilities {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.capabilities h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.cap-card {
    background: var(--bot-card-bg);
    border: 1px solid var(--bot-card-border);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--bot-card-shadow);
}
.cap-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--bot-card-shadow-hover);
    border-color: var(--accent-1);
}
.cap-icon {
    font-size: 2.2rem;
    color: var(--accent-1);
    margin-bottom: 16px;
}
.cap-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.cap-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── АДАПТИВ ─── */
@media (max-width: 1148px) {
    .bot-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-features {
        justify-content: center;
    }
    .desktop-only {
        display: none !important;
    }
    .mobile-pager {
        display: flex;
    }
}

@media (max-width: 820px) {
    .bot-panel {
        padding: 16px 18px;
        border-radius: var(--radius-sm);
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .cap-card {
        padding: 18px 16px;
    }
    .cap-card h3 {
        font-size: 1.05rem;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .btn-hero {
        font-size: 1rem;
        padding: 14px 24px;
    }
    .hero-features {
        gap: 12px;
    }
    .feature {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .mobile-pager {
        height: 250px;
    }
}
