@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-image: url('chatback.jpg');
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255,255,255,0.1) 2px, transparent 0),
        radial-gradient(circle at 75px 75px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 100px 100px;
    z-index: -1;
    pointer-events: none;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

.chatbot-toggler {
    position: fixed;
    right: 40px;
    bottom: 15px;
    height: 60px;
    width: 60px;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    cursor: pointer;
    background: 
    linear-gradient(135deg, #720801 0%, #642500 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 
    0 0 10px rgba(251, 255, 26, 0.8),
    0 0 20px rgba(221, 234, 102, 0.6),
    0 8px 32px rgba(255, 203, 31, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(255, 255, 255, 0.1);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.3);

}

.chatbot-toggler:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(241, 139, 22, 0.6),
        0 6px 20px rgba(0, 0, 0, 0.3);
}

.chatbot-toggler span {
    position: absolute;
    transition: all 0.5s ease;
    font-size: 1.4rem;
}

.show-chatbot .chatbot-toggler span:first-child,
.chatbot-toggler span:last-child {
    opacity: 0;
    transform: rotate(180deg);
}

.show-chatbot .chatbot-toggler span:last-child {
    opacity: 1;
    transform: rotate(0deg);
}

.chatbot {
    position: fixed;
    right: 100px;
    bottom: 10px;
    width: 930px;
    transform: scale(0.5) translateY(20px);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    /* background:url('chatbg.jpg'); */
    backdrop-filter: blur(20px);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;  
  }

.chatbot {
    position: fixed;
    right: 100px;
    bottom: 50px;
    width: 930px;
    z-index: 2000;   /* ensure chatbot always stays on top */
}

.chatbot-toggler {
    z-index: 2001;   /* keep button above everything */
}

#background-video {
    position: absolute; /* relative to chatbot, not entire screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* behind chat content */
}




.show-chatbot .chatbot {
    transform: scale(1) translateY(0px);
    opacity: 1;
    pointer-events: auto;
}

.chatbot header {
    background: linear-gradient(135deg, rgba(51, 31, 1, 0.9) 0%, rgba(136, 78, 3, 0.9) 100%);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200000;
}

.chatbot header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    z-index: 200000;
}

.chatbot header .close-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    display: none;
    font-size: 1.3rem;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chatbot header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) rotate(90deg);
}

.chatbot .chatbox {
    height: 510px;
    overflow-y: auto;
    padding: 30px 20px 100px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

/* Custom scrollbar for chatbox */
.chatbox::-webkit-scrollbar {
    width: 6px;
}

.chatbox::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chatbox::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.chatbox::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

.chatbox .chat {
    display: flex;
    margin: 20px 0;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot .incoming {
    justify-content: flex-start;
}

.chatbot .incoming span {
    height: 36px;
    width: 36px;
    color: #fff;
    align-self: flex-end;
    background: linear-gradient(135deg, #1d0e00 0%, #491a05 100%);
    text-align: center;
    line-height: 36px;
    border-radius: 50%;
    margin: 0 12px 7px 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-size: 1.1rem;
}

.chatbot .outgoing {
    justify-content: flex-end;
}

.chatbox .chat p {
    color: #fff;
    max-width: 75%;
    font-size: 0.95rem;
    padding: 14px 18px;
    border-radius: 18px 18px 4px 18px;
    background: linear-gradient(135deg, #eaa166 0%, #3b1800 100%);
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbox .incoming p {
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chatbot .chat-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 8px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 20px 20px;
}

.chat-input textarea {
    height: 55px;
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.95rem;
    resize: none;
    padding: 16px 15px 16px 0;
    max-height: 180px;
    background: transparent;
    color: #333;
    line-height: 1.4;
}

.chat-input textarea::placeholder {
    color: #666;
    opacity: 0.8;
}

.chat-input span {
    align-self: flex-end;
    height: 55px;
    line-height: 55px;
    color: #667eea;
    font-size: 1.4rem;
    cursor: pointer;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    text-align: center;
}

.chat-input span:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.chat-input textarea:valid ~ span {
    visibility: visible;
}

/* Enhanced mobile responsiveness */
@media (max-width: 490px) {
    .chatbot {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translateY(100%);
    }

    .show-chatbot .chatbot {
        transform: translateY(0%);
    }

    .chatbot .chatbox {
        height: 90%;
        padding-bottom: 120px;
    }

    .chatbot header .close-btn {
        display: block;
    }

    .chatbot-toggler {
        right: 20px;
        bottom: 20px;
    }
}

/* Additional animations and effects */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.chatbot-toggler.pulse {
    animation: pulse 2s infinite;
}

/* Typing indicator animation */
.typing-indicator {
    display: flex;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px 18px 18px 4px;
    margin: 0;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background: #667eea;
    display: inline-block;
    margin-right: 5px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* ===== Navbar and Header Styles ===== */
.main-header {
  width: 100%;
  padding-top: 2px;
  background: linear-gradient(135deg, #0c9b64 0%, #04b7e4 100%);
  color: white;
  text-align: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #d1c4e9;
}

.hero {
  padding: 20px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ===== Responsive Navbar ===== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    padding: 10px 0;
  }

  .nav-links li {
    width: 100%;
    text-align: left;
    padding: 5px 0;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 490px) {
    .chatbot {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translateY(100%) scale(1) !important; /* reset scale */
        opacity: 1; /* ensure visibility */
        z-index: 200000;
    }

    .show-chatbot .chatbot {
        transform: translateY(0) scale(1) !important;
    }

    .chatbot .chatbox {
        height: calc(100% - 120px);
        padding-bottom: 120px;
    }
}

/* Prevent toggler from being affected by mobile transforms */
.chatbot-toggler {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 20000001 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}


/* Always pin chatbot toggler in viewport */


/* Mobile full screen chatbot */
@media (max-width: 490px) {
    .chatbot-toggler {
        position: fixed !important;
        right: 11px !important;
        bottom: 102px !important;
        z-index: 999999999 !important; /* higher than everything */
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 55px !important;
        height: 55px !important;
    }
  .chatbot {
    right: 0 !important;
    bottom: 150px !important;
    width: 90% !important;
    height: 70% !important;
    border-radius: 0 !important;
    transform: none !important;
    opacity: 0;
    pointer-events: none;
  }

  .show-chatbot .chatbot {
    opacity: 1;
    pointer-events: auto;
  }
}


