*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.logo-bar { text-align: center; margin-bottom: 24px; }
.logo-bar .logo { height: 80px; width: auto; }
.header { background: #fff; border-radius: 8px; padding: 16px 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; align-items: baseline; justify-content: center; gap: 0; flex-wrap: wrap; }
.header .plate { font-size: 1.25rem; font-weight: 700; color: #1976d2; }
.header .vehicle { font-size: .95rem; color: #555; }
.header .meta-inline { font-size: .85rem; color: #777; }
.header .sep { margin: 0 10px; color: #ccc; font-size: .9rem; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; border: 1px solid #90caf9; color: #1976d2; font-size: .75rem; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: box-shadow .2s; cursor: pointer; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #e0e0e0; }
.card .info { padding: 8px 12px; font-size: .75rem; color: #666; display: flex; justify-content: space-between; }
.card .play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 3rem; color: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); pointer-events: none; }
.card .thumb-wrap { position: relative; }
.expire-notice { text-align: center; color: #999; font-size: .8rem; margin-top: 24px; }
.error-box, .loading-box { text-align: center; padding: 60px 20px; }
.error-box h2 { color: #d32f2f; margin-bottom: 8px; }
.error-box p { color: #666; }
.loading-box .spinner { width: 40px; height: 40px; border: 4px solid #e0e0e0; border-top-color: #1976d2; border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none; }
.lightbox-video { max-width: 95vw; max-height: 85vh; }
.video-placeholder { display: flex; align-items: center; justify-content: center; background: #2a2a2a; color: #fff; }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 1000; align-items: center; justify-content: center; flex-direction: column; }
.lightbox.active { display: flex; }
.lightbox img, .lightbox video { max-width: 95vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.lightbox .close-btn { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; z-index: 1001; }
.lightbox .nav-btn { position: absolute; top: 50%; color: #fff; font-size: 2.5rem; cursor: pointer; background: rgba(0,0,0,.3); border: none; padding: 8px 16px; border-radius: 4px; transform: translateY(-50%); z-index: 1001; }
.lightbox .nav-btn.prev { left: 12px; }
.lightbox .nav-btn.next { right: 12px; }
.lightbox .download-btn { margin-top: 12px; color: #fff; background: #1976d2; border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; font-size: .9rem; text-decoration: none; }
.lightbox .download-btn:hover { background: #1565c0; }

@media (max-width: 600px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
    .header { padding: 16px; }
    .meta { gap: 12px; }
}
