* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    cursor: pointer;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hamburger-icon {
    width: 25px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #2d3748;
    transition: all 0.3s ease;
}

.menu-dropdown {
    position: fixed;
    top: 70px;
    left: 20px;
    background: white;
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.menu-dropdown a {
    display: block;
    padding: 12px 25px;
    color: #2d3748;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.menu-dropdown a:hover {
    background: #f8f9fa;
    color: #667eea;
}

body {
    padding: 10px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 95%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    height: 95vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    animation: fadeInDown 0.8s ease;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 5px;
    border-radius: 50%;
    background: #f8f9fa;
    padding: 12px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header h1 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.header p {
    color: #718096;
    font-size: 16px;
}

.chat-box {
    flex: 1;
    padding: 25px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.message {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 15px;
    max-width: 85%;
    position: relative;
    animation: fadeIn 0.5s ease;
    line-height: 1.5;
}

.user-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.ai-message {
    background: white;
    color: #2d3748;
    margin-right: auto;
}

/* Loading dots animation */
/* Update the loading dots styles */
.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px;
    min-width: 60px;
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #667eea;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { 
    animation-delay: -0.32s; 
}

.loading-dots span:nth-child(2) { 
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 100% { 
        transform: scale(0);
    }
    50% { 
        transform: scale(1);
    }
}

/* Pastikan AI message yang berisi loading dots memiliki style yang tepat */
.ai-message .loading-dots {
    margin: 0;
    background: transparent;
}

/* Update AI message to properly contain loading animation */
.ai-message {
    background: white;
    color: #2d3748;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    min-width: 80px;
}

/* Styling untuk elemen HTML dalam pesan AI */
.ai-message ul, .ai-message ol {
    padding-left: 25px;
    margin: 15px 0;
}

.ai-message li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.ai-message a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.ai-message a:hover {
    color: #764ba2;
}

.input-container {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    bottom: 0;
    margin-top: 20px;
    width: 100%;
}

#userInput {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    background: #f8f9fa;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#userInput:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    .header h1 {
        font-size: 24px;
    }

    .chat-box {
        padding: 15px;
        height: calc(100vh - 250px);
    }

    .message {
        padding: 12px 15px;
        max-width: 90%;
    }

    button {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        width: 98%;
        height: 98vh;
        padding: 10px;
        margin: 5px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header {
        padding: 15px;
        margin-bottom: 15px;
    }

    .chat-box {
        padding: 15px;
    }

    .input-container {
        padding: 10px;
    }

    #userInput {
        padding: 12px;
    }

    button {
        padding: 12px 15px;
        font-size: 14px;
    }
}

