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

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    min-height: 100vh;
}

/* Header */
header {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 12px 24px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #e0e0e0;
    text-decoration: none;
}

.header-subtitle {
    color: #666;
    font-size: 13px;
}

.header-link {
    color: #555;
    text-decoration: none;
    font-size: 12px;
}

.header-link:hover {
    color: #aaa;
}

.header-time {
    margin-left: auto;
    color: #666;
    font-size: 13px;
}

/* Demo banner */
.demo-banner {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    color: #8888bb;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 16px;
    border-radius: 4px;
}

/* Groups */
.camera-group {
    margin-bottom: 28px;
}

.camera-group:last-child {
    margin-bottom: 0;
}

.group-title {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #1a1a1a;
}

/* Grid */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Camera panel */
.camera-panel {
    background: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.camera-panel:hover {
    border-color: #444;
}

.camera-feed {
    aspect-ratio: 4 / 3;
    background: #0a0a0a;
    overflow: hidden;
    position: relative;
}

.refresh-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #aaa;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.camera-panel.refreshing .refresh-overlay {
    opacity: 1;
}

.camera-panel.refreshing .camera-feed img {
    filter: brightness(0.4);
    transition: filter 0.2s;
}

.camera-feed img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #1a1a1a;
}

.camera-name {
    font-size: 13px;
    color: #ccc;
}

.camera-name-link {
    font-size: 13px;
    color: #ccc;
    text-decoration: none;
}

.camera-name-link:hover {
    color: #fff;
    text-decoration: underline;
}

.snapshot-age {
    margin-left: auto;
    font-size: 11px;
    color: #555;
}

/* Status dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 6px #4ade8060;
}

.status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 6px #ef444460;
}

/* Single camera view */
.single-view {
    max-width: 960px;
    margin: 0 auto;
}

.single-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.single-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.back-link:hover {
    color: #aaa;
}

.single-feed {
    background: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.single-feed img {
    width: 100%;
    display: block;
}

.single-feed.refreshing .refresh-overlay {
    opacity: 1;
}

.single-feed.refreshing img {
    filter: brightness(0.4);
    transition: filter 0.2s;
}

.click-hint {
    text-align: center;
    color: #444;
    font-size: 11px;
    margin-top: 8px;
}

/* Reports */
.reports-view {
    max-width: 700px;
    margin: 0 auto;
}

.reports-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.reports-header h2 {
    font-size: 16px;
    font-weight: 500;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px 16px;
    text-decoration: none;
    color: #ccc;
    font-size: 14px;
    transition: border-color 0.2s;
}

.report-item:hover {
    border-color: #444;
}

.report-arrow {
    color: #555;
}

.no-reports {
    color: #555;
    font-size: 13px;
    line-height: 1.8;
}

.no-reports code {
    background: #141414;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #888;
}

/* Timeline */
.timeline-section {
    margin-top: 24px;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.timeline-date-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
}

.date-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #888;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}

.date-btn:hover:not(:disabled) {
    border-color: #555;
    color: #ccc;
}

.date-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.timeline-container {
    background: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px 14px 6px;
}

.timeline-bar {
    position: relative;
    height: 24px;
    background: #0a0a0a;
    border-radius: 3px;
    overflow: hidden;
}

.timeline-segment {
    position: absolute;
    top: 0;
    height: 100%;
    background: #ef4444;
    opacity: 0.7;
    border-radius: 1px;
    transition: opacity 0.15s;
    cursor: default;
}

.timeline-segment:hover {
    opacity: 1;
}

.timeline-now {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #4ade80;
    z-index: 2;
    display: none;
}

.timeline-hours {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: #444;
    padding: 0 1px;
}

.timeline-summary {
    margin-top: 8px;
    font-size: 12px;
    color: #555;
}
