/* ==================================================
   DOWNLOADS PAGE
================================================== */

.downloads-page {
    padding: 20px 40px 120px 40px;
    color: white;
    min-height: calc(100vh - 140px);
}

/* Auth Prompt (Shared with Playlists) */
.auth-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.auth-prompt-content {
    text-align: center;
    max-width: 500px;
}

.auth-prompt-content h1 {
    font-size: 48px;
    margin: 0 0 16px 0;
    font-weight: 700;
}

.auth-prompt-content p {
    font-size: 18px;
    color: #b3b3b3;
    margin: 0 0 32px 0;
}

.auth-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.auth-btn {
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
    display: inline-block;
}

.auth-btn-primary {
    background-color: #514164;
    color: white;
}

.auth-btn-primary:hover {
    background-color: #6b5178;
    transform: scale(1.05);
}

.auth-btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.auth-btn-secondary:hover {
    background-color: white;
    color: #000;
    transform: scale(1.05);
}

/* Downloads Header */
.downloads-header {
    margin-bottom: 24px;
}

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

.downloads-subtitle {
    font-size: 16px;
    color: #b3b3b3;
    margin: 0;
}

/* Downloads Search */
.downloads-search {
    margin-bottom: 32px;
}

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

.downloads-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;
}

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

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

.downloads-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;
}

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

.downloads-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;
    display: inline-block;
}

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

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

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

/* Downloads List */
.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Download Item */
.download-item {
    display: grid;
    grid-template-columns: 60px 1fr 80px 120px 80px 140px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: #181818;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.download-item:hover {
    background-color: #222;
}

.download-cover {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.download-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

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

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

.download-duration,
.download-date,
.download-size {
    font-size: 14px;
    color: #b3b3b3;
}

.download-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: #282828;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.action-btn:hover {
    background-color: #333;
    transform: scale(1.1);
}

.play-btn:hover {
    background-color: #514164;
}

.download-btn:hover {
    background-color: #00B894;
}

.delete-btn:hover {
    background-color: #d63031;
}

.delete-btn {
    font-size: 24px;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .download-item {
        grid-template-columns: 60px 1fr 80px 100px 120px;
    }

    .download-size {
        display: none;
    }
}

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

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

    .download-item {
        grid-template-columns: 60px 1fr 120px;
        gap: 12px;
    }

    .download-duration,
    .download-date {
        display: none;
    }

    .downloads-search-form {
        flex-direction: column;
    }

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

    .auth-prompt-content h1 {
        font-size: 36px;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .auth-btn {
        width: 100%;
    }
}

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

    .download-item {
        grid-template-columns: 50px 1fr 100px;
        padding: 10px 12px;
    }

    .download-cover {
        width: 50px;
        height: 50px;
    }

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

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

    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}