body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#chat-container {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
}

.user-message {
    text-align: right;
    margin-left: 20%;
}

.assistant-message {
    text-align: left;
    margin-right: 20%;
}

#user-input {
    border-radius: 20px;
    padding: 10px 15px;
}

#send-btn {
    border-radius: 20px;
    padding: 10px 20px;
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Tambahkan ini ke file CSS */
.typing-dots {
    display: inline-flex;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #6c757d;
    border-radius: 50%;
    display: inline-block;
    animation: typing-dots 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-dots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Perbaikan tampilan pesan */
.user-message {
    text-align: right;
    margin-left: 20%;
    border-bottom-right-radius: 0 !important;
}

.assistant-message {
    text-align: left;
    margin-right: 20%;
    border-bottom-left-radius: 0 !important;
}

.assistant-message strong {
    color: #fff;
}

/* Footer Styles */
.footer {
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
    position: static; /* Ubah dari fixed ke static */
    margin-top: 2rem;
}

/* Main Container */
.container.main-container {
    padding-bottom: 80px; /* Beri ruang di bagian bawah */
    min-height: calc(100vh - 120px); /* Sesuaikan tinggi minimum */
}

/* Chat Container */
#chat-container {
    height: 60vh; /* Gunakan viewport height */
    overflow-y: auto;
    margin-bottom: 1rem;
}

/* Input Group */
.input-group {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 10px 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* Style dasar untuk chat */
#chat-container {
    height: 60vh;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 15px;
}

.message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
}

.user-message {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.assistant-message {
    background: #f1f1f1;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

/* Typing indicator */
.typing-dots {
    display: inline-flex;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input area */
.input-group {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 10px 0;
    z-index: 100;
}

:root {
    --primary-color: #2c5fa8;
    --secondary-color: #4a89dc;
    --accent-color: #ff6b6b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #40c057;
    --warning-color: #fcc419;
}

.chat-app-container {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 90vh;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 15px 20px;
    color: white;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.brand-logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 50%;
    border: 2px solid white;
}

.header-text h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.header-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.welcome-message {
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

.welcome-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.welcome-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.welcome-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.features-list li {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.features-list i {
    margin-right: 8px;
    color: var(--primary-color);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f7fb;
    background-image: url('assets/img/bg-pattern.png');
    background-blend-mode: overlay;
    background-size: 300px;
    opacity: 0.95;
}

.message {
    max-width: 80%;
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: fadeInUp 0.3s ease-out;
    line-height: 1.5;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-message {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.assistant-message {
    background: white;
    color: var(--dark-color);
    margin-right: auto;
    border-bottom-left-radius: 5px;
    border: 1px solid #e9ecef;
}

.message-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.input-group {
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-control {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    box-shadow: none;
}

.btn-send, .btn-mic {
    border: none;
    background: var(--primary-color);
    color: white;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover, .btn-mic:hover {
    background: var(--secondary-color);
}

.btn-mic {
    background: #f8f9fa;
    color: var(--dark-color);
}

.disclaimer-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #6c757d;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 18px;
    margin-bottom: 15px;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.typing-dots {
    display: flex;
    margin-left: 8px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #6c757d;
    border-radius: 50%;
    margin: 0 3px;
    animation: bounce 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 bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-app-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .message {
        max-width: 90%;
    }
}


.welcome-message {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.welcome-message.hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}