* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gradient-start: #1C99FE;
    --gradient-middle: #7644FF;
    --gradient-end: #ba55e3;
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --gray-light: #f3f4f6;
    --gray-medium: #e5e7eb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 2.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-light);
    color: var(--text-dark);
    line-height: 1.5;
}

/* Chat Icon */

.chat-icon {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-middle));
    position: fixed;
    bottom: 11rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform 0.2s ease-in-out;
}

.chat-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 0;
    height: 0;
    background: radial-gradient( circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
}

.chat-icon:active::before {
    width: 200px;
    height: 200px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.chat-icon:hover {
    transform: scale(1.05);
}

.video-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
}

.video-carousel .video-container {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

.video-carousel::-webkit-scrollbar {
    height: 6px;
}

.video-carousel::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: var(--radius-full);
}

.video-carousel::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-full);
}

.chat-icon:hover {
    transform: scale(1.05);
    background-color: var(--primary-light);
}

.image-carousel {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    width: 100%;
    padding-top: 5px;
    max-width: 1080px;
    margin: 0 auto;
    scroll-snap-type: x mandatory;
}

.image-container {
    flex: 0 0 100%;
    scroll-snap-align: start;
    margin: 0 10px;
    position: relative;
}

.image-container img {
    width: 30%;
    height: 46%;
    object-fit: cover;
    margin-top: 1px;
    border-radius: 8px;
}

/* Make carousel responsive */

@media (max-width: 768px) {
    .video-carousel {
        max-width: 100%;
    }
    .image-container {
        margin: 0 5px;
    }
}

/* Chat Container */

.chat-container {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 24rem;
    height: 32rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    background-color: var(--white);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

/* Chat Header */

.chat-header {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-middle));
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--white);
}

#bot-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.bot-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--white);
}

.bot-status {
    font-size: 0.8rem;
    opacity: 0.8;
    color: var(--white);
}

.chat-header span:first-child {
    font-weight: 600;
    font-size: 1.1rem;
}

.close-chat {
    cursor: pointer;
    font-size: 1.5rem;
    transition: opacity 0.2s;
}

.close-chat:hover {
    opacity: 0.8;
}

/* Chat Messages */

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: var(--radius-full);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-full);
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-out;
}

.message a {
    color: inherit;
}

.bot-message a {
    color: #2563eb;
}

.user-message a {
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 10px 0;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

iframe {
    width: 100%;
    height: 100%;
    min-height: 160px;
    border: 0 none;
}

.g-recaptcha {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.grecaptcha-badge {
    visibility: hidden !important;
    display: none !important;
}

/* Adjust message styles to accommodate videos */

.message {
    max-width: 90%;
    /* Increased from 85% to give more room for videos */
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-out;
}

.bot-message .video-container {
    background-color: rgba(0, 0, 0, 0.05);
    margin: 8px 0;
}

/* Additional responsive styles for videos */

@media (max-width: 640px) {
    .video-container {
        padding-bottom: 75%;
        /* Adjusted for mobile */
    }
    .message {
        max-width: 95%;
    }
}

.user-message {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-middle));
    align-self: flex-end;
    background-color: var(--primary-color);
    color: var(--white);
    border-bottom-right-radius: var(--radius-sm);
}

.bot-message {
    align-self: flex-start;
    background-color: var(--gray-light);
    color: var(--text-dark);
    border-bottom-left-radius: var(--radius-sm);
}

.accordion {
    width: 100%;
    /* border: 1px solid #ccc; */
    border-radius: 5px;
    padding-bottom: 0.5rem;
}

.accordion-item {
    border-bottom: 1px solid #ccc;
}

.accordion-header {
    background-color: #f9f9f9;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    font-weight: bold;
    border: none;
    outline: none;
    width: 100%;
}

.accordion-content {
    padding: 10px;
    display: none;
    background-color: #fff;
}

/* Chat Input Area */

.chat-input {
    padding: 1rem;
    background-color: var(--white);
    border-top: 1px solid var(--gray-medium);
}

.response-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.response-option {
    background-color: var(--gray-light);
    border: 1px solid var(--gray-medium);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
}

.response-option:hover {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-middle));
    color: var(--white);
    border-color: var(--primary-color);
}

.input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#user-input {
    flex-grow: 1;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--gray-medium);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#user-input:focus {
    border-color: var(--primary-light);
}

#send-button {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-middle));
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#send-button:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

#clear-button {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-middle));
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.25rem;
    margin-left: 9rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#clear-button:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

#view-button {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-middle));
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

#view-button:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

/* Responsive Design */

@media (max-width: 640px) {
    .chat-icon {
        bottom: 11.5rem;
        right: 2rem;
    }
    .chat-container {
        z-index: 99999;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    .chat-header {
        padding: 1.25rem;
    }
    .response-options {
        grid-template-columns: 1fr;
    }
    .response-option {
        padding: 0.875rem;
    }
    .input-row {
        padding: 0.5rem;
    }
    #user-input {
        font-size: 1rem;
        padding: 0.875rem;
    }
    #send-button {
        padding: 0.875rem 1.25rem;
    }
    #view-button {
        padding: 0.875rem 1.25rem;
    }
}

/* Tablet Responsive */

@media (min-width: 641px) and (max-width: 1024px) {
    .chat-container {
        width: 28rem;
        height: 36rem;
        bottom: 7rem;
    }
    .response-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation for Chat Container */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-container.visible {
    animation: slideIn 0.3s ease-out forwards;
}

/* Add new styles for contact form */

.contact-form {
    display: none;
    padding: 1rem;
    background-color: var(--gray-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.contact-form.visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.contact-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-medium);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background-color: #fff;
}

.contact-form button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-middle));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.contact-form button:hover {
    opacity: 0.9;
}

.welcome-message {
    text-align: left;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(10px);
}

.welcome-message.animate {
    animation: welcomeFadeIn 0.5s ease-out forwards;
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-emoji {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.typing-indicator {
    display: inline-flex;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: var(--gray-light);
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typingBounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.clear-btn {
    padding: 8px 16px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #ff0000;
}

/* Optional: Add animation when clearing chat */

.chat-container {
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0;
}