/* === Base === */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #121212;
  color: #f0f0f0;
  margin: 0;
  padding: 0 16px 40px;
}

/* === Header === */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid #222;
}

h1 {
  margin: 0;
  font-weight: 700;
  font-size: 1.8rem;
  color: #00aaff;
  user-select: none;
  text-align: center;
}

/* === Auth Buttons === */
#login-btn,
#logout-btn {
  background-color: #00aaff;
  border: none;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 24px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

#login-btn:hover,
#logout-btn:hover {
  background-color: #0088cc;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#user-name {
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

/* === Filters === */
main {
  max-width: 1200px;
  margin: 20px auto 60px;
}

#filters {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

#filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
}

#filters input[type="range"] {
  width: 200px;
  margin-top: 4px;
}

#filters input[type="text"] {
  width: 200px;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  background-color: #222;
  color: #eee;
}

#filters button {
  background-color: #00aaff;
  border: none;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 24px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  height: 40px;
  align-self: flex-end;
}

#filters button:hover {
  background-color: #0088cc;
}

/* === Stream Grid === */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  user-select: none;
}

/* Each preview keeps 16:9 size and fits perfectly */
.stream-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 170, 255, 0.3);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.stream-preview:hover {
  transform: scale(1.02);
}

.stream-preview iframe,
.stream-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
}

/* Streamer name overlay */
.stream-name-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-weight: 700;
  padding: 6px 10px;
  font-size: 14px;
  user-select: none;
  pointer-events: none;
  text-align: center;
}

/* === Responsive Tweaks === */
@media (max-width: 480px) {
  .stream-grid {
    grid-template-columns: 1fr;
  }

  /* Ensure header and filters center on narrow screens */
header,
#filters {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

 
