/* Reset and base */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #121212;
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

header {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

header h1 {
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: 4px;
}

button {
  background-color: #1f1f1f;
  border: none;
  padding: 10px 25px;
  border-radius: 25px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(255 255 255 / 0.1);
  transition: all 0.3s ease;
}

button:hover {
  background-color: #333;
  box-shadow: 0 12px 25px rgba(255 255 255 / 0.25);
}

main {
  width: 100%;
  max-width: 900px;
}

#liveStreams h2 {
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 1.8rem;
}

#streamsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Stream card style */

.streamCard {
  background: #1f1f1f;
  border-radius: 20px;
  padding: 15px;
  width: 250px;
  box-shadow: 0 10px 25px rgba(0 0 0 / 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.streamCard:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(255 255 255 / 0.2);
}

.streamThumbnail {
  width: 100%;
  height: 140px;
  border-radius: 15px;
  background: #333;
  margin-bottom: 10px;
  object-fit: cover;
  box-shadow: inset 0 0 8px #000;
}

.streamInfo {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.streamTitle {
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streamerName {
  color: #ccc;
  font-size: 0.9rem;
}

/* Modal styles */

#authModal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: fadeIn 0.3s ease forwards;
}

.hidden {
  display: none !important;
}

#authModalContent {
  background-color: #222;
  padding: 30px 40px;
  border-radius: 25px;
  width: 350px;
  box-shadow: 0 20px 60px rgba(255 255 255 / 0.15);
  position: relative;
  animation: slideDown 0.4s ease forwards;
}

#authModalContent h2 {
  margin-bottom: 20px;
  font-weight: 900;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 2px;
}

#authModalContent input {
  width: 100%;
  padding: 12px 18px;
  margin-bottom: 15px;
  border-radius: 20px;
  border: none;
  background-color: #121212;
  color: white;
  font-size: 1rem;
  box-shadow: inset 0 0 8px rgba(255 255 255 / 0.15);
  transition: box-shadow 0.3s ease;
}

#authModalContent input:focus {
  outline: none;
  box-shadow: 0 0 15px #fff;
}

#authActionBtn {
  width: 100%;
  margin-top: 10px;
  font-weight: 700;
}

#authMessage {
  color: #ff5555;
  min-height: 20px;
  font-weight: 600;
  margin-top: 10px;
  text-align: center;
}

#toggleAuthText {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
  color: #ccc;
  user-select: none;
}

#toggleAuthLink {
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
}

#toggleAuthLink:hover {
  color: #aaa;
}

#authCloseBtn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

#authCloseBtn:hover {
  color: white;
}

/* Animations */

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes slideDown {
  from {opacity: 0; transform: translateY(-30px);}
  to {opacity: 1; transform: translateY(0);}
}
