/* Daily-English feed — a stylish single-column "timeline" of video vocabulary cards.
   Mirrors the site's signature frosted-glass + accent-glow look (cf. .code-card in
   16-code.css): a top-lit accent gradient fill, a backdrop blur so the page's starfield
   frosts through, an inset specular top edge, an outer accent glow, and a hover lift.
   Accent = sky (one hue for the whole feed). */
.en-feed { --accent-rgb: 56, 189, 248; }

.en-card {
  background: linear-gradient(155deg, rgba(var(--accent-rgb), .10) 0%, rgba(var(--accent-rgb), .045) 46%, rgba(255, 255, 255, .022) 100%);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(var(--accent-rgb), .22);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, .18),
    0 0 16px -6px rgba(var(--accent-rgb), .30),
    0 12px 30px -18px rgba(0, 0, 0, .75);
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.en-card:hover {
  border-color: rgba(var(--accent-rgb), .40);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, .22),
    0 0 16px -7px rgba(var(--accent-rgb), .26),
    0 16px 34px -18px rgba(var(--accent-rgb), .24);
}

/* Taught word — accent-coloured with a soft text glow. */
.en-word { color: rgb(var(--accent-rgb)); text-shadow: 0 0 18px rgba(var(--accent-rgb), .45); }

/* Topic icon (top-left) — one of the site's own Lucide glyphs (web/topic_icons_data.py),
   matched to the tweet's emoji and drawn in the card's tint inside a glass chip. Mirrors the
   hero icon tile / .code-card-badge: a faint accent-gradient fill, inset highlight, accent glow. */
.en-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 0.85rem;
  color: rgb(var(--accent-rgb));
  background: linear-gradient(150deg, rgba(var(--accent-rgb), .24) 0%, rgba(var(--accent-rgb), .08) 100%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, .25),
    inset 0 0 0 1px rgba(var(--accent-rgb), .35),
    0 0 14px -3px rgba(var(--accent-rgb), .5);
}
/* The Lucide SVG strokes in currentColor → takes the accent above; a soft glow ties it to the card. */
.en-icon-svg { width: 1.5rem; height: 1.5rem; display: block; filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), .45)); }

/* CEFR pill — a glowing accent glass chip (mirrors .code-card-badge). */
.en-cefr {
  color: rgb(var(--accent-rgb));
  background: linear-gradient(150deg, rgba(var(--accent-rgb), .30) 0%, rgba(var(--accent-rgb), .12) 100%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, .30),
    inset 0 0 0 1px rgba(var(--accent-rgb), .40),
    0 0 12px -2px rgba(var(--accent-rgb), .45);
  text-shadow: 0 0 8px rgba(var(--accent-rgb), .40);
}

/* Video frame — rounded, accent-ringed, glowing; brightens with the card on hover.
   object-fit:contain on a black field never crops the KTV subtitles, whatever the clip's
   exact aspect. The frame reserves its OWN 16:9 height (not only via the still <img>), so a
   post that somehow lacks a poster still shows a playable frame instead of collapsing. */
.en-video {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  border: 1px solid rgba(var(--accent-rgb), .26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 0 16px -10px rgba(var(--accent-rgb), .34);
  background: #000;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.en-card:hover .en-video {
  border-color: rgba(var(--accent-rgb), .40);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 0 20px -9px rgba(var(--accent-rgb), .42);
}
/* The lightweight still (JPEG) defines the frame; the <video> is layered on top and shown
   only while playing. Both object-fit:contain so the framing is identical and doesn't jump
   when the video replaces the still on play. */
.en-still { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.en-vid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000; display: none;
}
.en-video.is-playing .en-vid { display: block; }

/* Click-to-play overlay — replaces the native control bar (which would sit on top of the
   baked-in KTV subtitles). The whole .en-video frame toggles play/pause; this button is the
   visual cue + keyboard control, centred so it never covers the bottom subtitle line, and it
   fades out during playback so the clip plays unobstructed. */
.en-play {
  position: absolute; inset: 0; margin: auto;
  width: 3.25rem; height: 3.25rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .30); cursor: pointer; color: #fff;
  background: rgba(var(--accent-rgb), .30);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 0 18px -7px rgba(var(--accent-rgb), .55);
  transition: opacity .2s ease, transform .15s ease, background .2s ease;
}
.en-play:hover { transform: scale(1.06); background: rgba(var(--accent-rgb), .52); }
.en-play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.en-play svg { width: 1.5rem; height: 1.5rem; margin-left: 2px; }
.en-video.is-playing .en-play { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .en-card, .en-card:hover { transform: none; }
}
