/**
 * Manon Mentor – Frontend Styles v2
 * Dark theme · Gold/Purple · Große Schriften
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=DM+Sans:wght@300;400;500&display=swap');

.manon-app * { box-sizing: border-box; margin: 0; padding: 0; }

.manon-app {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    max-width: 720px;
    margin: 20px auto;
    background: #0d0d14;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    height: 720px;
    color: #e8e8f0;
}

/* ── HEADER ── */
.manon-header {
    background: #161622;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(201,168,76,0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.manon-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.manon-logo-circle {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #c9a84c, #7c6fc4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.manon-header h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: #c9a84c;
    margin: 0;
    line-height: 1.2;
}
.manon-header h2 span { font-style: normal; font-weight: 700; color: #e8e8f0; }

.manon-subtitle { font-size: 0.72rem; color: #64647a; }

.manon-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Stufe buttons */
.manon-stufe-switch {
    display: flex;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.manon-stufe-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #64647a;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}
.manon-stufe-btn.active { background: #c9a84c; color: #0d0d14; }
.manon-stufe-btn:hover:not(.active) { background: rgba(201,168,76,0.15); color: #c9a84c; }

/* Situation select */
.manon-situation-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 6px 12px;
    color: #e8e8f0;
    font-size: 0.82rem;
    cursor: pointer;
}
.manon-situation-select option { background: #161622; color: #e8e8f0; }

/* ── STATUS BAR ── */
.manon-status-bar {
    padding: 5px 18px;
    background: #1e1e2e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #64647a;
    flex-shrink: 0;
    min-height: 28px;
}
.manon-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #64647a;
    flex-shrink: 0;
    transition: background 0.3s;
}
.manon-status-dot.listening { background: #ef4444; animation: manonPulse2 1s infinite; }
.manon-status-dot.thinking  { background: #c9a84c; animation: manonPulse2 1.5s infinite; }
.manon-status-dot.speaking  { background: #22c55e; animation: manonPulse2 0.8s infinite; }
@keyframes manonPulse2 {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:0.4; transform:scale(1.4); }
}

/* ── CHAT ── */
.manon-chat {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}
.manon-chat::-webkit-scrollbar { width: 4px; }
.manon-chat::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* Welcome */
.manon-welcome {
    text-align: center;
    padding: 28px 20px;
    color: #64647a;
    line-height: 1.6;
}
.manon-avatar {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #c9a84c, #7c6fc4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    margin: 0 auto 14px;
}
.manon-welcome strong { color: #c9a84c; }

/* Messages */
.manon-message {
    max-width: 86%;
    padding: 13px 17px;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 1rem;
    animation: manonFadeIn 0.25s ease;
    word-wrap: break-word;
}
@keyframes manonFadeIn {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}
.manon-message.user {
    align-self: flex-end;
    background: #7c6fc4;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.manon-message.assistant {
    align-self: flex-start;
    background: #1e1e2e;
    border-left: 3px solid #c9a84c;
    border-bottom-left-radius: 4px;
    color: #e8e8f0;
}
.manon-msg-label {
    font-size: 0.72rem;
    color: #c9a84c;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}
/* DE Wort Klammern */
.manon-de-word { color: #94a3b8; }

/* Typing */
.manon-typing {
    display: flex; gap: 5px; padding: 13px 17px;
    align-self: flex-start;
    background: #1e1e2e;
    border-left: 3px solid #c9a84c;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}
.manon-typing span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #c9a84c;
    animation: manonBounce 1.4s infinite ease-in-out;
}
.manon-typing span:nth-child(2) { animation-delay:.2s; }
.manon-typing span:nth-child(3) { animation-delay:.4s; }
@keyframes manonBounce {
    0%,80%,100% { transform:scale(0.6); opacity:.4; }
    40%          { transform:scale(1); opacity:1; }
}

/* Error */
.manon-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 11px 15px;
    border-radius: 12px;
    font-size: 0.88rem;
}

/* Live transcript */
.manon-live-transcript {
    padding: 5px 18px;
    font-size: 0.8rem;
    color: #64647a;
    font-style: italic;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.04);
    min-height: 26px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── INPUT ── */
.manon-input-area {
    padding: 12px 16px 16px;
    background: #161622;
    border-top: 1px solid rgba(201,168,76,0.2);
    flex-shrink: 0;
}
.manon-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.manon-text-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 11px 18px;
    color: #e8e8f0;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.manon-text-input:focus { border-color: #7c6fc4; }
.manon-text-input::placeholder { color: #3d3d52; }

.manon-mic-btn, .manon-send-btn {
    border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.manon-mic-btn {
    width: 50px; height: 50px;
    background: #3d3d52;
    color: #e8e8f0;
}
.manon-mic-btn.recording {
    background: #ef4444;
    animation: manonMicPulse 1.5s infinite;
}
.manon-mic-btn.dauermic {
    background: #c9a84c;
    box-shadow: 0 0 0 6px rgba(201,168,76,0.2);
}
@keyframes manonMicPulse {
    0%,100% { box-shadow:0 0 0 0 rgba(239,68,68,0.4); }
    50%      { box-shadow:0 0 0 14px rgba(239,68,68,0); }
}
.manon-send-btn {
    width: 44px; height: 44px;
    background: #7c6fc4;
    color: #fff;
}
.manon-send-btn:hover { transform: scale(1.06); }
.manon-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.manon-input-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 4px;
}

/* Toggle */
.manon-toggle {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 0.8rem; color: #64647a; user-select: none;
}
.manon-toggle input { display: none; }
.manon-toggle-slider {
    width: 36px; height: 20px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px; position: relative;
    transition: background 0.2s;
}
.manon-toggle-slider::after {
    content: '';
    width: 14px; height: 14px;
    background: #64647a;
    border-radius: 50%;
    position: absolute; top: 3px; left: 3px;
    transition: all 0.2s;
}
.manon-toggle input:checked + .manon-toggle-slider { background: rgba(201,168,76,0.4); }
.manon-toggle input:checked + .manon-toggle-slider::after { left: 19px; background: #c9a84c; }

.manon-clear-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: #64647a;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}
.manon-clear-btn:hover { border-color: #ef4444; color: #ef4444; }

/* Mobile */
@media (max-width: 640px) {
    .manon-app { margin: 0; border-radius: 0; height: 100svh; max-width: 100%; }
    .manon-header { padding: 11px 14px; }
    .manon-controls { width: 100%; justify-content: space-between; }
    .manon-message { max-width: 93%; font-size: 1.05rem; }
}

/* ── V3 Message Struktur ── */
.manon-msg-fr {
    display: block;
    color: #e8e8f0;
    line-height: 1.6;
}
.manon-msg-de {
    display: block;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8;
    font-size: 0.88em;
    line-height: 1.5;
}
.manon-de-label {
    font-size: 0.85em;
}
