/* =========================================================
   Nostr Streams – Layout
   ========================================================= */

/* ---------- Desktop base layout ---------- */

.streams-layout {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  gap: 20px;
  padding: 0 20px;
}

.streams-sidebar {
  width: 200px;
  background: #111;
  border-radius: 10px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 70px;
}

.sidebar-item {
  background: transparent;
  border: none;
  color: #eee;
  text-align: left;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-item:hover {
  background: #1d1d1d;
}

.sidebar-item.active {
  background: #007bff;
  color: #fff;
}

/* ---------- Main content ---------- */

.streams-main {
  flex: 1;
}

/* ---------- Stream grid ---------- */

#live-streams,
#nostr-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 10px 10px 20px;
  max-width: 100%;
  margin: 10px auto 24px;
  box-sizing: border-box;
}

/* ---------- Stream cards ---------- */

.live-card {
  background: #181818;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.07);
}

.live-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

.live-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-info {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  height: 200px;
}

.live-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: #fff;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;

  line-clamp: 3;        /* ✅ standard property */
  overflow: hidden;
}


.live-streamer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #bbb;
  margin-bottom: 10px;
}

.stream-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.live-actions {
  margin-top: auto;
}

/* ---------- Buttons ---------- */

.watch-btn,
.watch-btn.secondary,
.watch-btn.third {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  color: #fff;
  border: none;
  white-space: nowrap;
}

.watch-btn { background-color: #f838d9; }
.watch-btn:hover { background-color: #f77de3; }

.watch-btn.secondary { background-color: #007bff; margin-top: 18px; }
.watch-btn.secondary:hover { background-color: #4fa1f9; }

.watch-btn.third { background-color: #60c5c1; }
.watch-btn.third:hover { background-color: #83bfbd; }

/* =========================================================
   Mobile layout
   ========================================================= */


   /* =========================================================
   Early shrink (fix “big empty right space” around ~768-900px)
   Put this ABOVE your @media (max-width: 768px)
   ========================================================= */
@media (max-width: 900px) {

  /* sidebar + content should be stacked, not “desktop reserved space” */
  .streams-layout {
    flex-direction: column;
  }

  .streams-sidebar {
    width: 100%;
    position: static;     /* stop sticky */
    top: auto;
  }

  .streams-main {
    width: 100%;
  }

  /* make grid truly fill the screen */
  #live-streams,
  #nostr-videos {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}



@media (max-width: 768px) {

  .streams-layout {
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }

  .streams-sidebar {
    position: static;
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    overflow: visible;
  }

  .sidebar-item {
    width: 100%;
    padding: 10px 14px;
    white-space: normal;
  }

  #live-streams {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
    margin: 0;
  }

  .live-thumb {
    height: auto;
    max-height: 220px;
  }

  .live-info {
    padding: 10px 12px;
  }

  .live-title {
    font-size: 0.95rem;
  }
}

/* =========================================================
   Mobile sidebar toggle
   ========================================================= */

.sidebar-toggle {
  display: none;
  width: 100%;
  background: #111;
  color: #eee;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  justify-content: space-between;
  align-items: center;
}

.sidebar-toggle .chev {
  opacity: 0.8;
  transition: transform 0.15s ease;
}


/* Desktop: never show the toggle button */
@media (min-width: 901px) {
  .sidebar-toggle {
    display: none !important;
  }

  .sidebar-list {
    display: flex !important; /* always show filters on desktop */
  }
}



/* Sidebar list (desktop default = visible) */
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Toggle behavior on mobile */
@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }

  .sidebar-list {
    display: none;
    margin-top: 8px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
  }

  .streams-sidebar.open .sidebar-list {
    display: flex;
  }

  .streams-sidebar.open .sidebar-toggle .chev {
    transform: rotate(180deg);
  }
}

/* =========================================================
   Badges & extras
   ========================================================= */

.live-zap-count {
  font-size: 13px;
  opacity: 0.9;
}

.live-country-flag {
  font-size: 0.9em;
  margin-right: 6px;
}

/* Thumbnail aspect ratio lock */
.live-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;   /* 🔒 force uniform thumbnails */
  overflow: hidden;
  background: #000;
}


.live-badge-row {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 8px;
}

.live-badge {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

.live-badge.purple { background: #8a2be2; }
.live-badge.blue   { background: #2196f3; }

/* Blue LFL dot — solid, no glow */
.lfl-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2196f3;

  /* position tweak (from before) */
  position: relative;
  top: 5px;

  /* subtle 3D */
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(0, 0, 0, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.35);
}
