:root { --ios-bg: #f2f2f7; --ios-card: #ffffff; --ios-text: #000000; --ios-blue: #007AFF; }
[data-bs-theme="dark"] { --ios-bg: #000000; --ios-card: #1c1c1e; --ios-text: #ffffff; }

body { font-family: -apple-system, system-ui, sans-serif; background: var(--ios-bg); color: var(--ios-text); height: 100vh; overflow: hidden; margin: 0; transition: 0.3s; }
.app-shell { max-width: 500px; width: 100%; height: 100vh; margin: auto; background: var(--ios-card); display: flex; flex-direction: column; position: relative; }

.header { padding: 15px 20px; border-bottom: 1px solid rgba(128,128,128,0.1); display: flex; justify-content: space-between; align-items: center; }
.chat-view { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; scrollbar-width: none; }
.chat-view::-webkit-scrollbar { display: none; }

.bubble { padding: 12px 16px; border-radius: 20px; font-size: 15px; max-width: 85%; line-height: 1.4; margin-bottom: 4px; }
.user { background: var(--ios-blue); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.assistant { background: rgba(128,128,128,0.12); color: var(--ios-text); align-self: flex-start; border-bottom-left-radius: 4px; }

.actions { display: flex; gap: 14px; opacity: 0; padding: 5px 10px; transition: 0.2s; align-items: center; margin-bottom: 15px; }
.assistant-wrapper:hover .actions { opacity: 0.7; }
.action-btn { cursor: pointer; font-size: 14px; }

.lang-grid { display: none; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; animation: fadeIn 0.3s; }
.lang-pill { font-size: 10px; padding: 4px; border: 1px solid var(--ios-blue); border-radius: 6px; text-align: center; cursor: pointer; color: var(--ios-blue); font-weight: 600; }
.lang-pill:hover { background: var(--ios-blue); color: white; }

.input-bar { padding: 15px 20px 30px; background: var(--ios-card); border-top: 1px solid rgba(128,128,128,0.1); }
.input-pill { background: rgba(128,128,128,0.08); border-radius: 25px; padding: 5px 15px; border: 1px solid rgba(128,128,128,0.1); }

#searchOverlay { position: absolute; inset: 0; background: var(--ios-card); z-index: 100; display: none; padding: 25px; flex-direction: column; }
.search-input { background: rgba(128,128,128,0.1); border-radius: 12px; border: none; padding: 12px 15px; width: 100%; color: var(--ios-text); outline: none; }
.result-item { padding: 12px; border-bottom: 1px solid rgba(128,128,128,0.1); font-size: 14px; cursor: pointer; }
.result-item:hover { background: rgba(0,122,255,0.05); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; } }

/* Pastikan overlay menutupi layar dengan rapi */
#searchOverlay {
    position: absolute;
    inset: 0;
    background: var(--ios-card);
    z-index: 1000;
    display: none;
    padding: 20px;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

/* Animasi muncul dari bawah */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.search-box-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    background: rgba(128,128,128,0.1);
    border-radius: 10px;
    border: none;
    padding: 10px 15px;
    width: 100%;
    color: var(--ios-text);
    outline: none;
}