/* ============================================================
   LEFT CURRENT — Stylesheet
   Dark, red-accented publication design
   No build step. Plain CSS for Neocities.
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */

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

:root {
  --bg:          #0d0d0d;
  --bg-card:     #141414;
  --bg-elevated: #1c1c1c;
  --border:      #282828;
  --border-soft: #1f1f1f;

  --red:         #dc2626;
  --red-bright:  #ef4444;
  --red-muted:   #7f1d1d;
  --red-bg:      #1a0505;

  --text:        #e8e8e8;
  --text-muted:  #888;
  --text-dim:    #555;

  --amber:       #f59e0b;
  --green:       #16a34a;
  --blue:        #3b82f6;
  --purple:      #7c3aed;

  --font-sans:   "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-serif:  "Georgia", "Cambria", "Times New Roman", serif;
  --font-mono:   "Fira Code", "Consolas", monospace;

  --radius:      6px;
  --radius-lg:   10px;
  --shadow:      0 2px 12px rgba(0,0,0,0.5);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.4);

  --nav-h:       56px;
  --filter-h:    52px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--red-bright);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Layout ───────────────────────────────────────────────── */

.site-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.main-content {
  padding-top: calc(var(--nav-h) + var(--filter-h) + 24px);
  padding-bottom: 80px;
}

/* ── Top Navigation ───────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.site-nav .site-wrapper {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo__mark {
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-logo__text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.site-logo__text span {
  color: var(--red);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav__link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}

.nav__link:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.nav__link--active {
  color: #fff;
  background: var(--red-bg);
  border: 1px solid var(--red-muted);
}

.nav-links {
  margin-right: auto;
}

.nav__search {
  margin-left: auto;
}

.search-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 7px 12px;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--red);
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* ── Filter Bar ───────────────────────────────────────────── */

.filter-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--filter-h);
  background: rgba(13, 13, 13, 0.95);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
}

.filter-bar .site-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar .site-wrapper::-webkit-scrollbar { display: none; }

.tab-row {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tab {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}

.tab:hover {
  color: var(--text);
  border-color: var(--border);
}

.tab--active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 5px 10px;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-select:focus {
  border-color: var(--red);
}

/* ── Feed Grid ────────────────────────────────────────────── */

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

.feed-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.feed-title span {
  color: var(--red);
}

.item-count {
  font-size: 13px;
  color: var(--text-muted);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ── Cards ────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.15s;
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  overflow: hidden;
  flex-shrink: 0;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.card__thumb--video .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  background: rgba(0,0,0,0.3);
}

.card:hover .card__thumb--video .play-btn {
  opacity: 1;
}

.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.card__source {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card__dot {
  opacity: 0.4;
}

.card__author {
  font-style: italic;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  font-family: var(--font-serif);
}

.card__title a {
  color: var(--text);
  transition: color 0.15s;
}

.card__title a:hover {
  color: var(--red-bright);
}

.card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

/* ── Social card variant ──────────────────────────────────── */

.card--social .card__title a {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
}

.social-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 3px solid var(--red-muted);
  padding-left: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Tags ────────────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tag--platform {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag--youtube  { border-color: #7f1d1d; color: #f87171; }
.tag--bluesky  { border-color: #1e3a5f; color: #60a5fa; }
.tag--rss      { border-color: #2d4a1e; color: #86efac; }

.tag--type {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.tag--news      { border-color: #1e3a5f; color: #93c5fd; }
.tag--opinion   { border-color: #3b2160; color: #c4b5fd; }
.tag--editorial { border-color: #422006; color: #fcd34d; }
.tag--video     { border-color: #450a0a; color: #fca5a5; }
.tag--podcast   { border-color: #064e3b; color: #6ee7b7; }
.tag--social    { border-color: #1e3a5f; color: #7dd3fc; }

.tag--tendency {
  background: var(--red-bg);
  border: 1px solid var(--red-muted);
  color: #fca5a5;
}

/* ── Skeletons ───────────────────────────────────────────── */

.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.card-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  height: 260px;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 0.5; }
}

/* ── Load More ───────────────────────────────────────────── */

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.btn-load-more {
  padding: 12px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-load-more:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 15px;
}

/* ── Error Banner ────────────────────────────────────────── */

.error-banner {
  display: none;
  margin-bottom: 16px;
}

.error-details {
  background: #1a0505;
  border: 1px solid var(--red-muted);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.error-details summary {
  cursor: pointer;
  color: #fca5a5;
  font-weight: 600;
  margin-bottom: 4px;
}

.error-details ul {
  list-style: none;
  margin-top: 8px;
}

.error-details li {
  padding: 2px 0;
}

.error-details code {
  color: #f87171;
  font-family: var(--font-mono);
}

/* ── Sources Directory Page ──────────────────────────────── */

.page-heading {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-heading span { color: var(--red); }

.page-subheading {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.dir-section {
  margin-bottom: 40px;
}

.dir-section__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.dir-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.15s;
}

.dir-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  text-decoration: none;
}

.dir-card__name {
  font-weight: 700;
  font-size: 15px;
}

.dir-card__country {
  font-size: 11px;
  color: var(--text-dim);
}

.dir-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── About Page ──────────────────────────────────────────── */

.about-content {
  max-width: 720px;
}

.about-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin-top: 28px;
  margin-bottom: 10px;
}

.about-content p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.about-content a {
  color: var(--red-bright);
  text-decoration: underline;
}

.tendency-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.tendency-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.tendency-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
  vertical-align: top;
}

.tendency-table td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links { display: none; }

  .site-logo__text { font-size: 15px; }

  .feed-grid {
    grid-template-columns: 1fr;
  }

  .dir-grid {
    grid-template-columns: 1fr 1fr;
  }

  .main-content {
    padding-top: calc(var(--nav-h) + var(--filter-h) + 16px);
  }

  .search-input {
    width: 160px;
  }
}

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

  .search-input {
    width: 120px;
  }
}

/* ── Utilities ───────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

[hidden] { display: none !important; }

/* ── Video Spotlight ─────────────────────────────────────── */

#video-spot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  z-index: 900;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.vs-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
}

.vs-live {
  font-size: 13px;
  color: var(--red);
  flex-shrink: 0;
  animation: vs-pulse 1.8s ease-in-out infinite;
}

@keyframes vs-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.vs-source {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#video-spot.minimized .vs-frame {
  display: none;
}

#video-spot.minimized {
  border-radius: 10px;
}

.vs-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.vs-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.vs-btn:hover {
  background: var(--border);
  color: var(--text);
}

.vs-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.vs-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


@media (max-width: 480px) {
  #video-spot {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 10px 10px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}

/* ── Scrollbar ───────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Selection ───────────────────────────────────────────── */

::selection {
  background: var(--red);
  color: #fff;
}
