* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #f0f2f5;
    color: #1f2937;
    min-height: 100dvh;
    overscroll-behavior-y: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* LAYOUT STRUCTURAL (Mobile vs Desktop) */
.desktop-bg {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Elegant dark background for desktop */
    background: radial-gradient(circle at top right, #1f2937 0%, #030712 100%);
    z-index: -1;
}

.app-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.desktop-presentation {
    display: none; /* hidden on mobile */
}

/* CHAT APP BASE */
.chat-container {
    width: 100%;
    height: 100dvh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- MOBILE SPECIFICS OVERRIDES --- */
.chat-header {
    background: #111827;
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
}

.header-info { display: flex; align-items: center; gap: 12px; }
.avatar {
    font-size: 24px;
    background: #374151;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.title h1 { font-size: 16px; font-weight: 600; }
.title .status {
    font-size: 12px; color: #10b981;
    display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
.title .status::before {
    content: ''; width: 8px; height: 8px;
    background: #10b981; border-radius: 50%; display: inline-block;
}

.reset-btn {
    background: none; border: none; color: #9ca3af;
    font-size: 24px; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.reset-btn:active { transform: scale(0.9); }

.chat-messages {
    flex: 1; padding: 20px;
    overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
    background: #f9fafb; scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 10px; }

.message {
    max-width: 90%; padding: 14px 18px; border-radius: 16px;
    animation: fadeIn 0.3s ease; line-height: 1.5; font-size: 16px;
    position: relative; word-wrap: break-word;
}
.message.bot {
    align-self: flex-start; background: #ffffff; color: #1f2937;
    border: 1px solid #e5e7eb; border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.message.user {
    align-self: flex-end; background: #2563eb; color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.chat-input-area {
    padding: 16px; background: #ffffff; border-top: 1px solid #e5e7eb;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    flex-shrink: 0;
}

.input-wrapper { display: flex; gap: 8px; animation: fadeIn 0.3s ease; }
.input-field {
    flex: 1; padding: 14px 18px; border: 1px solid #d1d5db;
    border-radius: 24px; font-size: 16px; outline: none; transition: 0.2s;
    background: #f9fafb; -webkit-appearance: none; appearance: none;
}
.input-field:focus { border-color: #2563eb; background: #ffffff; }

.send-btn {
    background: #2563eb; color: white; border: none; width: 50px; height: 50px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.2s; flex-shrink: 0;
}
.send-btn:active:not(:disabled) { transform: scale(0.95); background: #1d4ed8; }
.send-btn svg { width: 24px; fill: currentColor; margin-left: 2px; }
.send-btn:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; }

.options-container { display: flex; flex-direction: column; gap: 10px; width: 100%; animation: fadeIn 0.3s ease; }
.option-btn {
    width: 100%; background: #ffffff; color: #2563eb;
    border: 2px solid #bfdbfe; padding: 16px 20px; border-radius: 12px;
    font-size: 16px; font-weight: 500; cursor: pointer; transition: 0.2s;
    display: flex; justify-content: space-between; align-items: center;
}
.option-btn:active { transform: scale(0.98); background: #eff6ff; border-color: #2563eb; }

.time-grid-container { width: 100%; animation: fadeIn 0.3s ease; }
.time-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%;
    max-height: 220px; overflow-y: auto; padding-bottom: 2px;
}
.time-grid::-webkit-scrollbar { width: 4px; }
.time-grid::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 10px; }
.time-btn {
    background: #ffffff; color: #2563eb; border: 2px solid #bfdbfe;
    padding: 14px 0; border-radius: 10px; font-size: 16px; font-weight: 600;
    cursor: pointer; text-align: center; transition: 0.2s;
}
.time-btn:active { transform: scale(0.95); background: #eff6ff; border-color: #2563eb; }
.back-btn {
    margin-top: 12px; background: #f3f4f6; color: #4b5563;
    border: 1px solid #d1d5db; justify-content: center;
}
.back-btn:active { background: #e5e7eb; }

.summary-card {
    background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 12px;
    padding: 20px; margin-top: 4px;
}
.summary-card h3 { margin-bottom: 16px; font-size: 18px; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; }
.summary-item { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.summary-item .label { color: #64748b; font-weight: 500; }
.summary-item .value { color: #0f172a; font-weight: 600; text-align: right; }

.confirm-btn {
    width: 100%; background: #10b981; color: white; border: none; padding: 16px;
    border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer;
    margin-top: 16px; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.confirm-btn:active { transform: scale(0.98); background: #059669; }
.confirm-btn svg { width: 24px; fill: currentColor; }

.typing-indicator { display: flex; gap: 6px; padding: 8px 4px; }
.typing-indicator span {
    width: 8px; height: 8px; background: #9ca3af; border-radius: 50%;
    animation: typing 1s infinite alternate;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0% { transform: translateY(0); opacity: 0.5; } 100% { transform: translateY(-4px); opacity: 1; } }

.whatsapp-link { color: #2563eb; text-decoration: underline; font-weight: 500; padding: 8px 0; display: inline-block; }


/* --- DESKTOP PREMIUM MODE SWITCH --- */
@media (min-width: 900px) {
    body { background-color: transparent; }
    
    .desktop-bg { display: block; }

    .app-wrapper {
        max-width: 1100px;
        gap: 80px;
        padding: 40px;
    }

    .desktop-presentation {
        display: flex;
        flex: 1;
        flex-direction: column;
        color: white;
        animation: slideRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideRight {
        from { opacity: 0; transform: translateX(-30px); }
        to { opacity: 1; transform: translateX(0); }
    }

    .presentation-content .badge {
        background: rgba(16, 185, 129, 0.15); /* Greenish */
        color: #10b981;
        padding: 8px 16px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 600;
        display: inline-block;
        margin-bottom: 24px;
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .presentation-content h1 {
        font-size: 56px;
        font-weight: 800;
        margin-bottom: 24px;
        line-height: 1.1;
        letter-spacing: -1px;
    }

    .presentation-content p {
        font-size: 18px;
        color: #9ca3af;
        margin-bottom: 48px;
        line-height: 1.6;
        max-width: 400px;
    }

    .feature-item {
        display: flex;
        align-items: center;
        gap: 20px;
        margin-bottom: 32px;
        background: rgba(255,255,255,0.03);
        padding: 20px;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.05);
    }

    .feature-item .icon {
        font-size: 28px;
        background: rgba(255,255,255,0.1);
        width: 56px; height: 56px;
        display: flex; align-items: center; justify-content: center;
        border-radius: 16px;
    }
    
    .feature-item strong {
        display: block;
        font-size: 18px;
        color: white;
        margin-bottom: 4px;
    }
    
    .feature-item span {
        font-size: 14px;
        color: #9ca3af;
    }

    /* Transform Chat Container into a Premium Phone Frame */
    .chat-container {
        height: 700px !important;
        max-width: 400px !important;
        border-radius: 32px !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
        border: 10px solid #1f2937; /* Mock phone frame */
        overflow: hidden;
        animation: scaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes scaleUp {
        from { opacity: 0; transform: scale(0.95) translateY(20px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }
}
