:root {
    --primary-color: #6b5b95;
    --secondary-color: #8e7cc3;
    --accent-color: #ff6b6b;
    --light-bg: #a8e6cf;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 50%, #ffd3b6 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5em;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    padding: 0.5rem 0;
}

.navbar-brand img {
    width: 160px;
    height: auto;
    max-height: 70px;
    border-radius: 10px;
    object-fit: contain;
}

.nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px !important;
    transition: all 0.3s ease;
    margin: 0 2px;
    border-radius: 20px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.container-main {
    flex: 1;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
}

footer p {
    margin: 10px 0;
}

/* Custom Button */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ee5a6f 100%);
    border: none;
    color: white;
    padding: 15px 40px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(238, 90, 111, 0.4);
    animation: pulse 2s infinite;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ef3f3f 100%);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 20px 50px rgba(238, 90, 111, 0.6);
    animation: none;
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(238, 90, 111, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(238, 90, 111, 0.6);
    }
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: white;
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.btn-secondary-custom {
    background: var(--secondary-color);
    border: none;
    color: white;
}

.btn-secondary-custom:hover {
    background: var(--primary-color);
    color: white;
}

/* ========== Chatbot Styles ========== */
/* Chatbot Toggle Button */
#chatbot-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border: none;
    box-shadow: 0 8px 30px rgba(45, 80, 22, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9999;
    animation: chatbot-pulse 2s infinite;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(45, 80, 22, 0.6);
}

#chatbot-toggle.active {
    transform: scale(0.9);
}

.toggle-icon {
    font-size: 30px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes chatbot-pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(45, 80, 22, 0.4);
    }
    50% {
        box-shadow: 0 8px 40px rgba(45, 80, 22, 0.6);
    }
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.toggle-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
}

/* Chatbot Container */
#chatbot-container {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    animation: chatbot-appear 0.3s ease;
}

@keyframes chatbot-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chatbot Header */
#chatbot-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chatbot-header-info {
    display: flex;
    flex-direction: column;
}

.chatbot-title {
    font-weight: bold;
    font-size: 16px;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: status-blink 2s infinite;
}

@keyframes status-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chatbot Messages */
#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.chatbot-welcome {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.welcome-avatar {
    font-size: 60px;
    margin-bottom: 15px;
}

.chatbot-welcome h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.chatbot-welcome p {
    color: #666;
    margin: 0;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: message-appear 0.3s ease;
}

@keyframes message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chatbot-message.user .message-avatar {
    background: var(--accent-color);
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.5;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ee5a6f 100%);
    color: white;
    border-radius: 15px 15px 0 15px;
}

.chatbot-message.bot .message-content {
    border-radius: 15px 15px 15px 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick Replies */
#chatbot-quick-replies {
    padding: 10px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-reply-btn {
    padding: 8px 16px;
    border: 2px solid var(--secondary-color);
    background: white;
    color: var(--secondary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.quick-reply-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Chatbot Form */
#chatbot-form {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    border: 2px solid #eee;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

#chatbot-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

#chatbot-form button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#chatbot-form button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(45, 80, 22, 0.4);
}

/* Responsive Chatbot */
@media (max-width: 768px) {
    #chatbot-container {
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        bottom: 10px;
        right: 10px;
        border-radius: 15px;
    }
    
    #chatbot-toggle {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .toggle-icon {
        font-size: 26px;
    }
}