body {
  font-family: "Raleway", Avenir, "Century Gothic", sans-serif;
  /* background-color: #221E36; */
  background-color: black;
  color: #e8e0e8;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  overflow-x: hidden;
}

/* Container for all questions */
.discovery-layout-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 16px;
  max-width: 680px;
  margin: 0 auto;
}

/* -------------------------------
   QUESTION WRAPPER
--------------------------------*/
.discovery-layout-question {
  display: flex;
  flex-direction: column;
  
}

.discovery-layout-question h2 {
  margin: 0;
  font-size: 2.5vh;
  font-weight: 600;
  color: #fff;
  padding: 1rem;
  
  padding-left: 0.5rem;
  padding-bottom: 2.5vh;
  padding-top: 0rem;
}

.discovery-layout-question-subtext {
  font-size: 1.8vh;
  color: #fff;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 1rem;
  
  border-top: 0.1px solid #ff1fff;
}

.discovery-layout-question-answer {
  font-size: 1.8vh;
  color: #aaa;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
  font-style: italic;
  letter-spacing: 0.03cap;
  margin-top: 0;
}

/* -------------------------------
   FOLLOW / UNFOLLOW BUTTON
--------------------------------*/
.discovery-layout-btn-follow {
  appearance: none;
  border: 1px solid #8041e8;
  background: #8041e8;
  color: #fefdff;
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.discovery-layout-btn-follow.unfollow {
  border: 1px solid #888;
  background: transparent;
  color: #888;
}

/* -------------------------------
   ANSWER PROMPT BUTTON
--------------------------------*/
.discovery-layout-btn-answer {
  width: 100%;
  border: 1px solid #4a455c;
  background: #141016;
  color: #e8e0e8;
  padding: 10px 0;
  font-size: 1.8vh;
  border-radius: 10px;
  margin-top: 4px;
}

/* -------------------------------
   SLIDER – TOPIC WEIGHT (1‑10)
--------------------------------*/
.discovery-layout-slider-wrapper {
  
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.discovery-layout-slider-wrapper.visible {
  max-height: 200px; /* Adjust based on actual slider height */
  opacity: 1;
}

/* Row with label + slider */
.discovery-layout-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 0.5rem;
  border-bottom: 0.1px solid;
}

.discovery-layout-slider-label {
  
  font-size: 0.75rem;
  color: #a3a0a8;
  line-height: 1.3em;
  padding-bottom: 0.3rem;
  padding-top: 0.3rem;
}

.discovery-layout-slider-control {
  flex: 1;
  max-width: 60%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.discovery-layout-slider-boxes {
  display: flex;
  gap: 4px;
  cursor: pointer;
  touch-action: pan-x;
  position: relative;
  flex: 1;
}

.discovery-layout-slider-box {
  flex: 1;
  height: 12px;
  border-radius: 2px;
  background: #2e2b38;
}

.discovery-layout-slider-box.active {
  background: #7a55ff;
}

.discovery-layout-slider-count {
  font-size: 0.75rem;
  color: #e8e0e8;
  white-space: nowrap;
}

/* slider handle (shows only while dragging) */
.discovery-layout-slider-handle {
  position: absolute;
  top: -6px;
  height: 24px;
  width: 5px;
  background-color: #ffffff;
  border-radius: 2px;
  z-index: 2;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  display: none;
}

.discovery-layout-slider-handle.dragging {
  display: block;
}

.discovery-layout-slider-subtext {
  font-size: 0.75rem;
  color: #a3a0a8;
  font-style: italic;
  flex: 0 0 40%;
  max-width: 40%;
}

/* ===================================================================== */
/*  LAYOUT 1 – SIMPLE LIST                                              */
/* ===================================================================== */
.discovery-layout-simple {
  width: 100%;
}

.discovery-layout-simple .discovery-layout-topic-block {
  /* border: 1px solid #292533; */
  border-radius: 12px;
  /* background: #1c1824; */
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}

.discovery-layout-simple .discovery-layout-topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discovery-layout-simple .discovery-layout-topic-name {
  font-size: 0.95rem;
}

.discovery-layout-simple .discovery-layout-followers {
  font-size: 0.75rem;
  color: #a3a0a8;
}

/* ===================================================================== */
/*  LAYOUT 2 – HORIZONTAL CAROUSEL                                      */
/* ===================================================================== */
.discovery-layout-carousel {
  overflow-x: auto;
  display: flex;
  gap: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
}

.discovery-layout-carousel-card {
  flex: 0 0 260px; /* card width */
  display: flex;
  flex-direction: column;
  background: #141016;
  border: 1px solid #292533;
  border-radius: 16px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}


.discovery-layout-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 80px);
  overflow: hidden;
}

.discovery-layout-collage div {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
/* Collage variants */
.discovery-layout-collage-1 {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 160px;          /* tall single hero */
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.discovery-layout-collage-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 160px;          /* two side-by-side */
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.discovery-layout-collage-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 80px);/* original 2×2 grid */
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}




.discovery-layout-card-content {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.discovery-layout-carousel-card .discovery-layout-topic-name {
  font-size: 1.8vh;
  font-weight: 600;
}

.discovery-layout-carousel-card .discovery-layout-followers {
  font-size: 1.5vh;
  color: #a3a0a8;
}

.discovery-layout-card-content .discovery-layout-btn-follow {
  margin-top: 1rem;
}

/* ===================================================================== */
/*  LAYOUT 3 – GOOGLE NEWS‑LIKE  (HORIZONTAL)                           */
/* ===================================================================== */
.discovery-layout-news {
  overflow-x: auto;
  display: flex;
  gap: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
}

.discovery-layout-news-card {
  flex: 0 0 280px; /* card width */
  border: 1px solid #292533;
  border-radius: 16px;
  background: #141016;
  padding: 14px;
  display: flex;
  flex-direction: column;
  
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.discovery-layout-news-card .discovery-layout-followers {
  margin-bottom: 0.5rem;
  font-size: 1.6vh;
}

.discovery-layout-news-card .discovery-layout-topic-name {
  font-size: 2.2vh;
  font-weight: 600;
}

.discovery-layout-news-card .discovery-layout-btn-follow {
  margin-top: 1rem;
}

.discovery-layout-followers-text {
  /* background: #292533;  */
  color: #aaa;
  font-size: 1.6vh;
  /* padding: 0.5rem; */
  margin-bottom: 0.5rem;
  margin-top: 1vh;
}

.discovery-layout-article-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;

}

.discovery-layout-article-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #2b2835;
}

.discovery-layout-article-row .title {
  font-size: 1.6vh;
  line-height: 1.2em;
  color: #aaa;
}

/* Custom minimal scrollbar */
.discovery-layout-carousel::-webkit-scrollbar,
.discovery-layout-news::-webkit-scrollbar {
  height: 6px;
}
.discovery-layout-carousel::-webkit-scrollbar-thumb,
.discovery-layout-news::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

/* ===================================================================== */
@media (min-width: 680px) {
  .discovery-layout-carousel-card {
    flex: 0 0 300px;
  }
  .discovery-layout-news-card {
    flex: 0 0 320px;
  }
}


/* ─────────────────────────────────────────────────────────────
   LIGHT-MODE OVERRIDES
   (append to the end of discover-topics.css)
──────────────────────────────────────────────────────────────*/
body.light-mode {
  background-color: #ffffff;        /* page */
  color: #333;                      /* default text */
}

/* headings & titles */
body.light-mode .discovery-layout-question h2,
body.light-mode .discovery-layout-question-subtext,
body.light-mode .discovery-layout-question-answer {
  color: #000;
}

/* follow / unfollow button */
body.light-mode .discovery-layout-btn-follow {
  border-color: #8041e8;
  background: #8041e8;
  color: #fff;
}
body.light-mode .discovery-layout-btn-follow.unfollow {
  border-color: #666;
  background: transparent;
  color: #666;
}

/* answer-prompt button */
body.light-mode .discovery-layout-btn-answer {
  background: #f6f6f9;
  border-color: #ccc;
  color: #333;
}

/* ── SLIDER ──────────────────────────────────────────────── */
body.light-mode .discovery-layout-slider-row {
  border-bottom: 0.1px solid #ddd;
}
body.light-mode .discovery-layout-slider-label,
body.light-mode .discovery-layout-slider-subtext {
  color: #555;
}
body.light-mode .discovery-layout-slider-box {
  background: #e6e6e6;
}
body.light-mode .discovery-layout-slider-box.active {
  background: #7a55ff;              /* keep accent */
}
body.light-mode .discovery-layout-slider-count {
  color: #333;
}
body.light-mode .discovery-layout-slider-handle.dragging {
  background: #8041e8;              /* visible on white bg */
}

/* followers / meta text */
body.light-mode .discovery-layout-followers,

body.light-mode .discovery-layout-carousel-card .discovery-layout-followers,
body.light-mode .discovery-layout-news-card     .discovery-layout-followers,
body.light-mode .discovery-layout-followers-text,
body.light-mode .discovery-layout-article-row .title {
  color: #666;
}

/* cards & topic blocks */

body.light-mode .discovery-layout-carousel-card,
body.light-mode .discovery-layout-news-card {
  background: #fff;
  border: 1px solid #ddd;
}

/* thumbnail placeholder */
body.light-mode .discovery-layout-article-row img {
  background: #e6e6e6;
}

/* scrollbars */
body.light-mode .discovery-layout-carousel::-webkit-scrollbar-thumb,
body.light-mode .discovery-layout-news::-webkit-scrollbar-thumb {
  background: #bbb;
}
