/* =======================
   Top Navigation / Desktop
======================= */
nav {
  background-color: #333;
  color: white;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.logo {
  font-size: 1.2rem;
  color: white;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links li a {
  color: white;
  font-weight: bold;
}

.nav-links li a:hover {
  text-decoration: underline;
}

.menu-toggle {
  display: none; /* hidden on desktop */
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 2100;
}

/* =======================
   Mobile Drawer Menu
======================= */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 70%;
  max-width: 300px;
  height: 100%;
  background-color: #333;
  color: white;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 2000;
  padding: 2rem;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
}

.mobile-menu li {
  margin: 15px 0;
}

.mobile-menu a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.mobile-menu a:hover {
  text-decoration: underline;
}

/* =======================
   Cards
======================= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.card {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  flex: 1 1 calc(50% - 20px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card-link {
  display: inline-block;
  margin-top: 10px;
  color: #0066cc;
  font-weight: bold;
}

.card-link:hover {
  text-decoration: underline;
}

/* =======================
   Footer
======================= */
footer {
  text-align: center;
  padding: 20px;
  background-color: #f0f0f0;
  margin-top: 20px;
}

/* =======================
   Responsive
======================= */
@media (max-width: 768px) {
  /* Hide desktop nav links on mobile */
  .nav-links {
    display: none;
  }

  /* Show hamburger menu */
  .menu-toggle {
    display: block;
  }

  /* Cards stack vertically on mobile */
  .card {
    flex: 1 1 100%;
  }






body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  background: #333;
  color: white;
  padding: 10px;
  text-align: center;
}

.tabs {
  display: flex;
  background: #f4f4f4;
  border-bottom: 1px solid #ccc;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: #ddd;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.tab-btn.active {
  background: #fff;
  border-bottom: 3px solid #007BFF;
}

.editor-container {
  display: flex;
  flex-direction: column;
}

.editor {
  width: 100%;
  height: 200px;
  font-family: monospace;
  padding: 10px;
  border: 1px solid #ccc;
  resize: vertical;
}

.hidden {
  display: none;
}

.controls {
  margin: 10px 0;
  text-align: center;
}

.controls button {
  padding: 8px 12px;
  margin: 5px;
  font-size: 14px;
  cursor: pointer;
}

.preview-container {
  margin: 20px;
}

#preview {
  width: 100%;
  height: 300px;
  border: 1px solid #ccc;
}