body {
  margin: 0;
  font-family: "Noto Sans Devanagari", Arial, sans-serif;
  background: #f3f7f2;
  color: #111;
}

header.header {
  background: #220101;
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

header .brand h1 {
  margin: 0;
  font-size: 1.4rem;
}

header .brand p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.menu-toggle {
  display: none;
  background: #14bd05;
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.subject-btn,
.sidebar button,
.back-btn {
  background: rgb(8, 226, 19);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.95rem;
}

.subject-btn:hover,
.sidebar button:hover,
.back-btn:hover {
  background: rgb(8, 11, 236);
}

.subject-btn {
  min-width: 135px;
}

.container {
  display: flex;
  min-height: calc(100vh - 88px);
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: #fafafa;
  border-right: 1px solid #2eeb15;
  overflow-y: auto;
  padding: 16px;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.05);
}

.sidebar button {
  width: 100%;
  text-align: left;
  margin-bottom: 10px;
}

.sidebar .back-btn {
  width: 100%;
  margin-bottom: 16px;
}

.content {
  flex: 1;
  padding: 24px;
}

.content h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.content p {
  line-height: 1.7;
  font-size: 1rem;
}

@media (max-width: 1000px) {
  .container {
    flex-direction: column;
    min-height: auto;
  }

  .sidebar {
    width: 100%;
    min-width: auto;
    border-right: none;
    border-bottom: 1px solid #2eeb15;
    max-height: 260px;
  }
}

@media (max-width: 760px) {
  header.header {
    align-items: flex-start;
  }

  .subject-list {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 84%;
    max-width: 320px;
    z-index: 1000;
    background: #fafafa;
    border-right: 1px solid #2eeb15;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.18);
    transition: left 0.25s ease;
  }

  .sidebar.active {
    left: 0;
  }

  .container {
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}
