/* Gaya Umum untuk seluruh body */
:root {
    --bg-dark: #121212;
    --fg-light: #ffffff;
    --chat-bubble-user: #4CAF50;
    --chat-bubble-ai: #2c2c2e;
    --input-bg: #222224;
    --header-bg: #1e1e1e;
    --icon-color: #ffffff;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--fg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 400px;
    height: 800px;
    background-color: var(--bg-dark);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Responsivitas untuk mobile */
@media (max-width: 768px) {
    body {
        min-height: 100vh;
        align-items: flex-end;
        justify-content: center;
    }
    .chat-container {
        width: 100%;
        max-width: none;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    .fullscreen-icon {
        display: none;
    }
}

/* Gaya untuk mode layar penuh */
.chat-container.fullscreen {
    width: 100% !important;
    height: 100% !important;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.chat-container.fullscreen .chat-area {
    padding-bottom: 70px;
}

.chat-container.fullscreen .chat-input {
    position: fixed;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    left: 0;
    z-index: 1001;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--header-bg);
    color: var(--fg-light);
    font-size: 1.2em;
}

.chat-header .material-icons {
    font-size: 28px;
    color: var(--icon-color);
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.chat-header .material-icons:active {
    transform: scale(0.9);
}

.header-title {
    font-weight: bold;
}

/* Gaya ikon clear chat */
.clear-chat-icon {
    font-size: 24px;
    color: var(--icon-color);
    cursor: pointer;
    margin-right: 10px;
}

/* Area Chat */
.chat-area {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Chat Bubble */
.message {
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.9em;
    animation: fadeIn 0.3s ease-in-out;
}

.message.user {
    align-self: flex-end;
    background-color: var(--chat-bubble-user);
    color: var(--fg-light);
    border-bottom-right-radius: 5px;
}

.message.ai {
    align-self: flex-start;
    background-color: var(--chat-bubble-ai);
    color: var(--fg-light);
    border-bottom-left-radius: 5px;
}

.message-date {
    font-size: 0.7em;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

/* Area Input */
.chat-input {
    display: flex;
    padding: 10px 20px;
    background-color: var(--input-bg);
    align-items: center;
}

#user-input {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 25px;
    background-color: #333336;
    color: var(--fg-light);
    font-size: 1em;
    outline: none;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.send-button {
    background-color: var(--chat-bubble-user);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.send-button:hover {
    background-color: #388e3c;
}

.send-button:active {
    transform: scale(0.9);
}

.send-button .material-icons {
    color: var(--fg-light);
    font-size: 24px;
}

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