/* Add PHP-specific styles here if needed */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 60%, #dbeafe 100%);
  animation: php-slidein 0.7s;
  font-size: 1.05em;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes php-slidein {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.content-box {
  border-left: 6px solid #7c3aed;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.07);
  border-radius: 12px;
  padding: 36px;
  margin-bottom: 30px;
}
.content-box:hover {
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.13);
  transform: translateY(-2px) scale(1.01);
}

/* Subtopics Section for PHP Lessons */
.subtopics-section {
  margin: 22px 0 14px 0;
  background: #ede9fe;
  border-radius: 10px;
  padding: 14px 20px;
  animation: subtopics-fadein 0.6s;
  box-shadow: 0 1px 6px rgba(124, 58, 237, 0.06);
}
@keyframes subtopics-fadein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.subtopics-section h3 {
  margin-top: 0;
  font-size: 1.13em;
  color: #5b21b6;
  letter-spacing: 0.7px;
}
.subtopic {
  margin-bottom: 8px;
}
.subtopic-toggle {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  color: #5b21b6;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
  min-height: 44px;
  font-size: 1.04em;
  box-shadow: 0 1px 2px rgba(124, 58, 237, 0.03);
}
.subtopic-toggle.open,
.subtopic-toggle:hover {
  background: #c4b5fd;
  border: 1.5px solid #7c3aed;
  outline: 2px solid #7c3aed;
  outline-offset: 1px;
}
.subtopic-content {
  background: #fff;
  border-left: 3px solid #7c3aed;
  margin-top: 4px;
  margin-bottom: 10px;
  padding: 9px 13px;
  border-radius: 0 8px 8px 0;
  font-size: 1em;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.06);
}

/* PHP code highlight */
.code-tag {
  color: #7c3aed;
}
.code-attr {
  color: #2563eb;
}
.code-string {
  color: #059669;
}

.code-tag,
.code-attr,
.code-string {
  font-weight: 500;
  font-family: "Fira Mono", "Consolas", monospace;
  font-size: 1em;
}

.code-example,
.code-content {
  overflow-x: auto;
  word-break: break-all;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  font-size: 0.98em;
}

/* Responsive */
@media (max-width: 900px) {
  .content-box {
    padding: 18px;
    font-size: 0.99em;
  }
  .subtopics-section {
    padding: 10px 6px;
    font-size: 0.98em;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 52px;
    width: 240px;
    height: calc(100vh - 52px);
    z-index: 1000;
    background: #fff;
    transition: left 0.3s;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
    border-right: 1px solid #e2e8f0;
  }
  .sidebar.active {
    left: 0;
  }
  .main-content,
  .responsive-main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 20px;
    max-width: 100vw;
  }
  .menu-toggle {
    display: flex !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    background: #7c3aed;
    color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.98em;
  }
  .content-box {
    padding: 8px;
    font-size: 0.97em;
    margin-bottom: 16px;
  }
  .subtopics-section {
    padding: 6px 2px;
    font-size: 0.97em;
    border-radius: 6px;
  }
  .subtopic-toggle {
    font-size: 0.97em;
    padding: 10px 8px;
    min-height: 40px;
  }
  .subtopic-content {
    padding: 7px 6px;
    font-size: 0.97em;
  }
  table {
    font-size: 0.95em;
  }
}

@media (min-width: 901px) {
  .sidebar {
    position: fixed;
    left: 0;
    width: 250px;
    top: 52px;
    height: calc(100vh - 52px);
    box-shadow: none;
    transform: none !important;
  }
  .main-content,
  .responsive-main {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 40px;
    max-width: 1200px;
  }
  .menu-toggle {
    display: none !important;
  }
}

/* Ensure .menu-toggle is hidden by default */
.menu-toggle {
  display: none;
}

/* Hamburger menu toggle for mobile */
.menu-toggle {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  background: #7c3aed;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  z-index: 200;
  border: none;
  outline: none;
  transition: background 0.2s;
}
.menu-toggle:hover,
.menu-toggle:focus {
  background: #5b21b6;
}
.menu-toggle svg {
  width: 28px;
  height: 28px;
  display: block;
  stroke: white;
}
