body {
  font-family: Roboto, sans-serif;
  margin: 0;
  padding: 0;
  padding-top: 70px; /* Space for fixed header */
  display: flex;
  background-color: Canvas;
  color: CanvasText;
  color-scheme: light dark;
  flex-direction: column;
}

.nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px; 
  height: 100%;
  background-color: #131413;
  color: #fff;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto; 
}

.nav-panel ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.nav-panel ul li {
  margin: 10px 0;
}

.nav-panel ul li a {
  color: #fff;
  text-decoration: none;
}

.quiz-container {
  margin-left: 0px; 
  padding: 20px;
  background: #00020400;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: auto; 
}

.quiz-container h1 {
  margin-top: 0;
}

/* Question styling */
.question {
  margin-bottom: 20px;
}

.question p {
  margin: 0;
}

.feedback {
  border: 1px solid #ccc;
  padding: 15px;
  margin-top: 20px;
  background-color: rgba(222, 222, 222, 0.33);
}

.wrong {
  color: red;
}

.hint {
  color: rgb(0, 255, 47);
  font-style: italic;
}


/* style.css */
.welcome-container {
  text-align: center;
  margin: 50px;
}

#main {
  transition: margin-left .3s;
  padding: 16px;
  margin-left: 0;
}

.sidebar {
  height: 100%;
  width: 280px;
  position: fixed;
  left: -280px;
  top: 0;
  background: linear-gradient(180deg, #1a2b3c 0%, #0d1821 100%);
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  padding-top: 0;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  background: linear-gradient(135deg, #00a6d6 0%, #0088b3 100%);
  padding: 0 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.sidebar h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.sidebar a {
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  color: #b8c5d0;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar a i,
.sidebar p i {
  width: 1.25rem;
  margin-right: 0.75rem;
  text-align: center;
}

.sidebar p i.fa-lock {
  margin: 0;
}

.sidebar a:hover {
  background: rgba(0, 166, 214, 0.15);
  color: #fff;
  border-left-color: #00a6d6;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar ul li:last-child {
  border-bottom: none;
}

.sidebar ul li p {
  padding: 0.85rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  color: #5a6a7a;
  cursor: not-allowed;
}

.closebtn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.closebtn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main content area */
#main {
    margin-left: 250px;
    transition: margin-left .3s ease;
}

.openbtn {
    font-size: 25px;
    cursor: pointer;
    position: relative;
    left: 15px;
    z-index: auto;
    transition: left 0.3s;
    color: #232323;
}

#sidebar.closed ~ #main {
    margin-left: 0;
}

.sidebar ul li.active a {
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 166, 214, 0.2) 0%, transparent 100%);
  border-left-color: #00a6d6;
}

.sidebar a.active {
  background: linear-gradient(90deg, rgba(0, 166, 214, 0.2) 0%, transparent 100%);
  color: #fff;
  font-weight: 600;
  border-left-color: #00a6d6;
}

#timer {
  font-size: 24px;
  color: #e74c3c; /* Red color for urgency */
  margin-bottom: 20px;
  text-align: center;
}


td {
    border: solid 2px lightgrey;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
  text-align: left;
}

table th, table td {
  border: 1px solid #ddd;
  padding: 10px;
}

table th {
  background-color: #00a6d6;
  color: white;
}

.header {
  align-items: center;
  display: flex;
  padding: 0 2rem;
  margin-inline: auto;
  justify-content: space-between;
  transition: margin-left .3s;
  height: 100%;
}
.header-wrapper{
    background-color: #00a6d6;
    color: #f7f7f7;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    height: 70px;
}

.header__title {
  color: #f7f7f7;
  font-weight: 600;
  text-decoration: none;
    display: flex;
    align-items: center;
}

.header__title h1 {
    margin: 0;
    font-size: 1.5rem;

}

.dropdown {
  display: flex;
  padding: 0 2rem;
  align-items: center;
  justify-content: end;
  position: relative;
}

.dropdown-btn {
  background-color: #00a6d6;
  color: #fff;
  padding: 10px 15px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
}

.header-links{
  background-color: #00a6d6;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  border-radius: 4px;
}

.caret {
  margin-left: 8px;
  font-size: 0.8em;
}


.dropdown-content {
  display: none;              /* Hidden by default */
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  z-index: 9999;
}

.dropdown-content a {
  display: block;
  text-decoration: none;
  padding: 10px 15px;
  color: #333;
  font-size: 14px;
}

.dropdown-content a:hover {
  background-color: #f2f2f2;
}

/* Show dropdown on hover as fallback */
.dropdown:hover .dropdown-content {
  display: block;
}

.links-wrapper:hover{
  text-decoration-line: underline;
  cursor: pointer;
}


.show {
  display: block;
}

.header-content{
  display: flex; transition: margin-left .3s ease;
}

/* Sub-stage styling */
.sub-stage {
  margin-top: 0.5em;
  padding-left: 1em;
  border-left: 1px solid rgba(0, 166, 214, 0.3);
}

.locked {
  color: #5a6a7a;
  font-style: italic;
  margin-left: 10px;
}

/* Admin dropdown menu in header */
.admin-dropdown {
  position: relative;
}

.admin-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: -0.5rem;
}

.admin-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 1100;
  overflow: hidden;
  padding-top: 0.5rem;
}

.admin-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: transparent;
}

.admin-dropdown:hover .admin-dropdown-menu {
  display: block;
}

.admin-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.admin-dropdown-menu a:hover {
  background: #f1f5f9;
}

.admin-dropdown-menu a i {
  width: 18px;
  color: #64748b;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.sidebar-overlay.active {
  display: block;
}

@media (max-width: 768px) {
  .sidebar {
    width: 260px;
    left: -260px;
  }
  .sidebar.open {
    left: 0;
  }

  .admin-dropdown-menu {
    right: auto;
    left: 0;
  }
}