:root {
  --primary: #3e5478;
  --background: #fafafa;
  --accent: #1e90ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 0;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 10px;
}

code::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

code::-webkit-scrollbar-track {
  background-color: #f5f5f5;
}

code::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 10px;
}

code::-webkit-scrollbar-thumb:hover {
  background: #333;
}

code {
  scrollbar-width: thin;
  scrollbar-color: #000 #f5f5f5;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(90deg, #0a1a2f, #0f2747);
  color: #212121;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
}

header {
  border-bottom: 1px solid var(--accent);
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  margin: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  flex: 1;
  align-content: space-evenly;
  width: 100%;
}

.card {
  border: 1px solid var(--primary);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  padding: 1.2rem;
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  transition: transform 0.2s;
  height: 151px;
  min-height: 100%;
  display: flex;
  align-items: center;
  font-size: 24px;
}

.card:hover {
  transform: scale(1.05);
  color: white;
}

.layout {
  display: flex;
  height: calc(100vh - 70px);
}

.sidebar {
  width: 250px;
  color: white;
  border: 1px solid var(--accent);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.sidebar h3 {
  color: var(--accent);
  font-size: 1.2rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  padding: 0.6rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
  margin: 5px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.sidebar li:hover,
.sidebar li.active {
  border: 1px solid var(--accent);
  color: white;
}

.content-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.note-page {
  color: white;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.note-page h2 {
  padding: 10px 0;
}
.back-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 20px 0 0;
}

code {
  display: block;
  padding: 8px;
  background: #212121;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre;
}

.back-btn:hover {
  background: var(--primary);
}

footer {
  width: 100%;
  border-top: 1px solid var(--primary);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
  padding: 40px 10px;
      box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.5);
}

footer p,
footer .links,
footer .links ul li a,
footer .contacts,
footer .copyright {
  text-decoration: none;
  color: #fff;
}
footer .links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}
footer .copyright {
  grid-column: 1/4;
  text-align: center;
  border-top: 1px solid var(--primary);
  padding-top: 20px;
}
.Physics {
  border-left: 6px solid #3F51B5;
}

.Math {
  border-left: 6px solid #388ec3;
}

.C {
  border-left: 6px solid #455a64;
}

.Manufacturing {
  border-left: 6px solid #ffb300;
}

.EVS {
  border-left: 6px solid #4caf50;
}

/* for comm: #fb8c00 for engg: 8e24aa */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    overflow: hidden;
  }

  .sidebar {
    width: 100%;
    display: flex;
    overflow-x: scroll;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
  .container {
    grid-template-columns: 1fr;
  }
  .sidebar ul {
    display: flex;
    gap: 1rem;
  }

  .content-area {
    padding: 1rem;
  }
  footer {
    grid-template-columns: 1fr;
  }
  footer .copyright {
  grid-column: 1;
}
}
