/* __version__ = "1.3.0" */

:root {
    --bg-waiting: #2c3e50;
    --bg-analyzing: #f1c40f;
    --bg-danger: #e74c3c;
    --bg-safe: #2ecc71;
    --text-color: #ecf0f1;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: 80px;
    padding-left: 10px;
    padding-right: 10px;
    transition: background-color 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

body.status-waiting { background-color: var(--bg-waiting); color: white; }
body.status-analyzing { background-color: var(--bg-analyzing); color: black; }
body.status-danger { background-color: var(--bg-danger); color: white; }
body.status-safe { background-color: var(--bg-safe); color: black; }

.container {
    width: 100%;
    max-width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 1.5rem;
    margin: 20px 0 15px 0;
}

/* KONTROLLE DES VIDEO CONTAINERS */
#reader-container {
    position: relative;
    width: 100%;
    height: 60vh;
    background: black;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#reader {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* DAS CSS VIERECK (Overlay) - JETZT GRÖSSER */
#scan-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;

    /* Größe: JETZT 80% der Breite, max 350px */
    width: 80vw;
    height: 80vw;
    max-width: 350px;
    max-height: 350px;

    border: 4px solid rgba(241, 196, 15, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 0 4000px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Animation bei Analyse */
.analyzing-border #scan-overlay {
    border-color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.version-info {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

.status-message {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.hidden { display: none; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.btn.secondary { background-color: #95a5a6; color: white; }
#action-btn { background-color: #3498db; color: white; }

.result-box {
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.type-badge {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}
