.search-container {
    display: flex;
    width: 100%;
    max-width: 624px;
    margin: 0 auto;
    z-index: 100;
}

.search-container:not(.elevated) {
    position: fixed;
    top: 45vh;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.search-container.elevated {
    position: fixed;
    top: 1vh;
    inset-inline: 0;
    transform: none;
    margin: 0 auto;
    opacity: 1;
}

.search-container.fade-out {
    opacity: 0;
}

.search-box {
    flex: 1;
    padding: 12px 30px 12px 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid #444;
    border-right: 0;
    border-radius: 15px 0 0 15px;
    outline: none;
    color: #333;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-button {
    padding: 12px 24px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid #444;
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    color: black;
    backdrop-filter: blur(10px);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

body.dark .search-button img {
    filter: invert(100%);
}

.search-button i {
    width: 20px;
    height: 20px;
}

.results {
    margin-top: 6vh;
    width: 100%;
    max-width: 624px;
    color: #333333;
    text-align: left;
    line-height: 1.5;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    margin-left: auto;  
    margin-right: auto;
}

.result-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}


.result-link {
    text-align: right;
    display: block;
    text-decoration: none;
    color: #888888;
}

.results.visible {
    opacity: 1;
    margin-bottom: 0 !important;
}

.result-item {
    margin-bottom: 16px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.suggestion-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 15px;
    z-index: 1000;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: calc(7 * (24px + 16px));
    overflow: hidden;
}

/* Dark mode overrides */
body.dark .search-box {
    background: rgba(255, 255, 255, 0.08);
    border-color: #666;
    color: #e0e0e0;
}

body.dark .search-button {
    background: rgba(255, 255, 255, 0.08);
    border-color: #666;
    color: #e0e0e0;
}

body.dark .suggestion-box {
    background: #1e1e1e;
    border-color: #666;
}

body.dark .results {
    color: #e0e0e0;
}

body.dark .result-link {
    color: #999999;
}

body.dark .result-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}