body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #1f2937 0%,
        #374151 15%,
        #1e40af 30%,
        #3b82f6 45%,
        #60a5fa 60%,
        #2563eb 75%,
        #374151 90%,
        #1f2937 100%
    );
    background-size: 300% 300%;
    animation: gradientShift 15s ease-in-out infinite;
    z-index: -1;
    opacity: 0.25;
}

.hero-gradient {
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.1), transparent 40%);
}

.chat-bubble {
    animation: pop-in 0.5s ease-out forwards;
}

@keyframes pop-in {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Scroll container with edge gradient fade */
.scroll-container-wrapper {
    position: relative;
}

@media (max-width: 768px) {
    /* Hide the browser's scrollbar */
    #brand-scroll {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    #brand-scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    /* Dynamic scroll gradients */
    .scroll-container-wrapper::before,
    .scroll-container-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 10;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    /* Left gradient */
    .scroll-container-wrapper::before {
        left: 0;
        background: linear-gradient(to right, rgba(17, 24, 39, 1), transparent);
    }

    /* Right gradient */
    .scroll-container-wrapper::after {
        right: 0;
        background: linear-gradient(to left, rgba(17, 24, 39, 1), transparent);
    }

    /* Show gradients based on scroll position */
    .scroll-container-wrapper.has-left-content::before {
        opacity: 1;
    }

    .scroll-container-wrapper.has-right-content::after {
        opacity: 1;
    }

}

/* Custom scroll indicator bar */
.scroll-indicator-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.scroll-indicator-track {
    width: 100px;
    height: 3px;
    background-color: rgba(75, 85, 99, 0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.scroll-indicator-bar {
    height: 100%;
    background-color: rgba(96, 165, 250, 0.8);
    border-radius: 2px;
    transition: transform 0.1s ease-out;
}

/* Mobile menu styles */
#mobile-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#mobile-menu nav a {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

#mobile-menu nav a:nth-child(1) {
    animation-delay: 0.1s;
}

#mobile-menu nav a:nth-child(2) {
    animation-delay: 0.2s;
}

#mobile-menu nav a:nth-child(3) {
    animation-delay: 0.3s;
}

#mobile-menu nav a:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger button hover effect */
#mobile-menu-button {
    transition: transform 0.2s ease;
}

#mobile-menu-button:active {
    transform: scale(0.9);
}

/* Booking button enhancements */
.booking-button {
    position: relative;
    overflow: hidden;
}

.booking-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.booking-button:hover::before {
    left: 100%;
}

.booking-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.booking-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Chat bubble styles with tails */
.chat-bubble {
    position: relative;
    word-wrap: break-word;
    border-radius: 18px;
}

.chat-bubble .timestamp {
    position: absolute;
    top: 16px;
    font-size: 11px;
    opacity: 0.7;
    font-weight: 400;
    line-height: 1.25;
}

.chat-bubble.m33-message .timestamp {
    color: #6b7280;
    right: 16px;
}

.chat-bubble.user-message .timestamp {
    color: rgba(255, 255, 255, 0.8);
    right: 16px;
}

/* M33 messages (left-aligned with left tail) */
.chat-bubble.m33-message {
    background: linear-gradient(135deg, #d8e3fb 0%, #c7d6f7 100%);
    color: #1f2937;
    margin-right: auto;
    max-width: 85%;
    margin-left: 8px;
}

.chat-bubble.m33-message::before {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 11px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: #c7d6f7;
    border-left: none;
}

/* User messages (right-aligned with right tail) */
.chat-bubble.user-message {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    margin-left: auto;
    max-width: 85%;
    margin-right: 8px;
}

.chat-bubble.user-message::before {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 11px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-left-color: #1d4ed8;
    border-right: none;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .chat-bubble.m33-message,
    .chat-bubble.user-message {
        max-width: 36rem;
    }
}
