* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #667eea;
}

/* ===== Hero Section ===== */
.hero {
    background: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #2d3748;
}

.hero p {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

/* ===== Services Section ===== */
.services {
    background: #f7fafc;
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #2d3748;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #667eea;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.service-list li:before {
    content: "✓ ";
    color: #48bb78;
    font-weight: bold;
    margin-right: 10px;
}

/* ===== Pricing Section ===== */
.pricing {
    background: white;
    padding: 80px 0;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.pricing-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.price {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}

.price span {
    font-size: 20px;
}

.pricing-features {
    list-style: none;
    margin: 30px 0;
    text-align: left;
}

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* ===== Legal Section ===== */
.legal {
    background: #f7fafc;
    padding: 80px 0;
}

.legal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h3 {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 20px;
}

.legal-section h4 {
    font-size: 18px;
    color: #2d3748;
    margin: 20px 0 10px;
}

.warning-box {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.warning-box h4 {
    color: #c53030;
    margin-bottom: 10px;
}

.info-box {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

/* ===== Contact Section ===== */
.contact {
    background: white;
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.contact-item {
    padding: 30px;
    background: #f7fafc;
    border-radius: 15px;
}

.contact-item h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.contact-item a {
    color: #4a5568;
    text-decoration: none;
}

.contact-item a:hover {
    color: #667eea;
}

/* ===== Footer ===== */
footer {
    background: #2d3748;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.company-info {
    margin-bottom: 20px;
}

.company-info p {
    margin: 5px 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 20px;
        justify-content: center;
    }

    .pricing-card.featured {
        transform: scale(1);
    }
}

/* ===== CHAT WIDGET ===== */
#chat-tooltip {
    position: fixed;
    bottom: 100px;
    right: 28px;
    z-index: 10002;
    background: white;
    color: #2d3748;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 240px;
    white-space: normal;
    line-height: 1.4;
}

#chat-tooltip::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 22px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid white;
}

#chat-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: none;
}

#chat-bubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 10001;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102,126,234,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    outline: none;
}

#chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(102,126,234,0.65);
}

#chat-bubble svg { width: 28px; height: 28px; }

#chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #f56565;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    font-weight: bold;
}

#chat-window {
    position: fixed;
    bottom: 100px;
    right: 28px;
    z-index: 10000;
    width: 360px;
    max-height: 520px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#chat-window.open { display: flex; }

#chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

#chat-header .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

#chat-header .info { flex: 1; }
#chat-header .info strong { display: block; font-size: 15px; }
#chat-header .info span { font-size: 12px; opacity: 0.85; }

#chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    opacity: 0.8;
    padding: 0 4px;
}

#chat-close:hover { opacity: 1; }

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7fafc;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg.bot {
    background: white;
    color: #2d3748;
    align-self: flex-start;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg.typing {
    background: white;
    color: #a0aec0;
    align-self: flex-start;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    font-style: italic;
    font-size: 13px;
}

#chat-form {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
}

#chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    line-height: 1.4;
    max-height: 80px;
    overflow-y: auto;
}

#chat-input:focus { border-color: #667eea; }

#chat-send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
    align-self: flex-end;
}

#chat-send:hover { transform: scale(1.08); }
#chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
#chat-send svg { width: 20px; height: 20px; }

@media (max-width: 480px) {
    #chat-window {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 90px;
    }
    #chat-bubble {
        right: 16px;
        bottom: 16px;
    }
}

/* ===== Chat Markdown styles ===== */
.chat-msg.bot p {
    margin: 0 0 6px 0;
}
.chat-msg.bot p:last-child {
    margin-bottom: 0;
}
.chat-msg.bot strong {
    font-weight: 700;
}
.chat-msg.bot em {
    font-style: italic;
}
.chat-msg.bot code {
    background: #edf2f7;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
}
.chat-msg.bot pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 6px 0;
    font-size: 12px;
    line-height: 1.5;
}
.chat-msg.bot pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}
.chat-msg.bot h3,
.chat-msg.bot h4,
.chat-msg.bot h5,
.chat-msg.bot h6 {
    font-size: 14px;
    font-weight: 700;
    margin: 8px 0 4px 0;
    color: #2d3748;
}
.chat-msg.bot li {
    margin-left: 18px;
    list-style: disc;
    padding: 2px 0;
}
.chat-msg.bot blockquote {
    border-left: 3px solid #667eea;
    padding-left: 10px;
    color: #718096;
    margin: 4px 0;
    font-style: italic;
}
.chat-msg.bot a {
    color: #667eea;
    text-decoration: underline;
    word-break: break-all;
}
.chat-msg.bot a:hover {
    color: #764ba2;
}
