*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0d0d0f;
    --surface:   #161618;
    --border:    #2a2a2e;
    --accent:    #e8c97e;
    --accent2:   #7eb8e8;
    --text:      #e8e4dc;
    --muted:     #7a7870;
    --user-bg:   #1e1e22;
    --bot-bg:    #131315;
    --radius:    12px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-weight: 300;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
}
header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}
header h1 span { color: var(--accent); font-style: italic; }
#btn-reset {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all .2s;
}
#btn-reset:hover { border-color: var(--accent); color: var(--accent); }

/* ── Chat area ── */
#chat {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

/* ── Bubbles ── */
.bubble {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    line-height: 1.65;
    font-size: 0.95rem;
    animation: fadeUp .3s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bubble.user {
    align-self: flex-end;
    background: var(--user-bg);
    border: 1px solid var(--border);
    color: var(--text);
}
.bubble.bot {
    align-self: flex-start;
    background: var(--bot-bg);
    border: 1px solid var(--border);
    color: var(--text);
}
.bubble.bot .intro {
    margin-bottom: 1.25rem;
    color: var(--text);
}
.bubble.bot .follow-up {
    margin-top: 1.25rem;
    color: var(--accent);
    font-style: italic;
    font-size: 1rem;
}

/* ── Movie cards ── */
.movie-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.movie-card {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s, transform .15s;
}
.movie-card:hover {
    border-color: var(--accent);
    transform: translateX(3px);
}
.movie-card img {
    width: 70px;
    height: 105px;
    object-fit: cover;
    flex-shrink: 0;
}
.movie-card .no-poster {
    width: 70px;
    height: 105px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    color: var(--muted);
}
.movie-card .info {
    padding: 0.75rem 0.75rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.movie-card .info .title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.movie-card .info .title-de {
    font-size: 0.78rem;
    color: var(--muted);
}
.movie-card .info .meta {
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}
.movie-card .info .meta .rating { color: var(--accent); }
.movie-card .info .mood {
    font-size: 0.82rem;
    color: var(--text);
    opacity: 0.7;
    margin-top: 0.3rem;
    line-height: 1.4;
}
.movie-card .info .genres {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}
.movie-card .info .genre-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
}

/* ── Availability badge ── */
.avail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    margin-top: 0.75rem;
}
.avail-badge.yes { background: rgba(100,200,120,.12); color: #6dc87a; border: 1px solid rgba(100,200,120,.25); }
.avail-badge.no  { background: rgba(200,100,100,.12); color: #c87070; border: 1px solid rgba(200,100,100,.25); }

/* ── Typing indicator ── */
.typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 0.75rem 1rem;
    align-self: flex-start;
}
.typing span {
    width: 7px; height: 7px;
    background: var(--muted);
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* ── Input bar ── */
#input-bar {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    bottom: 0;
}
#input-wrap {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
}
#input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color .2s;
}
#input::placeholder { color: var(--muted); }
#input:focus { border-color: var(--accent); }
#btn-send {
    background: var(--accent);
    color: #0d0d0f;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity .2s;
}
#btn-send:hover { opacity: .85; }
#btn-send:disabled { opacity: .4; cursor: not-allowed; }