/* Layout */
body {
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #2e2e2e;
  font-family: 'Segoe UI', sans-serif;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background-color: #f0f0f0;
  padding: 20px;
  border-right: 1px solid #ccc;
}

.sidebar h2 {
  font-size: 18px;
  margin-bottom: 15px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar button {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  background-color: #007acc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.sidebar button:hover {
  background-color: #005fa3;
}

.main-content {
  flex: 1;
  padding: 30px;
  background-color: white;
}

/* Code block */
pre[class*="language-"] {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
  background: #f5f5f5;
  padding: 15px;
  border-radius: 6px;
  overflow: auto;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

code[class*="language-"] {
  white-space: pre-wrap;
}

/* Container & buttons */
h1 {
  text-align: center;
  color: #007acc;
  margin-top: 0;
}

button {
  background-color: #007acc;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 15px;
}

button:hover {
  background-color: #005fa3;
}

.result-correct {
  color: green;
  font-weight: bold;
}

.result-wrong {
  color: red;
  font-weight: bold;
}

.option-label {
  display: block;
  margin: 10px 0;
  cursor: pointer;
}

.option-text {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  white-space: pre-wrap;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

.option-text input[type="radio"],
.option-text input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.full-label {
  display: inline;
}

.short-label {
  display: none;
}


@media (max-width: 768px) {

  .full-label {
    display: none;
  }

  .short-label {
    display: inline;
  }
  
  .app-layout {
    flex-direction: column; /* Stack sidebar on top if needed */
  }

  .sidebar {
    width: 100%;
    padding: 10px 0;
    border-right: none;
    border-bottom: 1px solid #ccc;
    background-color: #f0f0f0;
  }

  .sidebar h2 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 10px;
  }

  .sidebar ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  .sidebar li {
    margin: 0;
  }

  .sidebar button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 16px;
    border-radius: 50%;
  }

  .test-button {
    position: relative;
    display: inline-block;
  }

  .test-button::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .test-button:hover::after {
    opacity: 1;
  }
}

/* Donation floating icon */
.donation-fab {
  position: fixed;
  top: 15px;
  right: 15px;
  font-size: 16px;
  cursor: pointer;
  z-index: 999;
  background: #ffb347;
  color: #000;
  padding: 8px 14px;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.3s;
}

.donation-fab:hover {
  background: #ff9800;
}

.donation-text {
  font-size: 15px;
}

/* Donation popup box */
.donation-box {
  display: none;
  position: fixed;
  top: 60px;
  right: 15px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 999;
  text-align: center;
}

/* Mobile button */
.donate-button {
  background-color: #00897b;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}

/* Visibility classes */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* Media query to toggle views */
@media (max-width: 768px) {
  .mobile-only {
    display: inline-block;
  }

  .desktop-only {
    display: none;
  }
}

.explanation {
  background: #eef5ff;
  padding: 10px;
  border-left: 4px solid #007acc;
  margin-top: 10px;
  font-size: 14px;
  border-radius: 5px;
}

