:root {
    --primary: #0066ff;
    --background: #f9fafb;
    --border: #e5e7eb;
    --radius: 1rem;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    font-family: sans-serif;
}

header {
    padding: 1rem;
    font-weight: bold;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 75%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
    white-space: pre-wrap;
}

.chat-bubble.ai {
    background: white;
    border: 1px solid var(--border);
}

.chat-bubble.user {
    background: var(--primary);
    color: white;
    margin-left: auto;
}

.input-panel {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: white;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.chat-input button {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
}

/* ===== DIALOG ===== */

dialog {
    padding: 0;
    border: none;
    width: 100vw;
    height: 100vh;
    background: black;
}

dialog::backdrop {
    background: black;
}

dialog video {
    width: 100%;
    height: calc(100vh - 90px);
    object-fit: cover;
}

.dialog-controls {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.85);
}

.dialog-controls button {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 999px;
    border: none;
    color: white;
    cursor: pointer;
}

.primary {
    background: #0066ff;
}

.cancel {
    background: #333;
}

canvas {
    display: none;
}


.chat-toolbar {
    padding: 0.75rem 1rem 0;
    display: flex;
    align-items: center;
}

.camera-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;

    background: var(--primary);
    color: white;

    font-size: 1.2rem;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.35);
    cursor: pointer;

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.camera-circle:hover {
    transform: scale(1.05);
}

.camera-circle:active {
    transform: scale(0.95);
}


/* ===== MOBILE OPTIMIERUNG ===== */
@media (max-width: 768px) {

    body {
        height: 100dvh;
        /* besser für Mobile Browser */
    }

    header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .chat {
        padding: 0.75rem;
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    .input-panel {
        padding: 0.75rem;
    }

    .chat-input input {
        padding: 0.85rem;
        font-size: 1rem;
    }

    .chat-input button {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    /* Kamera Button größer für Daumen */
    .camera-circle {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }

    /* Dialog Controls größer */
    .dialog-controls {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .dialog-controls button {
        padding: 1.1rem;
        font-size: 1.05rem;
    }

    dialog video {
        height: calc(100dvh - 110px);
    }
}