body {
    margin: 0; font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1e1e2f 0%, #2a2a40 100%);
    color: white; height: 100vh; overflow: hidden; direction: rtl;
}

.wrapper { display: flex; flex-direction: column; height: 100%; max-width: 800px; margin: 0 auto; background: rgba(0,0,0,0.3); backdrop-filter: blur(10px); }

/* --- טופס חיפוש מתקדם (החדש) --- */
#dbSearchForm {
    display: none; /* מוסתר כברירת מחדל */
    background: rgba(0,0,0,0.4);
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    animation: slideUp 0.3s ease;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.search-grid input {
    margin: 0;
    text-align: right;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.search-grid input:focus {
    background: rgba(255,255,255,0.2);
    border-color: #00d2ff;
}

.full-width { grid-column: span 2; }

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- שאר העיצוב (גלריה, צ'אט וכו') --- */
.gallery-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.img-card { position: relative; width: 130px; height: 130px; border-radius: 12px; overflow: hidden; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.img-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.img-card:hover img { transform: scale(1.15); }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: 0.3s; }
.img-card:hover .overlay { opacity: 1; }
.img-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.5); color: white; text-decoration: none; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; margin-bottom:5px; }
.img-btn:hover { background: white; color: black; }

.header { padding: 15px; background: rgba(0,0,0,0.2); display: flex; justify-content: space-between; align-items: center; }
.chat-area { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 15px; border-radius: 15px; max-width: 85%; line-height: 1.4; animation: fadeIn 0.3s; word-wrap: break-word; }
.msg.user { align-self: flex-start; background: #3a3a50; border-top-right-radius: 0; }
.msg.ai { align-self: flex-end; background: rgba(0,0,0,0.4); border-top-left-radius: 0; }
.msg a { color: #4db8ff; }

/* אזור הקלדה רגיל */
#normalInputZone { padding: 15px; background: rgba(0,0,0,0.2); display: flex; gap: 10px; }
#normalInputZone input { margin: 0; text-align: right; background: rgba(255,255,255,0.9); color: black; width: 100%; padding:12px; border-radius:25px; border:none; outline:none; }
#normalInputZone button, #dbSearchButton { width: 60px; background: #4facfe; border:none; border-radius:25px; color:white; font-weight:bold; cursor:pointer; }

.typing { padding: 10px; color: #ccc; font-size: 12px; font-style: italic; }