/* ---------- LOGGED USER WRAPPER (ana kapsayıcı) ---------- */
.logged-user {
  display: flex;
  flex-wrap: wrap;   /* fine, but see note below */
  align-items: flex-start;  /* ← critical: stops stretch */
  gap: 2rem;
  max-width: 1300px;
  width: 100%;
  min-width: 0;
  margin: auto;
  margin-top: 75px;
  padding: 20px 0;
}
.cat-item { cursor: pointer; }
.cat-item.active { font-weight: 600; color: dodgerblue; }
.stream-loading,
.no-streams {
  padding: 40px;
  text-align: center;
  color: #888;
  grid-column: 1 / -1;
}
/* ---------- LEFT NAV (logged-user-nav) ---------- */
.logged-user-nav {
  flex: 0 0 250px;
  padding: 10px 0;

  position: sticky;   /* ← was missing */
  top: 90px;          /* ← offset for your fixed header */
  align-self: flex-start;  /* ← belt-and-suspenders vs stretch */
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;  
}

.logged-user-nav b p {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f1419;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  word-break: break-word;
}

.logged-user-nav hr {
  border: 0;
  height: 1px;
  background: #e4e8ec;
  margin: 1.25rem 0;
}

.logged-user-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 330px;
  overflow: auto;
}

.logged-user-nav li {
  padding: 5px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #1e2a3a;
  background-color: transparent;
  border-radius: 0.75rem;
  transition: all 0.15s ease;
  cursor: default;
  letter-spacing: -0.01em;
}

.logged-user-nav li:hover {
  color: dodgerblue;
  cursor: pointer;
}

.logged-user-nav li:first-of-type {
  font-weight: 600;
}

/* ---------- RIGHT SIDE (logged-user-main) ---------- */
.logged-user-main {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  align-content: start;
  height: 3600px;
}

/* ---------- STREAM LINK & CARD (stream-preview) ---------- */
.logged-user-main a {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.1s ease;
  min-width: 0;
}

.logged-user-main a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 4px;
  border-radius: 1rem;
}

.stream-preview {
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  height: 100%;
}

.logged-user-main a:hover .stream-preview {
  border-color: #d0dae8;
}

/* ---------- SELLER PROFILE (top) ---------- */
.seller-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 5px 0;
  background-color: #ffffff;
}

.seller-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #eaeef2;
  border: 1px solid #dee4ec;
  flex-shrink: 0;
}

.seller-username {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1f2a3c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

/* ---------- STREAM IMAGE (middle) ---------- */
.stream-image {
  background-size: 100% 100%;
  background-repeat: no-repeat;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 300px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.6rem;
  border-radius: 15px;
}

.stream-image span {
  background: red;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 3px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

/* ---------- STREAM TITLE (bottom) ---------- */
.stream-title {
  background: #ffffff;
  flex: 1;
  align-items: center;
}

.stream-title p {
  font-size: 0.9rem;
  font-weight: 500;
  color: #0b1a2a;
  line-height: 1.4;
  overflow: hidden;
  word-break: break-word;
  letter-spacing: -0.01em;
  margin: 10px 0;
}

/* ---------- RESPONSIVE ---------- */
@media screen and (max-width: 1280px) {
  .logged-user-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 980px) {
  .logged-user {
    flex-direction: column;
    gap: 1.75rem;
  }

  .logged-user-nav {
    flex: 0 0 auto;
    width: 100%;
    position: static;
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
  }

  .logged-user-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .logged-user-nav li {
    padding: 0.5rem 1.2rem;
    border: 1px solid #e2e8f0;
    background: #fafcff;
    border-radius: 40px;
  }

  .logged-user-nav li:first-of-type {
  }

  .logged-user-nav hr {
    margin: 1rem 0;
  }

  .logged-user-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media screen and (max-width: 580px) {
  .logged-user-main {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stream-image span {
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
  }

  .seller-username {
    font-size: 0.85rem;
  }

  .stream-title p {
    font-size: 0.85rem;
  }
}

/* ---------- UTILITY / IMAGE FALLBACK ---------- */
.stream-image {
  background-image: linear-gradient(145deg, #1e2a3a, #10171f);
  background-blend-mode: overlay;
}

.seller-logo {  
  background-size: 60%;
  background-position: center 55%;
  background-repeat: no-repeat;
  background-color: #eaeef2;
}

@media screen and (max-width: 580px) {
  body {
    padding: 1.25rem 0.75rem;
  }
}