/* Search Bar Styles */
.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-bar form {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.search-bar form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.15);
    transform: translateY(-2px);
}

.search-bar input[type="text"] {
    flex-grow: 1;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    background-color: transparent;
    outline: none;
    font-family: 'Nunito', sans-serif;
}

.search-bar button {
    background-color: transparent;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    color: #5f6368;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Search Results Styles */
#search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    background-color: white;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#search-results::-webkit-scrollbar {
    width: 6px;
}

#search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#search-results::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    opacity: 0.7;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: #ff45a0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: rgba(255, 105, 180, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item img {
    margin-right: 15px;
    border-radius: 5px;
    width: 60px;
    height: 60px;
    object-fit: cover;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.search-result-item div {
    display: flex;
    flex-direction: column;
}

.search-result-item a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.search-result-item a:hover {
    color: var(--primary-color);
}

.search-result-item p {
    margin: 0;
    font-size: 0.9em;
    color: var(--light-text);
}

#search-results button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #f8f9fa;
    border: none;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Nunito', sans-serif;
}

#search-results button:hover {
    background-color: rgba(255, 105, 180, 0.1);
    color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .search-bar {
        margin: 10px 0;
        max-width: 100%;
        width: 100%;
    }
    
    .search-bar form {
        width: 100%;
    }
    
    #search-results {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .search-bar input[type="text"] {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .search-bar button {
        padding: 8px 15px;
    }
    
    .search-result-item {
        padding: 12px;
    }
    
    .search-result-item img {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
}