/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ===== DEMO PAGE STYLES ===== */
.demo-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.demo-page header {
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.demo-page header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.demo-page header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.hero {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.hero h2 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 20px;
}

.hero>p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 50px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature .icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* ===== CHATBOT CONTAINER ===== */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* ===== CHATBOT TOGGLE BUTTON ===== */
.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #10a37f;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 163, 127, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(16, 163, 127, 0.6);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.chatbot-toggle .icon-close {
    display: none;
}

.chatbot-toggle.active .icon-chat {
    display: none;
}

.chatbot-toggle.active .icon-close {
    display: block;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.notification-badge.hidden {
    display: none;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ===== CHATBOT WINDOW ===== */
.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 340px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CHATBOT HEADER ===== */
.chatbot-header {
    background: #10a37f;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.info h3 {
    font-size: 15px;
    margin-bottom: 3px;
    font-weight: 600;
}

.status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.minimize-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.minimize-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.minimize-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* ===== MESSAGES AREA ===== */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 28px;
    height: 28px;
    background: #10a37f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: #f4f4f4;
    order: 2;
}

.message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-content p {
    background: #f4f4f4;
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.5;
    box-shadow: none;
    font-size: 14px;
}

.user-message .message-content {
    align-items: flex-end;
}

.user-message .message-content p {
    background: #10a37f;
    color: white;
}

.message-time {
    font-size: 11px;
    color: #999;
    padding: 0 8px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

/* ===== QUICK REPLIES ===== */
.quick-replies {
    padding: 10px 16px;
    background: white;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.quick-replies::-webkit-scrollbar {
    height: 3px;
}

.quick-replies::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.quick-reply {
    padding: 6px 12px;
    background: #f4f4f4;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    color: #10a37f;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    flex-shrink: 0;
}

.quick-reply:hover {
    background: #10a37f;
    color: white;
    border-color: #10a37f;
    transform: translateY(-1px);
}

/* ===== INPUT AREA ===== */
.chatbot-input {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input input:focus {
    border-color: #10a37f;
}

.send-btn {
    width: 36px;
    height: 36px;
    background: #10a37f;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 163, 127, 0.3);
}

.send-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== POWERED BY ===== */
.powered-by {
    padding: 6px;
    text-align: center;
    font-size: 10px;
    color: #999;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 20px;
    }

    .demo-page header h1 {
        font-size: 2em;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero h2 {
        font-size: 1.8em;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.user-message {
    animation: slideInRight 0.3s ease;
}