:root {
  --bg-body: #0e0e10;
  --bg-panel: #1f1f23;
  --twitch-purple: #9146ff;
  --text-main: #efeff1;
  --text-alt: #adadb8;
  --red-live: #e91916;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: "Inter", Helvetica, Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
nav {
  height: 50px;
  background-color: #18181b;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid #000;
  justify-content: space-between;
  position: relative;
  z-index: 200;
}
.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--twitch-purple);
}
h1 {
  font-weight: 800;
  font-size: 20px;
}
#logoUGR {
  width: 2.5rem;
}
.search-bar {
  background: #000;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 5px 10px;
  width: 400px;
  color: white;
}
.user-menu {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #444;
}
.btn-purple {
  background: var(--twitch-purple);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}
.main-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 50px);
}
.sidebar {
  width: 240px;
  background-color: var(--bg-panel);
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-right: 1px solid #000;
  flex-shrink: 0;
}
.sidebar h3 {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 600;
}
.channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
  cursor: pointer;
  margin-bottom: 5px;
}
.channel-row:hover {
  background: #26262c;
  border-radius: 4px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #555;
  object-fit: cover;
}
.channel-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.name {
  font-size: 14px;
  font-weight: bold;
}
.game {
  font-size: 12px;
  color: var(--text-alt);
}
.viewers {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.red-dot {
  width: 8px;
  height: 8px;
  background: var(--red-live);
  border-radius: 50%;
}
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow-y: auto;
}
.video-wrapper {
  width: 100%;
  height: 80%;
  background: #000;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

video {
  width: 100%;
  height: 100%;
  max-height: 100%;
}
.live-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--red-live);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.video-wrapper:hover .live-badge {
  opacity: 1;
}
.stream-info {
  padding: 20px;
  background: var(--bg-body);
  flex: 1;
}
.stream-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}
.tags {
  display: flex;
  gap: 5px;
}
.tag {
  background: #26262c;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-alt);
  font-weight: bold;
}
.chat-container {
  width: 340px;
  background-color: var(--bg-panel);
  border-left: 1px solid #000;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.chat-header {
  height: 50px;
  border-bottom: 1px solid #2d2d31;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-size: 13px;
  line-height: 1.4;
}
.chat-line {
  margin-bottom: 6px;
  word-wrap: break-word;
}
.chat-user {
  font-weight: bold;
  color: var(--twitch-purple);
  margin-right: 5px;
}
.chat-user.admin {
  color: #e91916;
}
.chat-input-area {
  padding: 20px;
  border-top: 1px solid #2d2d31;
}
.chat-input {
  width: 100%;
  background: #2f2f35;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 10px;
  color: white;
  outline: none;
}
.chat-input:focus {
  border-color: var(--twitch-purple);
}
.chat-btn-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
@media screen and (max-width: 768px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
  }

  .main-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .sidebar {
    position: fixed;
    top: 50px;
    left: -240px;
    height: calc(100vh - 50px);
    z-index: 150;
    transition: transform 0.3s ease;
    border-right: 1px solid #333;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  }
  .sidebar.active {
    transform: translateX(240px);
  }
  .content {
    width: 100%;
    flex: none;
    overflow: visible;
  }

  .video-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .search-bar {
    display: none;
  }
  .chat-container {
    width: 100%;
    height: 500px;
    border-left: none;
    border-top: 1px solid #333;
    flex-shrink: 0;
  }
}
