/* ===================================================================
   The Stash — RSS page. Rainbow animated gradient UI.
   Loaded after styles.css on rss.html only.
   =================================================================== */

body.rss-page {
  /* catalog.css is not loaded on rss.html, so the shared light-theme vars
     (e.g. --bg: #ffffff) would otherwise leak into the mobile nav dropdown. */
  --bg: #070c16;
  --bg-panel: #0e1526;
  --bg-panel-2: #0d1422;
  --bg-soft: #131c30;
  --line: #223050;
  --line-soft: #1a2542;
  --ink: #e5ecf6;
  --ink-soft: #9db0cc;
  --ink-mute: #64758f;
  --indigo: #9d6cff;
  --violet: #9d6cff;
  --green: #34d399;
  --red: #ff6b6b;
  background: #070c16;
  color: #e5ecf6;
}

body.rss-page .site-header.dark {
  background: rgba(7, 12, 22, 0.85);
}

.brand-mark-logo {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.brand-mark-logo svg,
.brand-mark-logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.fumes path {
  transform-origin: 48px 11px;
  animation: fume 4s ease-in-out infinite;
}
@keyframes fume {
  0% { opacity: 0; transform: translateY(0.5px) scale(0.97); }
  18% { opacity: 0.9; }
  45% { opacity: 0.6; transform: translateY(-1px) scale(1.02); }
  72% { opacity: 0; transform: translateY(-1.5px) scale(1.04); }
  100% { opacity: 0; transform: translateY(-1.5px) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { .fumes path { animation: none !important; } }

/* ---------- Shared rainbow bits ---------- */
.rainbow-text {
  background: linear-gradient(90deg, #ff5c5c, #ffb84d, #ffe14d, #4de86b, #4db8ff, #9d6bff, #ff8ab8, #ff5c5c);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 6s linear infinite;
}

.btn-rainbow {
  background: linear-gradient(90deg, #ff5c5c, #ffb84d, #4de86b, #4db8ff, #9d6bff, #ff5c5c);
  background-size: 300% 100%;
  color: #fff;
  border: none;
  box-shadow: 0 8px 26px rgba(109, 84, 255, 0.35);
  animation: gradShift 7s linear infinite;
}
.btn-rainbow:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(109, 84, 255, 0.5);
}
.btn-ghost-lit {
  background: rgba(255, 255, 255, 0.06);
  color: #e5ecf6;
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-ghost-lit:hover {
  border-color: var(--violet);
  color: var(--white);
}

@keyframes gradShift { to { background-position: 300% 0; } }

.hue-0 { --hue-a: #ff5c5c; --hue-b: #ff8ab8; }
.hue-1 { --hue-a: #ffb84d; --hue-b: #ffe14d; }
.hue-2 { --hue-a: #4de86b; --hue-b: #a7ffb0; }
.hue-3 { --hue-a: #4db8ff; --hue-b: #9de3ff; }
.hue-4 { --hue-a: #9d6bff; --hue-b: #c9a8ff; }
.hue-5 { --hue-a: #ff8ab8; --hue-b: #ff5c92; }

/* ---------- Hero ---------- */
.rss-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 92px 0 84px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rss-hero::before {
  content: '';
  position: absolute;
  inset: -30%;
  z-index: -1;
  background: conic-gradient(from 0deg, rgba(255,92,92,.5), rgba(255,184,77,.5), rgba(77,232,107,.5), rgba(77,184,255,.5), rgba(157,107,255,.5), rgba(255,138,184,.5), rgba(255,92,92,.5));
  filter: blur(70px);
  opacity: 0.28;
  animation: spinSlow 22s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.rss-hero-inner {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .rss-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .logo-stage { order: -1; }
}

.logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-stage svg {
  width: min(230px, 62vw);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(109, 84, 255, 0.45));
  animation: floatLogo 7s ease-in-out infinite;
}
@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

.rss-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93a6c4;
  margin-bottom: 16px;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4de86b;
  box-shadow: 0 0 0 0 rgba(77, 232, 107, 0.55);
  animation: pulseDot 1.7s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(77, 232, 107, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(77, 232, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 232, 107, 0); }
}

.rss-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0 0 18px;
}
.rss-hero .lead {
  font-size: 1.08rem;
  color: #9fb2cf;
  max-width: 54ch;
  margin-bottom: 30px;
}
.rss-hero .lead strong { color: #e5ecf6; }

.rss-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Meta strip ---------- */
.rss-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 720px) { .rss-meta-strip { grid-template-columns: 1fr; } }
.meta-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 18px;
}
.meta-chip strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.meta-chip span { font-size: 0.85rem; color: #8ea1bf; }

/* ---------- Sections ---------- */
.rss-section { padding: 80px 0; }
.rss-section:nth-of-type(odd) { background: rgba(255, 255, 255, 0.015); }
.rss-section-head { margin-bottom: 34px; }
.rss-section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.rss-section-head p { color: #8ea1bf; max-width: 62ch; }

/* ---------- Feed grid ---------- */
.feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 860px) { .feed-grid { grid-template-columns: 1fr; } }

.feed-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 22px 22px 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feed-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.feed-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--hue-a, #9d6bff), var(--hue-b, #ff8ab8), var(--hue-a, #9d6bff));
  background-size: 300% 100%;
  animation: gradShift 5s linear infinite;
}

.feed-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.feed-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.feed-card h3 a { color: #f2f6ff; }
.feed-card h3 a:hover { text-decoration: underline; }
.feed-date {
  font-size: 0.75rem;
  color: #6f829f;
  white-space: nowrap;
  padding-top: 4px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid;
}
.chip-live { color: #4de86b; background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); }
.chip-down { color: #ff6b6b; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); }
.chip-verified { color: #7fb4ff; background: rgba(37, 99, 235, 0.14); border-color: rgba(37, 99, 235, 0.4); }
.chip-new { color: #ffd166; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }
.chip-info { color: #a8b9d4; background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.28); }

.feed-meta { font-size: 0.82rem; color: #8ea1bf; }
.feed-meta span { color: #c3d0e5; }

.feed-empty,
.feed-error {
  grid-column: 1 / -1;
  text-align: center;
  color: #8ea1bf;
  padding: 44px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
}
.feed-error a { color: #7fb4ff; text-decoration: underline; }
.feed-refresh {
  margin-top: 22px;
  text-align: center;
}

/* ---------- Legend / how-to ---------- */
.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 720px) { .legend-grid { grid-template-columns: 1fr; } }
.legend-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 24px;
}
.legend-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.legend-card ul { list-style: none; }
.legend-card li {
  font-size: 0.92rem;
  color: #a8b9d4;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}
.legend-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5c5c, #9d6bff);
}
.legend-card code, .legend-card .copy-url {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: #c3d0e5;
  word-break: break-all;
}

/* ---------- Footer ---------- */
body.rss-page footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  body.rss-page *, body.rss-page *::before, body.rss-page *::after {
    animation: none !important;
    transition: none !important;
  }
}