/* -------------------------------------- */
/* 1. MAIN DOWNLOAD CARD LAYOUT           */
/* -------------------------------------- */
.download-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--neon-blue);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Repeating background pattern */
    background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="p" width="20" height="20" patternUnits="userSpaceOnUse" patternTransform="scale(0.8) rotate(45)"><path d="M 0 5 L 10 0 L 20 5 L 10 10 Z" fill="rgba(0,0,0,0.1)" stroke="rgba(0,0,0,0.2)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23p)"/></svg>');
    background-size: 50px;
    opacity: 0.05;
    pointer-events: none;
}

/* -------------------------------------- */
/* 2. ALBUM ART & MEDIA CONTROLS          */
/* -------------------------------------- */
.album-art-large {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
    display: inline-block;
}
.album-art-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.play-icon-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5em;
    color: #fff;
    background-color: rgba(0, 234, 255, 0.25);
    border-radius: 50%;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}
.play-icon-large:hover {
    background-color: rgba(0, 234, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.6);
    transform: translate(-50%, -50%) scale(1.1);
}
.play-icon-large.playing {
    background-color: rgba(0, 234, 255, 0.8);
    color: #fff;
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.8);
    width: 76px; 
    height: 76px; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* -------------------------------------- */
/* 3. SONG DETAILS & OPTIONS              */
/* -------------------------------------- */
.song-download-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.song-main-info .song-title-download {
    font-weight: bold;
    font-size: 1.5em;
    margin-bottom: 5px;
    min-width: fit-content;
    width: 100px;
}
.song-main-info .artist-album-download {
    color: var(--text-muted);
    font-size: 1em;
}
.download-options {
    margin-top: 10px;
}
.option-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.95em;
}
.option-row span:first-child {
    color: var(--text-muted);
    flex-basis: 30%;
}
.option-row span:nth-child(2) {
    flex-basis: 35%;
}
.option-row .quality-tag-dl {
    color: var(--neon-blue);
    font-weight: bold;
    text-align: right;
    flex-basis: 35%;
}
.artist-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.artist-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* -------------------------------------- */
/* 4. BUTTONS & PROGRESS BAR              */
/* -------------------------------------- */
/* Main Download Button Styling */
.alt-download-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: var(--alt-btn-bg);
    color: var(--text-light);
    border: 1px solid var(--text-muted);
}
.alt-download-btn:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    background-color: #2a303f;
}

.progress-bar-wrapper {
    width: 100%;
    background-color: var(--progress-bg);
    height: 8px;
    border-radius: 4px;
    margin-top: 20px;
    position: relative;
}
.progress-bar {
    height: 100%;
    background-color: var(--neon-blue);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease-out;
}
.progress-text {
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 0.85em;
    color: var(--text-muted);
    text-align: left;
}

/* -------------------------------------- */
/* 5. RECENT UPLOADS GRID                 */
/* -------------------------------------- */
.recent-uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px;
    width: 100%;
    margin-bottom: 40px;
}
.recent-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    transition: transform 0.2s;
}
.recent-card:hover {
    transform: translateY(-5px);
}
.recent-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}
.recent-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
}
.recent-title {
    font-weight: bold;
    color: var(--text-light);
}
.recent-artist {
    color: var(--text-muted);
    font-size: 0.85em;
}
.download-count {
    font-size: 0.8em;
    color: var(--neon-blue);
    margin-top: 2px;
    font-weight: bold;
}
.small-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    text-align: center;
    width: 100%; 
    margin-top: 5px;
}

/* -------------------------------------- */
/* 6. RESPONSIVE DESIGN (Mobile)          */
/* -------------------------------------- */
@media (max-width: 768px) {
    .download-card { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
        padding: 20px; 
    }
    .album-art-large { 
        margin-bottom: 20px; 
        width: 250px;
        height: 250px;
    }
    .song-download-details { 
        width: 100%; 
    }
    .song-main-info .song-title-download {
        font-size: 1.3em;
    }
    .option-row { 
        flex-direction: column; 
        align-items: flex-start; 
        margin-bottom: 10px; 
    }
    .option-row span:first-child,
    .option-row span:nth-child(2),
    .option-row .quality-tag-dl { 
        flex-basis: auto; 
        width: 100%; 
        text-align: left; 
    }
    .option-row .quality-tag-dl { 
        margin-top: 5px; 
    }
    /* Ensure the grid stacks vertically on mobile */
    .recent-uploads-grid {
        grid-template-columns: 1fr;
    }
}