/* =========================================================
   Base structure
   ========================================================= */
.dropdown { 
  position: relative; 
  display: inline-block; 
}

/* Hide default triangle */
.dropdown > summary {
  list-style: none;
}
.dropdown > summary::-webkit-details-marker { 
  display: none; 
}

/* =========================================================
   Dropdown Button (summary)
   ========================================================= */
.my-dropdown-button {
  margin: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #1b1b1b;                /* light mode text */
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.my-dropdown-button:hover {
  color: #0077cc;                /* light steel blue */
  text-shadow: 0 0 4px rgba(0, 119, 204, 0.4);
}

/* Dark mode button */
@media (prefers-color-scheme: dark) {
  .my-dropdown-button {
    color: #e2e2e2;
  }
  .my-dropdown-button:hover {
    color: #00ff99;
    text-shadow: 0 0 6px rgba(0, 255, 153, 0.6),
                 0 0 12px rgba(0, 255, 153, 0.3);
  }
}

/* =========================================================
   Dropdown Menu
   ========================================================= */
.my-dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.25rem);
  width: 14rem;
  background: #f7f8fa;
  border-radius: 0.6rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
  border: 1px solid #d0d4da;
  backdrop-filter: blur(4px);
}

/* Dark mode dropdown menu */
@media (prefers-color-scheme: dark) {
  .my-dropdown-menu {
    background: #101414;
    border-color: #2c3036;
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.1),
                inset 0 0 10px rgba(255, 255, 255, 0.02);
  }
}

/* Open state */
.dropdown[open] > .my-dropdown-menu {
  display: block;
  animation: fadeIn 200ms ease-out forwards;
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(-4px); } 
  to   { opacity: 1; transform: translateY(0); } 
}

/* =========================================================
   Menu Items
   ========================================================= */
.dd-list { 
  list-style: none; 
  margin: 0.25rem 0; 
  padding: 0.25rem 0; 
}
.dd-sub  { 
  list-style: none; 
  margin: 0.25rem 0 0.5rem 1rem; 
  padding: 0; 
}

.my-dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: #1f2937;
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 0.3rem;
}

/* Light mode hover */
.my-dropdown-item:hover {
  background: #e9eef3; /* steel blue-gray */
  color: #0077cc;
}

/* Dark mode hover */
@media (prefers-color-scheme: dark) {
  .my-dropdown-item {
    color: #e2e2e2;
  }
  .my-dropdown-item:hover {
    background: #1b1f24;
    color: #00ff99;
    text-shadow: 0 0 8px rgba(0, 255, 153, 0.6);
  }
}

.my-dropdown-item.small { font-size: 0.9rem; }
.my-dropdown-item.strong { font-weight: 600; }

/* =========================================================
   Header & Navigation
   ========================================================= */
.my-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f5f7f8;             /* light steel */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .my-header {
    background: #0b0e0f;
    color: #e2e2e2;
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.1);
  }
}

.my-nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
