* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, #312e81, #0f0c29 65%);
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-bar.open {
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

.search-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease;
}

.search-icon:hover {
    background: rgba(129, 140, 248, 0.15);
}

.magnifier {
    position: relative;
    width: 18px;
    height: 18px;
    border: 3px solid #c7d2fe;
    border-radius: 50%;
    transition: border-color 0.3s ease;
}

.magnifier::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: -7px;
    width: 9px;
    height: 3px;
    background: #c7d2fe;
    border-radius: 3px;
    transform: rotate(45deg);
    transition: background 0.3s ease;
}

.search-bar.open .magnifier,
.search-bar.open .magnifier::after {
    border-color: #818cf8;
    background: #818cf8;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    width: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, padding 0.45s ease;
}

.search-input::placeholder {
    color: #8b93c4;
}

.search-bar.open .search-input {
    width: 280px;
    padding-right: 24px;
    opacity: 1;
}

.hint {
    color: #9aa3d1;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .search-bar.open .search-input {
        width: 170px;
    }
}