/*
 * style.css — shared dark-theme styles for nual.in.
 * Covers page layout, header, feed, card (top zone + quotes zone),
 * skeleton loading state, FAB, and fixed footer bar.
 */

:root {
  --bg-page:       #0d0d12;
  --bg-card:       #17171f;
  --bg-card-hover: #1e1e28;
  --border:        #2a2a38;
  --text-primary:  #f0f0f0;
  --text-secondary:#cccccc;
  --text-muted:    #888888;
  --text-quote:    #bbbbbb;
  --accent:        #7c5cbf;
  --footer-h:      44px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  /* bottom padding: footer bar + FAB + breathing room */
  padding-bottom: calc(var(--footer-h) + 96px);
}

/* ── Container ─────────────────────────────────────────── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ────────────────────────────────────────────── */
header {
  padding: 36px 0 28px;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.site-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.site-intro {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 520px;
}

/* ── Feed container ─────────────────────────────────────── */
#feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: #3a3a50;
}

.card:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
  border-color: var(--accent);
}

/* top zone: poster + text row */
.card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* ── Poster ─────────────────────────────────────────────── */
.card-poster-wrap {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 120px;
}

.card-poster {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.card-poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f1f2b;
  border-radius: 6px;
  color: var(--text-muted);
}

.card-poster-placeholder svg {
  width: 30px;
  height: 30px;
}

/* ── Service badge ──────────────────────────────────────── */
.card-badge {
  position: absolute;
  top: 6px;
  right: 0;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 5px 2px 4px;
  border-radius: 3px;
  border-left: 3px solid var(--badge-accent, #666);
  line-height: 1.4;
  white-space: nowrap;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Card text ──────────────────────────────────────────── */
.card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title-link {
  text-decoration: none;
  color: inherit;
}

.card-title-link:hover .card-title { text-decoration: underline; text-decoration-color: #555; }

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.card-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
  margin-top: 2px;
}

/* ── Quotes zone ────────────────────────────────────────── */
.card-quotes {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-quotes-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
}

.card-quote {
  font-size: 0.8rem;
  color: var(--text-quote);
  font-style: italic;
  line-height: 1.55;
}

/* ── Skeleton loading ───────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton-block {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    #22222e 50%,
    var(--bg-card) 75%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
}

.skeleton-poster {
  width: 80px;
  height: 120px;
  border-radius: 6px;
  flex-shrink: 0;
}

.skeleton-title { height: 17px; width: 72%; }
.skeleton-meta  { height: 13px; width: 48%; }
.skeleton-desc  { height: 13px; width: 100%; }

/* ── Error state ────────────────────────────────────────── */
.feed-error {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 16px;
  font-size: 0.9rem;
}

/* ── About section ──────────────────────────────────────── */
#about {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

#about h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

#about p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

#about a {
  color: var(--accent);
  text-decoration: none;
}

#about a:hover { text-decoration: underline; }

/* ── Floating Play Store button ─────────────────────────── */
.fab-play {
  position: fixed;
  bottom: calc(var(--footer-h) + 14px);
  right: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #1c1c2a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  z-index: 100;
  transition: background 150ms ease;
}

.fab-play:hover { background: #242438; }

.fab-play-icon {
  width: 22px;
  height: 22px;
  fill: var(--accent);
  flex-shrink: 0;
}

.fab-play strong { font-weight: 700; }

/* ── Fixed footer bar ───────────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  background: rgba(13, 13, 18, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 16px;
  z-index: 200;
}

.site-footer a {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 120ms ease;
}

.site-footer a:hover { color: var(--text-secondary); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ── Privacy / prose pages ──────────────────────────────── */
.prose-page {
  padding: 36px 0 0;
}

.prose-page .back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  margin-bottom: 20px;
}

.prose-page .back-link:hover { color: var(--text-secondary); }

.prose h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.prose .updated {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.prose h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 22px;
  margin-bottom: 6px;
}

.prose p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 6px;
}

.prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text-primary);
}

.prose a {
  color: var(--accent);
  text-decoration: none;
}

.prose a:hover { text-decoration: underline; }
