:root {
  --bg-color: #111827;
  --container-color: #1F2937;
  --border-color: #374151;
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --accent-color: #3B82F6;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
}

header, footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  background-color: var(--container-color);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

header h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 600;
}

footer {
  border-top: 1px solid var(--border-color);
  border-bottom: none;
  font-size: 0.9em;
  color: var(--text-secondary);
}

#main-container {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
  padding: 1rem;
  gap: 1rem;
}

.sidebar {
  width: 25%;
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--container-color);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

#video-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2;
  min-height: 0;
}

.video-js {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

#channel-list {
  order: 3;
}

#match-list {
  order: 1;
}

#channel-list button, .match {
  background-color: transparent;
  color: var(--text-primary);
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

#channel-list button:first-of-type, .match:first-of-type {
  border-top: 1px solid var(--border-color);
}

#channel-list button:hover, .match:hover {
  background-color: var(--accent-color);
  color: white;
}

.team img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.event-info {
  text-align: center;
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-left: auto;
  padding-left: 1rem;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

@media (max-width: 768px) {
  #main-container {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .sidebar, #video-container {
    width: 100%;
    max-height: none;
    order: 0 !important;
  }

  #video-container {
    min-height: 250px;
    padding: 0.5rem;
  }

  .sidebar {
    height: 30vh;
  }
}
