:root {
  --bg: #0b0f17;
  --bg2: #131927;
  --bg3: #1b2335;
  --fg: #e7ecf3;
  --muted: #95a3b9;
  --accent: #ff5a36;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --br: 10px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header { background: var(--bg2); border-bottom: 1px solid #1f2740; position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.logo { font-weight: 800; font-size: 20px; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { font-size: 14px; color: var(--muted); }
.site-header nav a:hover { color: var(--fg); }

/* Hero */
.hero { padding: 30px 0 18px; }
.hero h1 { margin: 0 0 6px; font-size: 32px; }
.hero .lead { margin: 0; color: var(--muted); font-size: 15px; }

/* Category chips */
.cat-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0; overflow-x: auto; }
.cat-chip { background: var(--bg2); border: 1px solid #2a334a; padding: 8px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; transition: all .2s; }
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 6px 0 40px; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.card { background: var(--bg2); border: 1px solid #1f2740; border-radius: var(--br); overflow: hidden; transition: transform .15s, border-color .2s; display: block; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.thumb { position: relative; aspect-ratio: 16/9; background: var(--bg3); display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { font-size: 48px; opacity: .25; }
.status { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; background: #00000099; }
.status-online { background: #064e3b; color: #6ee7b7; }
.status-offline { background: #7f1d1d; color: #fca5a5; }
.status-checking { background: #78350f; color: #fcd34d; }
.badge-featured { position: absolute; top: 8px; right: 8px; font-size: 16px; }
.card-body { padding: 12px 14px; }
.card-body h3 { margin: 0 0 4px; font-size: 15px; }
.meta { margin: 0; font-size: 12px; color: var(--muted); }
.views { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Camera detail */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb span { color: var(--fg); }
.cam-head h1 { margin: 0 0 6px; font-size: 26px; display: inline-flex; align-items: center; gap: 12px; }
.player-wrap { background: #000; border-radius: var(--br); overflow: hidden; aspect-ratio: 16/9; position: relative; max-width: 1280px; margin: 12px 0 24px; }
#player { width: 100%; height: 100%; background: #000; }
.player-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.8); color: var(--fg); padding: 20px; text-align: center; }
.description { background: var(--bg2); border: 1px solid #1f2740; border-radius: var(--br); padding: 16px 18px; margin: 18px 0; }
.description h2 { margin: 0 0 8px; font-size: 16px; }
.description p { margin: 0; color: var(--muted); line-height: 1.6; }
.related h2 { margin: 24px 0 12px; font-size: 18px; }

/* Categories page */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0 40px; }
.cat-card { background: var(--bg2); border: 1px solid #1f2740; border-radius: var(--br); padding: 22px 16px; text-align: center; transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-icon { font-size: 38px; }
.cat-name { font-weight: 600; }
.cat-count { font-size: 12px; color: var(--muted); }

.btn { display: inline-block; background: var(--accent); color: #fff !important; padding: 10px 18px; border-radius: 6px; margin-top: 16px; }
.btn:hover { opacity: .9; }

/* Footer */
.site-footer { background: var(--bg2); border-top: 1px solid #1f2740; margin-top: 40px; padding: 20px 0; color: var(--muted); font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .site-header nav { gap: 12px; }
  .cam-head h1 { font-size: 20px; }
}

/* Iframe player */
.player-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Logo */
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; height: 38px; width: auto; }
@media (max-width: 600px) {
  .logo img { height: 32px; }
}
