#ayaz-toc-hud {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999999;
  background: var(--ayaz-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 15px 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: 50px;
  border: 1px solid rgba(0,0,0,0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  display: flex;
  flex-direction: column;
  align-items: center;

  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
}

#ayaz-toc-hud::-webkit-scrollbar { display: none; }

.ayaz-pos-right { right: 20px; left: auto; }
.ayaz-pos-left { left: 20px; right: auto; }

#ayaz-toc-hud.ayaz-expanded {
  width: 280px;
  border-radius: 12px;
  align-items: stretch;
}

#ayaz-toggle-btn {
  width: 30px;
  height: 30px;
  margin: 0 auto 15px auto;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 2;
  padding-bottom: 5px;
  transition: opacity 0.2s;
}

#ayaz-toggle-btn svg { width: 24px; height: 24px; }
#ayaz-toggle-btn:hover { color: #000; }

#ayaz-close-btn {
  position: absolute;
  top: 10px;
  width: 30px;
  height: 30px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  z-index: 10;
  transition: color 0.2s;
}

#ayaz-close-btn:hover { color: #d00; }

.ayaz-expanded #ayaz-close-btn { display: flex; }
.ayaz-expanded #ayaz-toggle-btn { opacity: 0; pointer-events: none; }

.ayaz-pos-right #ayaz-close-btn { left: 5px; }
.ayaz-pos-left #ayaz-close-btn { right: 5px; }

#ayaz-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.ayaz-row {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ayaz-pos-right .ayaz-row { justify-content: flex-end; }
.ayaz-pos-left .ayaz-row { justify-content: flex-start; }

.ayaz-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
  background-color: var(--ayaz-dot-color);
}

.ayaz-pos-right .ayaz-dot { margin-left: 15px; }
.ayaz-pos-left .ayaz-dot { margin-right: 15px; }

.ayaz-text {
  font-size: 13px;
  color: #444;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 0;
}

.ayaz-pos-right .ayaz-text { text-align: right; }
.ayaz-pos-left .ayaz-text { text-align: left; }

.ayaz-expanded .ayaz-text {
  opacity: 1;
  width: auto;
}

.ayaz-row.active .ayaz-dot {
  background-color: var(--ayaz-active-color);
  transform: scale(1.5);
}

.ayaz-row.active .ayaz-text {
  color: var(--ayaz-active-color);
  font-weight: 600;
}

.ayaz-row:hover .ayaz-dot { background-color: #888; }
.ayaz-row:hover .ayaz-text { color: #000; }

/* MOBILE */
@media (max-width: 768px) {

  /* mobilde kapalıysa tamamen gizle */
  :root {
    --ayaz-mobile-enabled: 0;
  }

  #ayaz-toc-hud {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    width: 40px !important;
    padding: 10px 5px !important;
    border-radius: 0 !important;
    max-height: 70vh !important;
  }

  body:not(.ayaz-toc-mobile-enabled) #ayaz-toc-hud {
    display: none !important;
  }

  .ayaz-pos-right { right: 2px !important; left: auto !important; }
  .ayaz-pos-left { left: 2px !important; right: auto !important; }

  #ayaz-toggle-btn { display: none !important; }

  .ayaz-dot {
    width: 7px;
    height: 7px;
  }

  .ayaz-pos-right .ayaz-dot { margin-left: 0 !important; }
  .ayaz-pos-left .ayaz-dot { margin-right: 0 !important; }

  #ayaz-toc-hud.ayaz-expanded {
    background: var(--ayaz-bg) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    width: 260px !important;
    border-radius: 12px !important;
    padding: 15px !important;
    align-items: stretch !important;
  }

  #ayaz-close-btn { top: 5px; }

  #ayaz-list-container { gap: 12px; margin-top: 15px; }

  .ayaz-text {
    transition: opacity 0.2s ease, width 0.2s ease;
  }

  .ayaz-expanded .ayaz-text {
    margin-left: 10px;
    margin-right: 10px;
  }
}
