/* Modern Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    z-index: -1;
    opacity: 0.2;
}

/* Header / Hero Section */
header {
    background: linear-gradient(135deg, #0f9b0f, #005c00);
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10.5%);
    background-size: 20px 20px;
    transform: rotate(30deg);
    animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
    0% { transform: rotate(30deg) translateY(0); }
    100% { transform: rotate(30deg) translateY(-100px); }
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.cta-btn {
    display: inline-block;
    background: #fff;
    color: #005c00;
    padding: 15px 40px;
    margin-top: 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: #fdfdfd;
}

/* Features Section */
.container {
    max-width: 1200px;
    margin: -50px auto 50px; /* Overlap header */
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #0f9b0f, #84fab0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

/* Chat Widget - Glassmorphism */
#chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: bottom right;
    border: 1px solid rgba(255,255,255,0.5);
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}

#chat-widget.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

#chat-header {
    background: linear-gradient(135deg, #0f9b0f, #005c00);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.header-info {
    display: flex;
    align-items: center;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 20px;
    color: #0f9b0f;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.header-text span {
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
}

.header-text span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    margin-right: 5px;
    box-shadow: 0 0 5px #00ff00;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    opacity: 0.8;
}

#close-chat:hover {
    transform: rotate(90deg);
    opacity: 1;
}

#chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
    scroll-behavior: smooth;
}

/* Scrollbar styling */
#chat-body::-webkit-scrollbar {
    width: 6px;
}
#chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}
#chat-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.message {
    max-width: 80%;
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.message.bot {
    background: #fff;
    color: #444;
    border-bottom-left-radius: 4px;
    margin-right: auto;
}

.message.user {
    background: #0f9b0f;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

#chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
}

#chat-input {
    flex: 1;
    background: #f0f2f5;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    transition: background 0.2s;
}

#chat-input:focus {
    background: #e4e6eb;
}

#send-btn {
    background: linear-gradient(135deg, #0f9b0f, #005c00);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 155, 15, 0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-btn:hover {
    transform: scale(1.1);
}

/* FAB */
#chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #0f9b0f, #005c00);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(15, 155, 15, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-fab:hover {
    transform: scale(1.1) rotate(-10deg);
}

#chat-fab .notification-dot {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 15px;
    height: 15px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* Typing Indicator */
.typing-indicator {
    padding: 10px 15px;
    background: #fff;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.typing-dot {
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background: #bbb;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Footer Credit */
.bot-footer {
    text-align: center;
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 5px;
    padding-bottom: 10px;
}
