/* Markdown Styling Shared by .alert and .chat-message.bot .bubble */
.alert .markdown-content h2,
.chat-message.bot .bubble h2 {
    font-size: 1.2rem;
    margin: 0.5rem 0 1rem;
}

.alert .markdown-content h3,
.chat-message.bot .bubble h3 {
    font-size: 1rem;
    margin: 0.4rem 0 0.8rem;
}

.alert .markdown-content p,
.chat-message.bot .bubble p {
    margin: 0.3rem 0 0.5rem;
}

.alert .markdown-content ul,
.alert .markdown-content ol,
.chat-message.bot .bubble ul,
.chat-message.bot .bubble ol {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    margin-top: 0.3rem;
}

.alert .markdown-content li,
.chat-message.bot .bubble li {
    margin-bottom: 0.3rem;
}

/* Specific Styles for Bot Bubble */
.chat-message.bot .bubble {
    white-space: normal;
    word-wrap: break-word;
}

/* Button-specific font family */
.btnthem, .install {
    font-family: 'Open Sans', sans-serif;
}

/* CSS Variables */
:root {
    --primary: #2dabf9;
    --secondary: #00dc58;
    --dark: #2e3842;
    --light: #f8fafc;
    --white: #fff;
    --text-dark: #343541;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 10px;
}

/* Global Styles */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--light);
    line-height: 1.6;
    margin: 0;
}

h1, h2, h3, h4 {
    font-family: sans-serif;
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary);
}

.container {
    padding: 0 15px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(45, 171, 249, 0.8), rgba(0, 220, 88, 0.8)), url('https://soyes.org/g6pd.jpg') center/cover no-repeat;
    height: 25vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero-section .btn {
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Button */
.btn-custom {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-custom:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Form and Input */
.form-control {
    border: 2px solid #dadce0;
    border-radius: var(--border-radius);
    padding: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: none;
    outline: none;
}

/* Card */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* QR Image */
.qr-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Chatbot Styles */
.chat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 90%;
    max-width: 350px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: none;
    z-index: 1000;
}

.chat-header {
    background: var(--primary);
    color: var(--white);
    padding: 12px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.chat-header .close-btn {
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s;
}

.chat-header .close-btn:hover {
    color: #ff4444;
}

.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: var(--light);
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.bot {
    align-items: flex-start;
}

.chat-message .bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.user .bubble {
    background: #d1e7dd;
    color: var(--text-dark);
}

.chat-message.bot .bubble {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid #e0e0e0;
}

.chat-message.bot .image-link {
    margin-top: 5px;
    font-size: 12px;
    color: var(--primary);
}

.chat-input-container {
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #dadcde;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 8px;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: var(--primary);
    outline: none;
}

.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: move;
    transition: transform 0.3s;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-popup {
    position: absolute;
    bottom: 70px;
    right: 10px;
    background: var(--dark);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    z-index: 1001;
}

.chat-toggle-btn:hover .chat-popup,
.chat-toggle-btn.active .chat-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 10px;
    border: 6px solid transparent;
    border-top-color: var(--dark);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    font-size: 14px;
    padding: 2rem 0;
}

.footer a {
    color: var(--white);
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Responsive */
@media (max-width: 576px) {
    .hero-section {
        height: 25vh;
        min-height: 300px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .chat-widget {
        max-width: 100%;
        bottom: 70px;
        right: 10px;
        left: 10px;
    }

    .chat-messages {
        max-height: 250px;
    }

    .chat-input {
        font-size: 13px;
    }

    .chat-popup {
        right: 10px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .qr-img {
        max-width: 200px;
    }
}
