/* Marmie Travel - Main Stylesheet */

:root {
    --brand-primary: #2563eb;
    --brand-primary-dark: #1d4ed8;
    --brand-accent: #f97316;
    --brand-ink: #0f172a;
    --brand-mist: #f8fafc;
    --brand-pink: #ec4899;
    --brand-lime: #22c55e;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.12) 0%, transparent 30%),
        radial-gradient(circle at 70% 80%, rgba(249, 115, 22, 0.12) 0%, transparent 35%);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

/* Hero Section */
.hero-gradient {
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7) 0%, rgba(236, 72, 153, 0.7) 55%, rgba(249, 115, 22, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Package Cards */
.package-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* TikTok Embed Wrapper */
.tiktok-embed-wrapper {
    width: 100%;
}

.tiktok-embed-wrapper blockquote,
.tiktok-embed-wrapper .tiktok-embed {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.tiktok-embed-wrapper iframe {
    width: 100% !important;
    min-width: 100% !important;
}

.tiktok-embed-shell {
    min-height: 520px;
}

/* Video Brightness Control */
.video-brightness-shell {
    background-color: #ffffff;
    background-size: cover;
    background-position: center;
}

.video-brightness-shell video {
    filter: brightness(1.8) contrast(1.15);
    transition: filter 0.35s ease;
}

.video-brightness-shell.is-playing video {
    filter: brightness(1) contrast(1);
}

@media (max-width: 640px) {
    .tiktok-embed-shell {
        min-height: 460px;
    }
}

/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: calc(100% - 32px);
    max-width: 400px;
    height: 500px;
    background: linear-gradient(to bottom, #fef3f9, #ffffff);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.3), 0 0 0 1px rgba(236, 72, 153, 0.1);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.chat-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 640px) {
    #chatbot-container {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        height: 400px;
        max-width: none;
    }
}

#chatbot-container.active {
    display: flex;
}

#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    touch-action: manipulation;
    min-height: 56px;
    min-width: 56px;
}

@media (max-width: 640px) {
    #chat-toggle {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 16px;
        font-size: 18px;
    }
}

#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

#chat-toggle:active {
    transform: scale(0.95);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.message {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
}

@media (max-width: 640px) {
    .message-content {
        max-width: 85%;
        padding: 8px 12px;
        font-size: 14px;
    }
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.message.ai .message-content {
    background: linear-gradient(135deg, #ffeef8 0%, #f3e7f8 100%);
    color: #1f2937;
    border: 1px solid rgba(236, 72, 153, 0.1);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1);
}

.typing-indicator {
    display: none;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffeef8 0%, #f3e7f8 100%);
    border-radius: 18px;
    max-width: 70px;
    margin-left: 5px;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1);
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    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;
}

/* Animations */
@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.7);
    }
}

#chat-toggle {
    animation: pulse-glow 2s ease-in-out infinite;
}

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.fade-right {
    opacity: 0;
    transform: translateX(20px);
    animation: fadeRight 0.8s ease forwards;
}

.package-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardIn 0.8s ease forwards;
}

.package-card:nth-child(1) { animation-delay: 0.1s; }
.package-card:nth-child(2) { animation-delay: 0.2s; }
.package-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Color Utilities */
.text-purple-600 { color: var(--brand-primary) !important; }
.text-purple-100 { color: #dbeafe !important; }
.bg-purple-600 { background-color: var(--brand-primary) !important; }
.bg-purple-700 { background-color: var(--brand-primary-dark) !important; }
.bg-purple-50 { background-color: #eef2ff !important; }
.border-purple-600 { border-color: var(--brand-primary) !important; }
.hover\:bg-purple-700:hover { background-color: var(--brand-primary-dark) !important; }
.hover\:text-purple-600:hover { color: var(--brand-primary) !important; }
.hover\:bg-purple-50:hover { background-color: #eef2ff !important; }

/* Video Player Styles */
.video-player-container {
    mix-blend-mode: normal !important;
}

.video-player-container:hover {
    mix-blend-mode: normal !important;
}

.group:hover .video-player-container {
    mix-blend-mode: normal !important;
}

.video-player-container video {
    mix-blend-mode: normal !important;
    display: block !important;
    outline: none !important;
}

video {
    mix-blend-mode: normal !important;
    outline: none !important;
}

video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

video::-webkit-media-controls-panel:hover {
    background-color: rgba(0, 0, 0, 0.7) !important;
}
