/* ==================================================
   SEARCH PAGE
================================================== */

.search-page {
    padding: 20px 40px 120px 40px;
    color: white;
}

/* Search Header */
.search-header {
    margin-bottom: 40px;
}

.search-header h1 {
    font-size: 48px;
    margin: 0 0 24px 0;
    font-weight: 700;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    background-color: #222;
    border: 2px solid #333;
    color: white;
    border-radius: 24px;
    font-size: 14px;
    transition: border-color 0.2s, background-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #514164;
    background-color: #2a2a2a;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 12px 24px;
    background-color: #514164;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.search-btn:hover {
    background-color: #6b5178;
    transform: scale(1.02);
}

.clear-btn {
    padding: 12px 20px;
    background-color: #181818;
    color: white;
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.clear-btn:hover {
    background-color: #222;
}

/* Search Prompt */
.search-prompt {
    margin-bottom: 32px;
}

.search-prompt h2 {
    font-size: 32px;
    margin: 0 0 8px 0;
}

.search-prompt p {
    font-size: 16px;
    color: #b3b3b3;
    margin: 0;
}

/* Results Header */
.results-header {
    margin-bottom: 32px;
}

.results-header h2 {
    font-size: 32px;
    margin: 0 0 8px 0;
}

.results-count {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results p {
    font-size: 18px;
    color: #b3b3b3;
    margin: 8px 0;
}

.no-results-hint {
    font-size: 14px !important;
    color: #777;
}

/* Songs Grid */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* Song Card */
.song-card {
    background-color: #181818;
    padding: 16px;
    border-radius: 12px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    position: relative;
}

.song-card:hover {
    background-color: #222;
    transform: translateY(-4px);
}

.song-cover {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #282828;
}

.song-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 48px;
    height: 48px;
    background-color: #514164;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.song-card:hover .play-icon {
    transform: scale(1.1);
    background-color: #6b5178;
}

/* Song Info */
.song-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.song-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-artist {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-artist a {
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.2s;
}

.song-artist a:hover {
    color: white;
    text-decoration: underline;
}

.song-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #b3b3b3;
}

.song-separator {
    color: #666;
}

.song-duration,
.song-price {
    font-size: 12px;
}

.song-stats {
    margin-top: 4px;
}

.song-plays {
    font-size: 11px;
    color: #777;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 900px) {
    .search-page {
        padding: 20px 20px 120px 20px;
    }

    .search-header h1 {
        font-size: 36px;
    }

    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .song-card {
        padding: 12px;
    }

    .song-title {
        font-size: 14px;
    }

    .song-artist {
        font-size: 12px;
    }
}

@media screen and (max-width: 600px) {
    .search-header h1 {
        font-size: 28px;
    }

    .search-form {
        flex-direction: column;
        width: 100%;
    }

    .search-input,
    .search-btn,
    .clear-btn {
        width: 100%;
    }

    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .play-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}