* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
}

.sidebar {
  width: 200px;
  background: #16213e;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #0f3460;
  flex-shrink: 0;
}

.sidebar h1 {
  padding: 0 20px 20px;
  font-size: 18px;
  color: #e94560;
  border-bottom: 1px solid #0f3460;
  margin-bottom: 10px;
}

.nav-item {
  padding: 12px 20px;
  color: #a0a0a0;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #0f3460;
  color: #fff;
}

.nav-item.active {
  background: #0f3460;
  color: #fff;
  border-left-color: #e94560;
}

.category {
  border-bottom: 1px solid #0f3460;
}

.category-header {
  padding: 12px 20px;
  color: #e94560;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-header::after {
  content: '▼';
  font-size: 10px;
  transition: transform 0.2s;
}

.category.collapsed .category-header::after {
  transform: rotate(-90deg);
}

.category.collapsed .category-items {
  display: none;
}

.content {
  flex: 1;
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header {
  padding: 12px 20px;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
  flex-shrink: 0;
}

.header a {
  color: #e94560;
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}

.header a:hover {
  text-decoration: underline;
}

iframe {
  width: 100%;
  flex: 1;
  border: none;
}

@media (max-width: 600px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid #0f3460;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar h1 {
    padding: 0 15px;
    border-bottom: none;
    margin-bottom: 0;
    font-size: 16px;
    white-space: nowrap;
  }

  #nav {
    display: flex;
    flex-direction: row;
    align-items: stretch;
  }

  .category {
    display: flex;
    flex-direction: row;
    border-bottom: none;
    border-right: 1px solid #0f3460;
  }

  .category-header {
    display: none;
  }

  .category-items {
    display: flex !important;
    flex-direction: row;
  }

  .nav-item {
    padding: 14px 12px;
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }

  .nav-item.active {
    border-left-color: transparent;
    border-bottom-color: #e94560;
  }

  .header {
    padding: 10px 15px;
  }

  .header a {
    font-size: 13px;
  }
}
