/* Soft two-tone color wash, one of a handful of daily themes (picked by
   date hash in discover.js so the page's whole mood shifts day to day,
   not just the featured item) -- kept low-opacity so it stays legible in
   both light and dark mode rather than overpowering the content. */
.theme-0 { --blob-a: 193, 68, 14;  --blob-b: 232, 118, 99;  }  /* sunrise: orange -> coral */
.theme-1 { --blob-a: 31, 158, 168; --blob-b: 42, 93, 143;   }  /* teal -> blue */
.theme-2 { --blob-a: 47, 111, 78;  --blob-b: 31, 158, 168;  }  /* forest -> teal */
.theme-3 { --blob-a: 138, 78, 168; --blob-b: 193, 68, 14;   }  /* violet -> orange */
.theme-4 { --blob-a: 199, 149, 44; --blob-b: 193, 68, 14;   }  /* gold -> red */
.theme-5 { --blob-a: 42, 93, 143;  --blob-b: 31, 158, 168;  }  /* blue -> teal */

.discover-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(var(--blob-a, 193, 68, 14), 0.28), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(var(--blob-b, 232, 118, 99), 0.22), transparent 42%);
  background-attachment: fixed;
}

.discover-wrap {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.discover-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.discover-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  box-shadow: 0 10px 26px -10px rgba(var(--blob-a, 193, 68, 14), 0.6);
}

.discover-kicker {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, rgb(var(--blob-a, 193, 68, 14)), rgb(var(--blob-b, 232, 118, 99)));
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

#discover-card-slot {
  width: 100%;
}

.discover-loading,
.discover-error {
  color: var(--text-dim);
  padding: 3rem 1rem;
}

.discover-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.35rem 1.5rem;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 16px 40px -20px rgba(var(--blob-a, 193, 68, 14), 0.55), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.discover-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, rgb(var(--blob-a, 193, 68, 14)), rgb(var(--blob-b, 232, 118, 99)));
}

.discover-card .badge { margin-bottom: 0.7rem; display: inline-block; }

.discover-card h1 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.discover-card h1 a { color: var(--text); text-decoration: none; }
.discover-card h1 a:hover { text-decoration: underline; }

.discover-card .card-meta { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 0.75rem; }

.discover-card .card-synopsis { font-size: 1rem; margin: 0 0 0.85rem; }

.discover-card .card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.85rem; }

.discover-card .card-links { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.95rem; }
.discover-card .card-links a {
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}
.discover-card .card-links a:hover { opacity: 0.9; }
.discover-card .card-links a.secondary {
  color: var(--accent);
  background: none;
  border: 1px solid var(--border);
}

.discover-actions { margin-top: 1.5rem; }
#shuffle-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
}
#shuffle-button:hover { border-color: var(--accent); color: var(--accent); }
#shuffle-button:active { transform: scale(0.98); }

.discover-footer {
  margin-top: 2rem;
  font-size: 0.85rem;
}
.discover-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.discover-footer a:hover { text-decoration: underline; }
.discover-hint {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin: 0.6rem 0 0;
}
