 * {
         box-sizing: border-box;
 }

 body {
         margin: 0;
         font-family: 'Poppins', sans-serif;
         background-color: white;
         color: black;
         overflow-x: hidden;
 }

 header {
         text-align: center;
         padding: 2rem 1rem;
         color: #111111;
         background: rgba(255, 255, 255, 0.05);
         backdrop-filter: blur(10px);
         border-bottom: 1px solid rgba(255, 255, 255, 0.1);
 }

 h1 {
         font-family: 'fairplay-display';
         font-size: 3rem;
         margin-bottom: 0.5rem;
         color: black;
         text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
 }

 p {
         font-size: 1.1rem;
         color: #666666;
 }

 section {
         display: none;
         padding: 2rem;
         max-width: 700px;
         margin: 2rem auto;
         background: rgba(255, 255, 255, 0.03);
         border-radius: 20px;
         box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
         backdrop-filter: blur(14px);
         animation: fadeIn 0.5s ease;
 }

 section.active {
         display: block;
 }

 input,
 select,
 textarea {
         width: 100%;
         margin: 12px 0;
         padding: 14px;
         border: none;
         border-radius: 12px;
         font-size: 1rem;
         background: #2a2a2a;
         color: #ffffff;
         transition: all 0.3s ease;
 }

 input:focus,
 select:focus,
 textarea:focus {
         outline: 2px solid #ffffff;
         background: #1a1a1a;
 }

 button.action {
         background-color: #ffffff;
         color: #000000;
         font-weight: bold;

         border-radius: 12px;
         padding: 14px;
         transition: all 0.3s ease;
         cursor: pointer;
         box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
         border: 2px solid black;
         /* 2px thick white border */

 }

 button.action:hover {
         background-color: #000000;
         color: #ffffff;

         box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
 }

 .output-box {
         background: #000000;
         color: #00ff90;
         padding: 1rem;
         border-radius: 15px;
         font-family: 'Courier New', monospace;
         margin-top: 1rem;
         white-space: pre-wrap;
         word-wrap: break-word;
         box-shadow: 0 0 10px rgba(0, 255, 144, 0.3);
 }

 @keyframes fadeIn {
         from {
                 opacity: 0;
                 transform: translateY(10px);
         }

         to {
                 opacity: 1;
                 transform: translateY(0);
         }
 }

 @media (max-width: 768px) {
         h1 {
                 font-size: 2rem;
         }

         nav {
                 display: flex;
                 flex-wrap: wrap;
                 justify-content: center;
                 gap: 1rem;
                 /* Add spacing between buttons */
                 margin-top: 1.5rem;
                 padding: 0 1rem;
         }

         nav button {
                 padding: 12px 20px;
                 border: 2px solid black;
                 border-radius: 25px;
                 background-color: black;
                 /* Make button background visible */
                 color: white;
                 font-size: 1rem;
                 cursor: pointer;
                 transition: background-color 0.3s ease;
                 
         }

         nav button:hover {
                 background-color: #333;
         }



         section {
                 padding: 1rem;
                 margin: 1rem;
         }

         input,
         select,
         button.action,
         textarea {
                 padding: 12px;
                 font-size: 0.95rem;
                 border: 2px solid black;
                 /* 2px thick white border */
         }

         .output-box {
                 font-size: 0.9rem;
                 padding: 0.8rem;
         }
 }

 .step-card {
         background: #f9f9ff;
         border: 1px solid #e0e0f0;
         border-left: 6px solid #6c63ff;
         border-radius: 10px;
         padding: 3px 1px;
         margin: 1px 0;
         box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
 }

 .step-title {
         font-weight: bold;
         font-size: 1.1rem;
         margin-bottom: 6px;
         color: #6c63ff;
 }

 .step-value {
         font-weight: bold;
         color: #333;
 }

 .parity {
         display: inline-block;
         background: #6c63ff;
         color: #fff;
         padding: 2px 6px;
         border-radius: 4px;
         font-weight: bold;
 }

 .bit-display {
         background: #eee;
         display: inline-block;
         padding: 1px 1px;
         border-radius: 6px;
         font-family: monospace;
         margin-top: 0px;
 }

 #hammingExplain {
         transition: all 0.3s ease;
 }

 .top-header {
         display: flex;
         align-items: center;
         justify-content: space-between;
         padding: 12px 20px;
         background-color: white;
         border-bottom: 1px solid #ccc;
         flex-wrap: wrap;
         gap: 10px;
 }




 /* Header center section */
 .header-center {
         text-align: center;
         flex: 1;
         min-width: 200px;
 }

 .site-title {
         font-weight: bold;
         font-size: 1.2rem;
 }

 .site-subtitle {
         font-size: 0.75rem;
         color: #555;
         margin-top: 4px;
 }

 /* Auth area */
 .auth-container {
         display: flex;
         align-items: center;
         gap: 10px;
 }

 .action {
         border: 2px solid black;
         padding: 6px 12px;
         background: white;
         cursor: pointer;
         border-radius: 8px;
 }

 /* Main Nav */
 .main-nav {
         display: flex;
         justify-content: center;
         flex-wrap: wrap;
         gap: 12px;
         margin: 16px 0;
         color: black;
 }

 .main-nav button {
         padding: 10px 16px;
         font-size: 0.95rem;
         border-radius: 20px;
         border: 2px solid black;
         background: white;
         color: black;
         cursor: pointer;
 }

 nav {
         display: flex;
         flex-wrap: wrap;
         justify-content: center;
         gap: 12px;
         margin-top: 1.5rem;
 }

 nav button {
         padding: 12px 18px;
         border: 2px solid black;
         border-radius: 25px;
         background-color: #000;
         color: #fff;
         font-size: 1rem;
         cursor: pointer;
         transition: background-color 0.3s ease;
 }

 nav button:hover {
         background-color: #222;
 }

 /* ✅ Menu Button */
 .menu-button {
         background: black;
         color: white;
         border: none;
         font-size: 1.5rem;
         padding: 6px 12px;
         cursor: pointer;
         border-radius: 6px;
         position: relative;
         z-index: 1001;
 }

 /* ✅ Dropdown Menu */
 .dropdown-menu {
         display: none;
         position: absolute;
         top: 48px;
         /* just below button */
         left: 10px;
         background-color: #fff;
         border: 1px solid #ccc;
         border-radius: 8px;
         padding: 10px 0;
         min-width: 160px;
         z-index: 1000;
         box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
         flex-direction: column;
 }

 .dropdown-menu a {
         display: block;
         padding: 10px 16px;
         text-decoration: none;
         color: black;
         transition: background 0.3s ease;
 }

 .dropdown-menu a:hover {
         background-color: #f0f0f0;
 }

 /* ✅ Top Bar Layout */
 .top-bar {
         display: flex;
         justify-content: space-between;
         align-items: center;
         background: white;
         border-bottom: 1px solid #ccc;
         padding: 0.75rem 1rem;
         position: relative;
         z-index: 999;
         flex-wrap: wrap;
 }

 .top-bar-left {
         position: relative;
 }

 .top-bar-center {
         width: 100%;
         text-align: center;
         margin-top: 1rem;
         position: relative;
         z-index: 1;
         /* Ensures dropdown overlaps center, not pushed by it */
 }

 .top-bar-right {
         display: flex;
         align-items: right;
         gap: 10px;
 }

 /* ✅ Responsive */
 @media (max-width: 768px) {
         .top-bar {
                 display: flex;
                 align-items: right;
         }

         .top-bar-center {
                 margin-top: 2rem;
                 text-align: center;
                 width: 100%;
         }

         .dropdown-menu {
                 left: 0;
                 right: auto;
                 top: 48px;
         }
         .nav button{
          flex: 1 1 100%; 
         }
 }
 
 .modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background: #fff;
  margin: 15% auto;
  padding: 20px;
  width: 300px;
  text-align: center;
  border-radius: 10px;
}

.modal-buttons button {
  margin: 10px;
  padding: 10px 20px;
  border-radius: 6px;
}
.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #28a745;
  color: white;
  text-align: center;
  border-radius: 8px;
  padding: 12px 20px;
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.5s ease, top 0.5s ease;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  top: 40px;
}

