/* ===========================
   AFROWAP DOWNLOAD PAGE – DARK + GREEN
   =========================== */

.afw-dl-page {
    color: #e8eaed;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /*background: #121212;*/
}

.afw-dl-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 20px;
}

/* ===========================
   HERO SECTION
   =========================== */

.afw-dl-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
    padding: 18px 0 20px;
    box-shadow: none;
}

.afw-dl-hero-left {
    flex: 1 1 280px;
    max-width: 360px;
}

/* Album cover */
.afw-dl-cover-wrap {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    border: 1px solid #232323;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6);
}

.afw-dl-cover-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.afw-dl-cover-fallback {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #181818;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid #232323;
}

.afw-dl-cover-fallback span {
    font-size: 28px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5f6368;
    font-weight: 700;
}

/* Small "Now Downloading" tag on cover */
.afw-dl-cover-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(12, 12, 12, 0.96);
    color: #e8eaed;
    padding: 4px 9px;
    font-size: 11px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #232323;
}

.afw-dl-cover-tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #0d904f;
}

/* Right column */
.afw-dl-hero-right {
    flex: 2 1 360px;
    min-width: 0;
}

/* Track info */
.afw-dl-pill {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #a3a3a3;
    margin-bottom: 6px;
}

.afw-dl-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    color: #ffffff;
}

/* ===========================
   DOWNLOAD + SEO TEXT
   =========================== */

.afw-dl-download-card {
    margin-top: 4px;
    box-shadow: none;
}

.afw-dl-download-main {
    font-size: 14px;
    color: #e8eaed;
    line-height: 1.7;
    margin-bottom: 10px;
}

.afw-dl-download-main p {
    margin: 0 0 8px;
}

.afw-dl-download-main p:last-child {
    margin-bottom: 0;
}

.afw-dl-download-main strong {
    color: #0d904f;
    font-weight: 700;
}

.afw-dl-artist-link,
.afw-dl-album-link {
    color: #19b364;
    text-decoration: none;
}

.afw-dl-artist-link:hover,
.afw-dl-album-link:hover {
    text-decoration: underline;
}

/* ===========================
   COUNTDOWN / BUTTON AREA
   =========================== */

.afw-dl-countdown-line {
    font-size: 13px;
    color: #e8eaed;
    margin: 10px 0;
}

.afw-dl-countdown-number {
    font-weight: 700;
    color: #19b364;
}

/* Buttons */
.afw-dl-primary-btn {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: #0d904f;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.65);
    transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.afw-dl-primary-btn:hover {
    background: #12aa62;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.8);
}

#afw-download-btn {
    display: none; /* JS will reveal this when countdown ends */
}

.afw-dl-note {
    font-size: 11px;
    color: #9aa0a6;
    margin-top: 6px;
}

/* ===========================
   PLAYER (SVG BUTTON + PROGRESS BAR)
   =========================== */

.afw-dl-player-shell {
    margin-top: 10px;
    margin-bottom: 8px;
    background: radial-gradient(circle at top left, #1b2420 0, #171717 45%, #121212 100%);
    border-radius: 16px;
    border: 1px solid #242b25;
    padding: 10px 12px 10px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.7);
}

/* Header row: "Preview Track" + volume on the right */
.afw-dl-player-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.afw-dl-player-header {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #a0a0a0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.afw-dl-player-header::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #0d904f;
    box-shadow: 0 0 0 4px rgba(13, 144, 79, 0.25);
}

/* Volume block at top-right */
.afw-dl-volume-top {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 220px;
}

/* Player base */
.afw-dl-player-card {
    width: 100%;
}

.afw-dl-player-container {
    width: 100%;
}

.audio-player {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Play button */
.play-button {
    min-width: 40px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid #1f3b2b;
    background: radial-gradient(circle at 30% 20%, #19b364 0, #0d904f 45%, #0a6b3a 100%);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.play-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.9);
    filter: brightness(1.06);
}

.play-button:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.85);
}

.play-button-icon {
    width: 18px;
    height: 18px;
    display: block;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

/* Loading state: hide icon, show spinner */
.play-button.loading .play-button-icon {
    opacity: 0;
}

.play-button.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #e8eaed;
    border-top-color: transparent;
    animation: afw-spin 0.8s linear infinite;
}

@keyframes afw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Player body */
.player-body {
    flex: 1 1 auto;
    min-width: 0;
}

.player-body .title {
    font-size: 12px;
    font-weight: 500;
    margin: 0 0 2px;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Progress bar */
.afw-progress-wrapper {
    width: 100%;
    margin: 4px 0 2px;
}

.afw-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25); /* grey pill */
    overflow: hidden;
    cursor: pointer;
}

.afw-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    border-radius: inherit;
    background: #0d904f; /* AfroWap green progress */
    transition: width 0.08s linear;
}

/* Controls row (now mostly timecode) */
.controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 10px;
}

/* Volume button + slider (top-right) */
.volume-button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.volume-icon {
    width: 16px;
    height: 16px;
    display: block;
}

/* Slider base */
.volume-slider {
    flex: 1 1 auto;
    cursor: pointer;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
    background: transparent;
    transition: opacity 0.12s ease;
}

/* slider track */
.volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(90deg, #0a6b3a, #19b364);
    border-radius: 999px;
}
.volume-slider::-moz-range-track {
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(90deg, #0a6b3a, #19b364);
    border-radius: 999px;
}
.volume-slider::-ms-track {
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(90deg, #0a6b3a, #19b364);
    border-radius: 999px;
    border-color: transparent;
    color: transparent;
}

/* slider thumb */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #e8eaed;
    border: 2px solid #0d904f;
    margin-top: -0.38rem;
}
.volume-slider::-moz-range-thumb {
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #e8eaed;
    border: 2px solid #0d904f;
}
.volume-slider::-ms-thumb {
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #e8eaed;
    border: 2px solid #0d904f;
}

/* Mute / disabled look */
.volume-slider[disabled],
.volume-slider.is-muted {
    cursor: default;
    opacity: 0.5;
}

.volume-slider[disabled]::-webkit-slider-runnable-track,
.volume-slider.is-muted::-webkit-slider-runnable-track {
    background: #5f6368;
}
.volume-slider[disabled]::-moz-range-track,
.volume-slider.is-muted::-moz-range-track {
    background: #5f6368;
}
.volume-slider[disabled]::-ms-track,
.volume-slider.is-muted::-ms-track {
    background: #5f6368;
}

.volume-slider[disabled]::-webkit-slider-thumb,
.volume-slider.is-muted::-webkit-slider-thumb,
.volume-slider[disabled]::-moz-range-thumb,
.volume-slider.is-muted::-moz-range-thumb,
.volume-slider[disabled]::-ms-thumb,
.volume-slider.is-muted::-ms-thumb {
    background: #9aa0a6;
    border-color: #9aa0a6;
}

/* Timecode */
.timecode {
    color: #c0c4cc;
    font-size: 10px;
    white-space: nowrap;
    margin-top: 6px;
}

/* ============================
   REPEAT BUTTON – VISIBLE GREY + GREEN ACTIVE
   ============================ */

.repeat-button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

/* Default: repaint black SVG to soft grey */
.repeat-icon {
    width: 16px;
    height: 16px;
    opacity: 0.95;
    /* turn pure black → mid-grey on dark bg */
    filter: invert(0.75) brightness(1.2) contrast(0.9);
    transition:
        opacity 0.15s ease,
        filter 0.15s ease,
        transform 0.15s ease;
}

/* Hover: slightly brighter grey + tiny zoom */
.repeat-button:hover .repeat-icon {
    opacity: 1;
    filter: invert(0.85) brightness(1.35) contrast(0.95);
    transform: scale(1.05);
}

/* Active (repeat ON): repaint black SVG → AfroWap green + glow */
.repeat-button.is-active .repeat-icon {
    /* black → green-ish */
    filter: invert(58%) sepia(63%) saturate(450%) hue-rotate(95deg)
            brightness(1.2) contrast(1.1);
    opacity: 1;
    animation: afwRepeatPulse 1.4s ease-in-out infinite;
}

/* Small pulsing effect when active */
@keyframes afwRepeatPulse {
    0% {
        transform: scale(1);
        filter: invert(58%) sepia(63%) saturate(450%) hue-rotate(95deg)
                brightness(1.15) contrast(1.05);
    }
    50% {
        transform: scale(1.16);
        filter: invert(65%) sepia(75%) saturate(520%) hue-rotate(95deg)
                brightness(1.3) contrast(1.1);
    }
    100% {
        transform: scale(1);
        filter: invert(58%) sepia(63%) saturate(450%) hue-rotate(95deg)
                brightness(1.15) contrast(1.05);
    }
}

#repeatButton {
    margin-top: 6px;
}

/* ===========================
   RANDOM ALBUMS SECTION
   =========================== */

.afw-dl-random-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    margin-top: 15px;
}

.afw-dl-random-left-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #181818;
    color: #e8eaed;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    border: 1px solid #232323;
}

.afw-dl-random-left-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #0d904f;
}

/* View all albums – flat, no shadows */
.afw-dl-random-more-link {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #3a3a3a;
    background: #121212;
    color: #e8eaed;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: none;
    transform: none;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.afw-dl-random-more-link:hover {
    background: #1c1c1c;
    color: #ffffff;
    border-color: #0d904f;
}

/* Random albums grid */
.afw-dl-random-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.afw-dl-random-item {
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    padding: 8px 8px 10px;
    background-color: #181818;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    background-image: linear-gradient(
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.04)
    );
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.afw-dl-random-item:hover {
    background: #202020;
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.75);
}

.afw-dl-random-thumb {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 7px;
    position: relative;
}

.afw-dl-random-thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.afw-dl-random-thumb-fallback {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    font-size: 12px;
}

.afw-dl-random-title {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 3px;
}

.afw-dl-random-link {
    text-decoration: none;
    color: inherit;
}

.afw-dl-random-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #a3a3a3;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 900px) {
    .afw-dl-hero {
        padding: 16px 14px 18px;
    }
}

@media (max-width: 768px) {
    .afw-dl-hero-left,
    .afw-dl-hero-right {
        max-width: 100%;
    }

    .afw-dl-title {
        font-size: 20px;
    }

    .afw-dl-download-card {
        margin-top: 10px;
    }

    .afw-dl-random-grid {
        gap: 14px;
    }

    .audio-player {
        align-items: flex-start;
    }

    .afw-dl-volume-top {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .afw-dl-inner {
        padding-inline: 12px;
    }

    .afw-dl-random-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audio-player {
        gap: 10px;
    }

    .player-body .title {
        font-size: 12px;
    }

    .play-button {
        min-width: 40px;
        min-height: 40px;
    }

    .play-button-icon {
        width: 18px;
        height: 18px;
    }
}