/* ============================================================
   MUSICFLOW — CSS VARIABLES
   ============================================================ */
:root {
    --mf-primary:   #af2d26;
    --mf-secondary: #962720;
    --mf-hover:     #7d201b;
    --mf-player:    #8f241f;
    --mf-text:      #ffffff;
    --mf-subtext:   #f5d4d1;
    --mf-card:      #000000;
    --mf-card2:     #000000;
    --mf-radius:    16px;
}

#musicflow * { box-sizing: border-box; }

#musicflow {
    background: var(--mf-primary);
    width: 100%;
    min-height: 100%;
}

/* ============================================================
   LAYOUT WRAPPERS  (full-bleed — fills the page)
   ============================================================ */
.mf-wrap,
.mf-player-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px 20px;
}

/* ============================================================
   HEADER + SEARCH
   ============================================================ */
.mf-header h1 { font-size: 34px; margin-bottom: 20px; color: var(--mf-text); }

#mf-search,
.mf-song-search {
    width: 100%;
    margin-top: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--mf-radius);
    background: #000;
    color: #fff;
    font-size: 18px;
    outline: none;
}
#mf-search::placeholder,
.mf-song-search::placeholder { color: #888; }

.mf-song-search { margin-bottom: 14px; font-size: 16px; padding: 14px; }

/* ============================================================
   PLAY LATEST BANNER (home page)
   ============================================================ */
.mf-latest-banner {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #000;
    border: 2px solid var(--mf-secondary);
    border-radius: var(--mf-radius);
    color: var(--mf-text);
    padding: 16px 18px;
    cursor: pointer;
    margin-bottom: 20px;
    text-align: left;
    transition: background 0.2s, transform 0.2s;
}
.mf-latest-banner:hover { background: var(--mf-hover); transform: translateY(-2px); }
.mf-latest-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--mf-secondary); border-radius: 50%; font-size: 18px;
}
.mf-latest-text { display: flex; flex-direction: column; gap: 2px; }
.mf-latest-text strong { font-size: 17px; }
.mf-latest-text small { font-size: 12px; color: var(--mf-subtext); }

/* ============================================================
   SECTION LABEL + RECENTLY PLAYED
   ============================================================ */
.mf-section-label {
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 700;
    margin: 6px 0 8px;
}
.mf-recent-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.mf-recent-chip {
    background: #000;
    border: 1px solid var(--mf-secondary);
    color: var(--mf-text);
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}
.mf-recent-chip:hover { background: var(--mf-hover); }

/* ============================================================
   ARTIST GRID (cards on the artists list page)
   ============================================================ */
.mf-wrap .mf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.mf-artist {
    background: #000;
    border: 2px solid var(--mf-primary);
    color: var(--mf-text);
    border-radius: var(--mf-radius);
    padding: 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: background 0.2s, transform 0.2s;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
}
.mf-artist:hover { background: var(--mf-hover); transform: translateY(-2px); }
.mf-play-icon { font-size: 18px; opacity: 0.7; }

/* ============================================================
   PAGINATION
   ============================================================ */
.mf-pagination { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.mf-btn-page {
    background: var(--mf-card);
    border: none;
    color: var(--mf-text);
    border-radius: var(--mf-radius);
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.2s;
}
.mf-btn-page:hover { background: var(--mf-hover); }

/* ============================================================
   PLAYER BOX
   ============================================================ */
.mf-player {
    background: #000;
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--mf-primary);
}
.mf-now-label {
    color: var(--mf-subtext);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 4px 0;
}
.mf-player h2 { font-size: 26px; margin: 0 0 4px 0; line-height: 1.2; color: var(--mf-text); }
.mf-artist-label {
    color: var(--mf-subtext);
    margin: 0 0 16px 0;
    font-size: 14px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.mf-tag-label { opacity: 0.6; }
#mf-audio { display: none; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.mf-progress-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.mf-progress-wrap span { color: var(--mf-subtext); font-size: 12px; min-width: 36px; text-align: center; }
.mf-progress-bar {
    flex: 1; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px; cursor: pointer; overflow: hidden;
}
.mf-progress-fill { height: 100%; background: #fff; border-radius: 4px; width: 0%; transition: width 0.3s linear; }

/* ============================================================
   PLAYER CONTROLS
   ============================================================ */
.mf-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.mf-ctrl-btn {
    background: none; border: none; color: var(--mf-text); cursor: pointer;
    padding: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s; width: 44px; height: 44px;
}
.mf-ctrl-btn svg { width: 28px; height: 28px; }
.mf-ctrl-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.1); }
.mf-ctrl-play { width: 56px; height: 56px; background: rgba(255,255,255,0.15); }
.mf-ctrl-play svg { width: 34px; height: 34px; }
.mf-ctrl-play:hover { background: rgba(255,255,255,0.25); }

/* Shuffle active state — bold, obvious "in use" look */
.mf-shuffle-on {
    background: var(--mf-secondary);
    color: #fff;
    box-shadow: 0 0 0 2px #fff inset;
    transform: scale(1.05);
}
.mf-shuffle-on:hover { background: var(--mf-secondary); transform: scale(1.1); }

/* ============================================================
   VOLUME
   ============================================================ */
.mf-volume-wrap { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.mf-vol-btn { width: 38px; height: 38px; flex-shrink: 0; }
.mf-vol-btn svg { width: 22px; height: 22px; }
.mf-volume-slider {
    -webkit-appearance: none; appearance: none;
    width: 90px; height: 4px; border-radius: 4px;
    background: rgba(255,255,255,0.25); outline: none; cursor: pointer;
}
.mf-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; cursor: pointer; }
.mf-volume-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; cursor: pointer; border: none; }

/* ============================================================
   BACK BUTTON
   ============================================================ */
.mf-back-btn {
    background: rgba(255,255,255,0.1); border: none; color: var(--mf-text);
    border-radius: var(--mf-radius); padding: 10px 20px; cursor: pointer;
    font-size: 14px; transition: background 0.2s; display: inline-block;
}
.mf-back-btn:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   AD CONTAINER
   ============================================================ */
.mf-ad-container { width: 100%; text-align: center; min-height: 10px; overflow: hidden; margin-bottom: 16px; }

/* ============================================================
   SONG LIST (player page) — FLAT, fills the page (no bordered cards)
   ============================================================ */
.mf-player-page .mf-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.mf-song-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    overflow: hidden;
    transition: background 0.2s;
}
.mf-song-row:last-child { border-bottom: none; }
.mf-song-row:hover { background: rgba(255,255,255,0.04); }
.mf-song-active { background: rgba(255,255,255,0.06); }

/* ============================================================
   LIST PLAY/PAUSE BUTTON
   ============================================================ */
.mf-list-play-btn {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
    background: none; border: none; cursor: pointer; transition: background 0.15s;
    color: var(--mf-text); padding: 14px 14px; text-align: left; width: 100%;
}
.mf-list-play-btn:hover { background: rgba(255,255,255,0.05); }

.mf-list-play-btn .mf-song-num        { display: flex; font-size: 13px; color: var(--mf-subtext); min-width: 20px; justify-content: center; flex-shrink: 0; }
.mf-list-play-btn .mf-eq-bars         { display: none; flex-shrink: 0; }
.mf-list-play-btn .mf-list-play-icon  { display: none; width: 20px; height: 20px; flex-shrink: 0; }
.mf-list-play-btn .mf-list-pause-icon { display: none; width: 20px; height: 20px; flex-shrink: 0; }

.mf-list-play-btn:not(.mf-list-active):hover .mf-song-num      { display: none; }
.mf-list-play-btn:not(.mf-list-active):hover .mf-list-play-icon { display: block; color: #fff; }

.mf-list-play-btn.mf-list-playing .mf-song-num       { display: none; }
.mf-list-play-btn.mf-list-playing .mf-eq-bars         { display: inline-flex; }
.mf-list-play-btn.mf-list-playing .mf-list-play-icon  { display: none; }
.mf-list-play-btn.mf-list-playing .mf-list-pause-icon { display: none; }

.mf-list-play-btn.mf-list-playing:hover .mf-eq-bars         { display: none; }
.mf-list-play-btn.mf-list-playing:hover .mf-list-pause-icon  { display: block; color: #fff; }
.mf-list-play-btn.mf-list-playing:hover .mf-list-play-icon   { display: none; }

.mf-list-play-btn.mf-list-paused .mf-song-num      { display: none; }
.mf-list-play-btn.mf-list-paused .mf-eq-bars        { display: none; }
.mf-list-play-btn.mf-list-paused .mf-list-play-icon { display: block; color: var(--mf-primary); }

/* ============================================================
   SONG INFO
   ============================================================ */
.mf-song-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-song-info strong {
    font-size: 15px; display: block; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; font-weight: 600; color: var(--mf-text);
}
.mf-song-artist { font-size: 12px; color: var(--mf-subtext); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-song-active .mf-song-info strong { color: var(--mf-primary); }

/* ============================================================
   DOWNLOAD BUTTON
   ============================================================ */
.mf-download-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: rgba(255,255,255,0.05); border: none;
    border-left: 1px solid rgba(255,255,255,0.08);
    color: var(--mf-subtext); padding: 0 14px; text-decoration: none;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s; min-width: 70px; align-self: stretch; text-align: center; flex-shrink: 0;
}
.mf-download-btn svg { width: 18px; height: 18px; }
.mf-download-btn:hover { background: var(--mf-hover); color: var(--mf-text); }

/* ============================================================
   EQ BARS
   ============================================================ */
.mf-eq-bars { display: none; align-items: flex-end; gap: 2px; height: 18px; width: 20px; flex-shrink: 0; }
.mf-eq-bars span { display: block; width: 3px; border-radius: 2px; background: var(--mf-primary); height: 6px; }
.mf-eq-bars.mf-eq-playing span:nth-child(1) { animation: mf-eq-bounce 0.8s ease-in-out infinite alternate; animation-delay: 0s; }
.mf-eq-bars.mf-eq-playing span:nth-child(2) { animation: mf-eq-bounce 0.8s ease-in-out infinite alternate; animation-delay: 0.2s; }
.mf-eq-bars.mf-eq-playing span:nth-child(3) { animation: mf-eq-bounce 0.8s ease-in-out infinite alternate; animation-delay: 0.4s; }
@keyframes mf-eq-bounce { 0% { height: 4px; } 50% { height: 14px; } 100% { height: 7px; } }
.mf-eq-bars.mf-eq-paused span { animation: none; height: 8px; opacity: 0.5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .mf-player h2 { font-size: 20px; }
    .mf-song-info strong { font-size: 16px; }
    .mf-song-artist { font-size: 13px; }
    .mf-list-play-btn { padding: 16px 14px; gap: 14px; }
    .mf-download-btn { min-width: 64px; padding: 8px; font-size: 10px; }
    .mf-wrap .mf-grid { grid-template-columns: 1fr; }
    .mf-controls { flex-wrap: nowrap; gap: 8px; justify-content: center; }
    .mf-ctrl-play { width: 48px; height: 48px; }
    .mf-ctrl-play svg { width: 28px; height: 28px; }
    .mf-ctrl-btn { width: 38px; height: 38px; }
    .mf-ctrl-btn svg { width: 22px; height: 22px; }
    .mf-volume-wrap { margin-left: 0; }
    .mf-volume-slider { width: 55px; }
    .mf-vol-btn { width: 34px; height: 34px; }
}