/* LivePublicWebcams - site styles (light + dark via prefers-color-scheme) */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #ef4444;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --header: #0f172a;
  --radius: 10px;
  --shadow: 0 4px 14px rgba(15, 23, 42, .08);
  --max: 1200px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --card: #151e32;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #263046;
    --shadow: 0 4px 14px rgba(0, 0, 0, .4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
@media (prefers-color-scheme: dark) { a { color: #7aa2ff; } }
h1, h2, h3 { line-height: 1.25; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; color: #000; padding: 6px 10px; z-index: 100; }

/* Header */
.site-header { background: var(--header); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.logo svg { flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: #cbd5e1; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; color: #fff; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; font-size: .9rem; }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px; min-width: 150px; z-index: 60; }
.lang li a { display: block; padding: 6px 10px; color: var(--text); text-decoration: none; border-radius: 6px; }
.lang li a:hover, .lang li a[aria-current="true"] { background: rgba(37, 99, 235, .12); }
@media (max-width: 760px) {
  .site-header .bar { padding: 8px 0; gap: 8px; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; font-size: .9rem; }
  .lang { margin-left: auto; }
}

/* Hero */
.hero { padding: 32px 0 16px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0 0 8px; max-width: 760px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; padding: 4px 12px; border-radius: 999px; letter-spacing: .03em; }
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-pill::before { animation: none; } }

/* Player */
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.player-bar { display: flex; align-items: center; gap: 8px; padding: 8px; background: #111827; color: #e5e7eb; }
.player-bar button { background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 6px; height: 36px; min-width: 36px; padding: 0 10px; cursor: pointer; font-size: .9rem; }
.player-bar button:hover { background: rgba(255, 255, 255, .2); }
.now-playing { flex: 1; min-width: 0; text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #67e8f9; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player iframe, .player .facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade { display: block; padding: 0; cursor: pointer; background: #000 center / cover no-repeat; }
.facade::after { content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 14px; background: rgba(239, 68, 68, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 34px no-repeat; }
.player-note { font-size: .8rem; color: #9ca3af; padding: 6px 10px; background: #111827; margin: 0; }
.player-note a { color: #93c5fd; }

/* Sections */
section { padding: 24px 0; }
.section-title { font-size: 1.4rem; margin: 0 0 12px; }
.prose { max-width: 800px; }
.prose h2 { margin-top: 1.6em; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.filters button, .chip { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .9rem; text-decoration: none; }
.filters button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Grid */
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cam { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cam[hidden] { display: none; }
.cam-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cam-thumb::after { content: "\25B6"; position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .75rem; padding: 3px 8px; border-radius: 4px; }
.cam-body { padding: 10px 12px 12px; }
.cam h3 { font-size: 1rem; margin: 0 0 4px; }
.cam p { margin: 0; font-size: .85rem; color: var(--muted); }
.cam .src { margin-top: 4px; }
.cam .src a { color: var(--muted); }

/* Category cards */
.cat-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cat-links a { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.cat-links a strong { display: block; color: var(--primary); }
.cat-links a span { font-size: .85rem; color: var(--muted); }

/* Map */
#webcam-map { height: 70vh; min-height: 380px; border-radius: var(--radius); border: 1px solid var(--border); z-index: 1; }
.map-popup h4 { margin: 0 0 4px; font-size: .95rem; }
.map-popup button { margin-top: 6px; background: var(--primary); color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* Footer */
.site-footer { margin-top: 40px; background: var(--header); color: #cbd5e1; padding: 28px 0; font-size: .9rem; }
.site-footer a { color: #e2e8f0; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.footer-grid ul { list-style: none; padding: 0; margin: 6px 0 0; }
.footer-grid h2 { font-size: .95rem; color: #fff; margin: 0; }
.site-footer .fine { margin-top: 20px; color: #94a3b8; font-size: .8rem; }

/* 404 */
.notfound { text-align: center; padding: 60px 0; }
.notfound h1 { font-size: 3rem; margin: 0; }
