.search-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-bar {
  width: min(400px, calc(100vw - 32px));
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.020);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  cursor: text;
  will-change: width;
  transition:
    width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s ease;
}

.search-bar:hover {
  background: rgba(255, 255, 255, 0.032);
  border-color: rgba(255, 255, 255, 0.28);
}

.search-bar:focus-within {
  border-color: #22c55e;
}

.search-icon {
  flex: 0 0 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: #bbb;
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-bar:hover .search-icon {
  opacity: 0.9;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 17px;
  padding: 0;
  text-align: center;
  transition: color 0.2s ease;
}

.search-bar input::placeholder {
  color: #5d5d5d;
  transition: color 0.2s ease;
}

.search-bar input:not(:focus) {
  color: #5d5d5d;
}

.search-bar:hover:not(:focus-within) input,
.search-bar:hover:not(:focus-within) input::placeholder {
  color: #ffffff;
}

.search-bar:focus-within input,
.search-bar:focus-within input::placeholder {
  color: #22c55e;
}

.right-spacer {
  flex: 0 0 32px;
}

.icon-circles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 0;
  overflow: hidden;
  margin-left: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    width       0.45s cubic-bezier(0.4, 0, 0.2, 1),
    margin-left 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity     0.35s ease;
}

.icon-circles.show {
  width: 96px;
  margin-left: 10px;
  opacity: 1;
  pointer-events: all;
}

.icon-circle {
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.020);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icon-circle:hover {
  background: rgba(255, 255, 255, 0.032);
  border-color: rgba(255, 255, 255, 0.3);
}

.overlay-box {
  position: absolute;
  top: calc(100% + 30px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.020);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.overlay-box.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ============================================
   Mobile Responsiveness
   ============================================ */

@media (max-width: 480px) {
  .search-wrapper {
    width: 100%;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    box-sizing: border-box;
  }

  .search-bar {
    width: min(100%, 360px);
    max-width: 100%;
  }
}