/* style.css – Webcam-Anwendung */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.5;
}

header {
    background: #0f0f0f;
    padding: 1rem 2rem;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    color: #888;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.15s;
}

nav a:hover {
    color: #fff;
    background: #222;
}

nav a.active {
    color: #fff;
    background: #2a2a2a;
}

/* ── Intervall-Selector in der Navigation ──────────────────── */
.interval-control {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.interval-control label {
    color: #888;
    cursor: pointer;
}

.interval-control select,
.filter select {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s;
}

.interval-control select:hover,
.filter select:hover {
    border-color: #666;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ── Live-Ansicht ───────────────────────────────────────────── */
.live-image {
    display: flex;
    justify-content: center;
    background: #0a0a0a;
    border-radius: 8px;
    overflow: hidden;
}

.live-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.status {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.refresh-hint {
    color: #888;
}

#interval-label {
    color: #ddd;
    font-weight: 500;
}

/* ── Historie ───────────────────────────────────────────────── */
.filter {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
    font-size: 0.95rem;
}

.filter .count {
    color: #666;
    font-size: 0.9rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.thumb {
    display: block;
    background: #0a0a0a;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s;
}

.thumb:hover {
    transform: translateY(-2px);
}

.thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.thumb span {
    display: block;
    padding: 0.5rem;
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ── Empty States ───────────────────────────────────────────── */
.empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #666;
}

.empty p {
    margin-bottom: 0.5rem;
}

.empty .hint {
    color: #555;
    font-size: 0.9rem;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    header {
        padding: 1rem;
        gap: 1rem;
    }
    .interval-control {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}
