/* Fixed Top Search Bar - PC Version */
.fixed-search-bar {
    position: fixed;
    top: var(--header-height, 120px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 20px 60px;
    z-index: 998;
    border-bottom: 1px solid var(--border-primary);
    transition: top 0.2s ease;
}

.search-bar-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.search-bar-container {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 2rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-secondary);
    transition: all 0.2s ease;
}

.search-bar-container:focus-within {
    border-color: var(--accent-primary);
    background: var(--bg-active);
    box-shadow: 0 0 0 2px var(--accent-shadow);
}

.search-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.search-icon {
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    opacity: 0.7;
    width: 24px;
    height: 24px;
}

.search-bar-container:focus-within .search-icon {
    color: var(--accent-primary);
    opacity: 1;
}

.search-bar-input {
    flex: 1;
    height: 56px;
    padding: 0 20px;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
}

.search-bar-input::placeholder {
    color: var(--text-tertiary);
}

.search-bar-btn {
    height: 56px;
    padding: 0 32px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--accent-primary);
    border: none;
    border-radius: 0 2rem 2rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-bar-btn:hover {
    background: var(--accent-hover);
}

.search-bar-btn:active {
    background: var(--accent-active);
}

.search-options-bar {
    max-width: 1400px;
    margin: 12px auto 0;
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
}

.search-option-input,
.search-option-select {
    height: 2.5rem;
    padding: 0 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 1.25rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-option-input {
    width: 200px;
}

.search-option-select {
    width: 160px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23B3B3B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.search-option-input:hover,
.search-option-select:hover {
    border-color: var(--border-secondary);
    background: var(--bg-hover);
}

.search-option-input:focus,
.search-option-select:focus {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.search-option-input::placeholder {
    color: var(--text-disabled);
}

.search-option-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Search History Dropdown */
.search-history-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 1rem;
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 32px var(--shadow-md);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-history-dropdown.hidden {
    display: none;
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
}

.search-history-header span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-history-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.clear-history-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.search-history-list {
    padding: 8px 0;
}

.search-history-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-history-item:hover {
    background: var(--bg-hover);
}

.search-history-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    opacity: 0.7;
}

.search-history-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-history-item-delete {
    width: 20px;
    height: 20px;
    margin-left: 12px;
    color: var(--text-disabled);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-history-item:hover .search-history-item-delete {
    opacity: 1;
}

.search-history-item-delete:hover {
    color: var(--text-primary);
}

.search-history-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-disabled);
    font-size: 0.9rem;
}

/* Playlist Dropdown */
.playlist-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 400px;
    max-height: 500px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 32px var(--shadow-md);
    z-index: 1001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.playlist-dropdown.hidden {
    display: none;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
}

.playlist-header span:first-child {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.playlist-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.playlist-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.playlist-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-disabled);
    font-size: 0.9rem;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-primary);
}

.playlist-item:hover {
    background: var(--bg-hover);
}

.playlist-item.active {
    background: var(--bg-hover);
    border-left: 3px solid var(--accent-primary);
}

.playlist-item-art {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-item.active .playlist-item-name {
    color: var(--accent-primary);
}

.playlist-item-artist {
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-item-delete {
    width: 24px;
    height: 24px;
    margin-left: 12px;
    color: var(--text-disabled);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.playlist-item:hover .playlist-item-delete {
    opacity: 1;
}

.playlist-item-delete:hover {
    color: var(--text-primary);
    background: var(--border-secondary);
}
