:root {
    --bg-color: #1A1A1D; /* Глибокий темний графіт */
    --accent-color: #F59E0B; /* Теплий бурштиновий/помаранчевий */
    --accent-hover: #D97706;
    --text-main: #F5F5F5; /* М'який білий */
    --text-muted: #9CA3AF;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius: 16px;
    --font: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

p {
    color: var(--text-muted);
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    color: var(--bg-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--text-main);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    padding: 12px 0;
}

.btn-text:hover {
    color: var(--accent-color);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.center {
    text-align: center;
    margin-top: 2rem;
}
.text-center { text-align: center; }

/* Header */
.header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(26, 26, 29, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.header-inner {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.link-login {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.link-login:hover {
    color: #fff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Hero (Блок 1) */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 80px 0; /* Менший падінг, бо висота тепер гнучка */
}

.hero .label {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 70px;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3.5rem;
    max-width: 900px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Демонстрація (Блок 2) */
.demo {
    padding: 60px 0;
}

.widget-wrapper {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.widget-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    filter: blur(100px);
    opacity: 0.15;
    animation: pulse 4s infinite alternate;
    z-index: -1;
}

.chat-widget {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 450px;
    overflow: hidden;
}

.chat-header {
    background: var(--accent-color);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .avatar {
    background: var(--bg-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-title strong {
    display: block;
    color: var(--bg-color);
    font-size: 1.1rem;
}

.chat-title span {
    color: rgba(26, 26, 29, 0.7);
    font-size: 0.8rem;
}

.chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message p { color: inherit; }

.message.bot {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: var(--accent-color);
    color: var(--bg-color);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    font-family: var(--font);
}

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

.send-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: 0.3s;
}

.send-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite both;
}

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

/* Status Indicator (Tool Call) */
.chat-status {
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-top: -10px;
    margin-bottom: 15px;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-left: 10px;
}

.chat-status.visible {
    opacity: 0.8;
}

/* Нове повідомлення (Анімація) */
.message.new-anim {
    animation: messageIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes messageIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Що вміє (Блок 3) & Чому Мотря (Блок 7) */
.features, .why-motrya { padding: 80px 0; }

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

.card h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
}

/* Порівняння (Блок 4) */
.comparison { padding: 80px 0; }

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.compare-col h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.compare-col.bad h3 { color: #EF4444; }
.compare-col.good h3 { color: #10B981; }

.compare-col ul {
    list-style: none;
}

.compare-col ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.compare-col.bad ul li::before {
    content: "−";
    position: absolute;
    left: 0;
    color: #EF4444;
    font-weight: bold;
}

.compare-col.good ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10B981;
    font-weight: bold;
}

/* Ніші (Блок 5) */
.niches { padding: 80px 0; }

.niches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.niches .icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.niches h4 { margin-bottom: 10px; }

/* Встановлення (Блок 6) */
.install { padding: 80px 0; }

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--glass-bg);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}

.step-num {
    background: var(--accent-color);
    color: var(--bg-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.2rem;
}

/* Вартість (Блок 8) */
.pricing { padding: 80px 0; }
.pricing h2 span { font-size: 1.2rem; color: var(--accent-color); display: block; margin-top: 10px; font-weight: 500;}
.pricing .subtitle { text-align: center; max-width: 800px; margin: 0 auto 40px; }

.pricing-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: var(--accent-color);
}

.pricing-card h3 { font-size: 1.8rem; margin-bottom: 20px; }

.price { margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px;}
.old-price { text-decoration: line-through; color: var(--text-muted); font-size: 1.2rem; }
.new-price { font-size: 3rem; font-weight: 700; color: var(--accent-color); line-height: 1; }

/* FAQ (Блок 9) */
.faq { padding: 80px 0; }

.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }

.faq-item { padding: 20px; cursor: pointer; transition: all 0.3s ease; }

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding-right: 30px;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: 0.3s;
}

.faq-item.active .faq-question::after { content: '−'; }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--text-muted);
    margin-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
}

/* CTA (Блок 10) & Footer */
.cta { padding: 100px 0; }
.cta h2 { max-width: 800px; margin: 0 auto 40px; }
footer { padding: 30px 0; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.9rem;}

/* Анімації */
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.25; }
}

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

/* Класи для скрол-анімацій (відпрацьовує JS) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Адаптив (Mobile) */
@media (max-width: 768px) {
    .hero { padding: 120px 0 60px; }
    .hero h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; gap: 10px; }
    .header-actions {
        gap: 15px;
    }

    .header-actions .btn {
        width: auto;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    h2 { font-size: 2rem; }
    
    .grid-2x2, .grid-3, .compare-grid { grid-template-columns: 1fr; }
    
    .step { flex-direction: column; align-items: center; text-align: center; }
    
    .pricing-card { padding: 30px 20px; }
}

.chat-widget {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 480px; /* Трохи збільшив для кращого вигляду довгих діалогів */
    overflow: hidden;
}

/* Додати в кінець файлу style.css */
.disabled-input {
    opacity: 0.5;
    cursor: not-allowed;
    text-align: center;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Specific accent for the chat widget body */
.chat-body::-webkit-scrollbar-thumb {
    background: var(--accent-color);
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.chat-body {
    scrollbar-color: var(--accent-color) transparent;
}