/* ————— Podkastų TOP Lietuva — vanilla CSS ————— */

/* Light theme for all users (no dark variant). */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #f6f8fb;
  --line: #e2e7ee;
  --text: #17202b;
  --muted: #5c6b80;
  --accent: #ffb703;
  --accent-2: #0e7fae;
  --up: #1fa35c;
  --down: #d64541;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20,30,50,.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 58px;
}
.logo { text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.logo strong { letter-spacing: .2px; }
.lt-flag {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); font-weight: 700; vertical-align: middle;
}
.search input {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 190px;
  font-size: .92rem;
  outline: none;
}
.search input:focus { border-color: var(--accent-2); }

.main-nav { display: flex; gap: 16px; font-size: .9rem; flex: 1; }
.main-nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a.current { color: var(--text); }
.main-nav a.current { font-weight: 600; }

/* hero */
.hero { padding: 34px 0 10px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

/* newsletter box — same card language as the list, accent only on the CTA */
.newsletter { margin: 18px 0 6px; border-left: 3px solid var(--accent); }
.nl-icon { font-size: 1.5rem; background: color-mix(in srgb, var(--accent) 12%, var(--bg-soft)); }
.nl-body { flex: 1; min-width: 220px; }
.nl-body h2 { margin: 0 0 3px; font-size: 1.05rem; }
.nl-body p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 48ch; }
.nl-action { min-width: 280px; }
/* joined pill: borderless input + button inside one rounded control,
   same language as the header search field */
.nl-form {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 8px;
  transition: border-color .15s, box-shadow .15s;
}
.nl-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.nl-form input[type=email] {
  flex: 1; min-width: 120px;
  background: transparent; color: var(--text);
  border: none; outline: none;
  padding: 8px 10px; font: inherit; font-size: .92rem;
}
.nl-form input[type=email]::placeholder { color: var(--muted); opacity: .8; }
.nl-form button {
  cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700;
  background: var(--accent); color: #14171c;
  border: none; border-radius: 999px; padding: 9px 20px;
  white-space: nowrap; transition: filter .15s, transform .1s;
}
.nl-form button:hover { filter: brightness(1.08); }
.nl-form button:active { transform: scale(.97); }
.nl-small { margin: 7px 2px 0; font-size: .74rem; color: var(--muted); }
.nl-msg { margin: 0; font-weight: 600; font-size: .95rem; }
.nl-msg.ok { color: var(--up); }
.nl-msg.err { color: var(--down); }
@media (max-width: 720px) {
  .newsletter { align-items: flex-start; }
  .newsletter .nl-icon { display: none; }
  .nl-action { width: 100%; min-width: 0; }
}

/* category chips */
.cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 22px; }
.chip {
  text-decoration: none;
  font-size: .85rem;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg-soft);
  transition: all .15s;
}
.chip small { opacity: .65; }
.chip:hover { color: var(--text); border-color: var(--accent-2); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #14171c; font-weight: 600; }

/* sort bar */
.sortbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 0 0 20px; font-size: .85rem;
}

/* last episode line on cards */
.ep-line {
  margin: 6px 0 0; font-size: .85rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch;
}
.ep-line a { color: var(--accent-2); text-decoration: none; }
.ep-line a:hover { text-decoration: underline; }

/* top list */
.toplist { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 10px; }
.card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: background .15s, transform .15s;
}
li.card:hover { background: var(--card-hover); }

.pos { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.rank {
  font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.rank.top1 { color: #c9a100; }
.rank.top2 { color: #8e99a8; }
.rank.top3 { color: #b3702a; }
.move { font-size: .72rem; font-weight: 700; }
.move.up { color: var(--up); }
.move.down { color: var(--down); }
.move.same { color: var(--muted); opacity: .5; }

.art {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  background: var(--bg-soft);
}
.art.placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.art.xl { width: 120px; height: 120px; border-radius: 16px; }

.card .body { flex: 1; min-width: 0; }
.card h2 { margin: 0 0 2px; font-size: 1.06rem; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { color: var(--accent-2); }
.author { margin: 0 0 6px; color: var(--muted); font-size: .86rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .72rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}
a.tag:hover { color: var(--text); border-color: var(--accent-2); }
.tag.apple { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.stats { display: flex; gap: 20px; text-align: right; }
.stat { display: flex; flex-direction: column; min-width: 78px; }
.stat b { font-size: .98rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.empty { color: var(--muted); padding: 30px 0; }

/* detail page */
.detail { padding-top: 18px; }
.back { color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.detail-head { align-items: flex-start; margin-bottom: 26px; }
.detail-head h1 { margin: 4px 0 2px; font-size: 1.5rem; }
.pos-inline { display: flex; gap: 8px; align-items: baseline; }
.desc { color: var(--muted); font-size: .95rem; max-width: 70ch; }
.last-ep { font-size: .9rem; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: .9rem;
  transition: all .15s;
}
.btn:hover { border-color: var(--accent-2); color: var(--accent-2); }

.history { margin-bottom: 48px; }
.history h2 { font-size: 1.1rem; }
.history table {
  width: 100%; border-collapse: collapse; font-size: .9rem;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.history th, .history td { padding: 9px 14px; text-align: left; }
.history th {
  background: var(--bg-soft); color: var(--muted);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
}
.history tr + tr td { border-top: 1px solid var(--line); }
.history td { font-variant-numeric: tabular-nums; }

/* ads page */
.ad-card { align-items: flex-start; padding: 26px 30px; }
.ad-card h2 { margin: 0 0 12px; font-size: 1.25rem; }
.benefits { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.benefits li { color: var(--muted); }
.benefits strong { color: var(--text); }
.primary-btn { background: var(--accent); color: #14171c !important; border-color: var(--accent); font-weight: 700; }
.primary-btn:hover { filter: brightness(1.08); color: #14171c !important; }
.contact-line { color: var(--muted); font-size: .9rem; }

/* YouTube-style episodes grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 16px;
  margin: 0 0 48px;
}
.video-card .thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.video-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .2s;
}
.video-card .thumb:hover img { transform: scale(1.04); }
.thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 2.4rem;
}
.badge-platform {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.78); color: #fff;
  font-size: .68rem; font-weight: 600;
  padding: 2px 7px; border-radius: 5px;
}
.video-meta { display: flex; gap: 10px; padding: 10px 2px 0; }
.video-meta .avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.video-meta h2 {
  margin: 0 0 3px; font-size: .93rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-meta h2 a { text-decoration: none; }
.video-meta h2 a:hover { color: var(--accent-2); }
.video-meta .channel { margin: 0; font-size: .8rem; }
.video-meta .channel a { color: var(--muted); text-decoration: none; }
.video-meta .channel a:hover { color: var(--text); }
.video-meta .numbers { margin: 1px 0 0; font-size: .78rem; color: var(--muted); }

/* SEO text + FAQ */
.seo-text {
  margin: 8px 0 48px;
  color: var(--muted);
  font-size: .95rem;
  max-width: 76ch;
}
.seo-text h2 { color: var(--text); font-size: 1.15rem; margin: 28px 0 10px; }
.seo-text strong { color: var(--text); }
.seo-text a { color: var(--accent-2); }
.faq dt { font-weight: 600; color: var(--text); margin: 16px 0 4px; }
.faq dd { margin: 0; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: .85rem;
}
.site-footer a { color: var(--muted); }

/* responsive */
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .main-nav { order: 3; flex-basis: 100%; }
  .card { flex-wrap: wrap; padding: 12px 14px; }
  .ep-line { white-space: normal; }
  .stats { width: 100%; justify-content: space-between; text-align: left; gap: 8px; }
  .stat { min-width: 0; }
  .search input { min-width: 120px; }
  .detail-head { flex-direction: column; }
}
