* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --green: #10b981;
    --green-dark: #059669;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #334155;
    --bot-bg: #1e293b;
    --user-bg: #6366f1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(160deg, #0f172a 0%, #1a1f3a 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 14px 24px;
}

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 22px 8px 18px;
    margin-bottom: 16px;
}

.hero-badge {
    display: inline-block;
    background: rgba(99,102,241,.18);
    border: 1px solid rgba(99,102,241,.4);
    color: #a5b4fc;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: .06em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #f1f5f9;
}

.hero-price {
    background: linear-gradient(135deg, var(--green), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-benefits span {
    font-size: 0.8rem;
    color: #86efac;
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.25);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Chat ── */
.chat-section {
    margin-bottom: 0;
}

.chat-container {
    background: #0b141a;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(18,140,126,.2);
    border: 1px solid #2a3942;
}

.chat-header {
    background: #128C7E;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chat-header-avatar svg {
    width: 24px;
    height: 24px;
}

.chat-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1px;
    color: #fff;
}

.chat-header p {
    font-size: 0.72rem;
    color: rgba(255,255,255,.85);
}

.chat-online-dot {
    width: 9px;
    height: 9px;
    background: #4ade80;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(74,222,128,.3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(74,222,128,.3); }
    50%       { box-shadow: 0 0 0 5px rgba(74,222,128,.1); }
}

.chat-messages {
    height: 260px;
    overflow-y: auto;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #0b141a;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.message {
    display: flex;
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bot-message  { justify-content: flex-start; }
.user-message { justify-content: flex-end; }

.message-content {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 16px;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.45;
}

.bot-message .message-content {
    background: #202c33;
    color: #e9edef;
    border: none;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: #005c4b;
    color: #e9edef;
    border: none;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: #202c33;
    border: none;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    max-width: 60px;
}

.typing-indicator.active { display: flex; }

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: .6; }
    30%           { transform: translateY(-8px); opacity: 1; }
}

/* Chat input */
.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #1f2c34;
    border-top: 1px solid #2a3942;
}

#chatInput {
    flex: 1;
    padding: 11px 14px;
    border: none;
    border-radius: 22px;
    background: #2a3942;
    color: #e9edef;
    font-size: 16px;
    outline: none;
    transition: background .2s;
}

#chatInput:focus { background: #333d45; }
#chatInput::placeholder { color: #8696a0; }

.send-button {
    width: 44px;
    height: 44px;
    background: #128C7E;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .15s, box-shadow .15s;
}

.send-button:hover {
    transform: scale(1.07);
    box-shadow: 0 4px 14px rgba(18,140,126,.5);
}

.send-button:active  { transform: scale(.96); }
.send-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.chat-footer {
    padding: 7px;
    text-align: center;
    background: #1f2c34;
    color: #8696a0;
    font-size: 0.7rem;
}

/* ── Modal ── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
    animation: fadeIn .25s ease;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--bg-light);
    padding: 28px 20px 36px;
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border);
    box-shadow: 0 -10px 40px rgba(0,0,0,.4);
}

.modal-content h2 {
    margin-bottom: 6px;
    font-size: 1.15rem;
    color: var(--primary);
}

.modal-content > p {
    color: var(--muted);
    margin-bottom: 22px;
    font-size: 0.88rem;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.88rem;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    transition: border-color .2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .01em;
    transition: transform .15s, box-shadow .15s;
    margin-top: 4px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16,185,129,.4);
}

.submit-button:active { transform: translateY(0); }

/* ── Success ── */
.success-message {
    display: none;
    text-align: center;
    padding: 32px 16px;
    background: var(--bg-light);
    border-radius: 18px;
    border: 2px solid var(--green);
    animation: fadeIn .3s ease;
}

.success-message.active { display: block; }

.success-message h2 {
    color: var(--green);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.success-message p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ── Responsive (tablet/desktop) ── */
@media (min-width: 481px) {
    .container { padding: 28px 20px 40px; }
    .hero-title { font-size: 2.2rem; }
    .chat-messages { height: 340px; }

    .modal {
        align-items: center;
        padding: 0 16px;
    }

    .modal-content {
        border-radius: 20px;
        padding: 36px 32px;
        max-width: 460px;
    }
}
