/* =========================================================
   CLASSICX FM — HISTORY / PLAYED TRACKS
========================================================= */

.history-hero {
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    margin: 0 0 2rem;
    padding: 2.5rem 3rem;
    background: #17181d;
    color: #ffffff;
}

.history-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 62%;
}

.history-live-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .45rem;
    margin-bottom: 1rem;
    padding: .38rem .75rem;
    border: 1px solid rgba(255, 0, 122, .7);
    border-radius: 999px;
    background: rgba(255, 0, 122, .12);
    color: #ffffff;
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.history-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1;
}

.history-hero p {
    margin: .45rem 0 0;
    color: var(--accent-color);
    font-weight: 700;
}

.history-hero img {
    position: absolute;
    top: 0;
    right: 0;
    width: 42%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .9;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 28%
    );
}

.played-tracks-heading {
    margin-bottom: 1.5rem;
}

.played-tracks-heading h1 {
    margin: 0 0 .5rem;
    color: var(--purple-main);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
}

.played-tracks-heading h1::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 1em;
    margin-right: .55rem;
    vertical-align: -.12em;
    background: var(--accent-color);
}

.played-tracks-heading p {
    margin: 0;
    color: var(--text-muted);
}

.played-tracks-content {
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.radiodj-history-list {
    display: grid;
    gap: .65rem;
}

.radiodj-history-track {
    display: grid;
    grid-template-columns: 4rem 42px minmax(0, 1fr) minmax(8rem, auto);
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.radiodj-history-track time {
    color: var(--accent-color);
    font-weight: 800;
}

.track-cover-img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
}

.radiodj-history-track strong,
.radiodj-history-track span {
    display: block;
}

.radiodj-history-track span,
.radiodj-history-track small {
    color: var(--text-muted);
    font-size: .85rem;
}

/* =========================================================
   LAST.FM STYLE HISTORY HERO
========================================================= */

.now-playing-hero-lastfm {
    width: calc(100% + 4rem);
    min-height: 300px;
    margin: -2rem -2rem 0;
    overflow: hidden;
    background: #17181d;
    color: #ffffff;
}

.hero-inner-lastfm {
    min-height: 300px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 43%;
}

.hero-main-details {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 3rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(255, 0, 122, .15);
}

.hero-track-title {
    max-width: 760px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    font-weight: 900;
    line-height: .98;
}

.hero-track-artist {
    margin: .7rem 0 1.6rem;
    color: var(--accent-color);
    font-size: 1.15rem;
    font-weight: 800;
}

.hero-extra-meta {
    display: flex;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .5rem .75rem .5rem .5rem;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 7px;
    background: rgba(255, 255, 255, .06);
}

.meta-thumb-img {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    object-fit: cover;
}

.meta-text {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.meta-label {
    color: #aab0bf;
    font-size: .65rem;
    text-transform: uppercase;
}

.meta-value {
    color: #ffffff;
    font-size: .78rem;
    font-weight: 800;
}

.hero-visual-side {
    position: relative;
    min-width: 0;
}

.hero-cover-backdrop {
    position: absolute;
    inset: 0;
}

.hero-large-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.hero-fade-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #17181d 0%,
        rgba(23, 24, 29, .82) 8%,
        transparent 55%
    );
}

.history-main-inner {
    padding: 2rem 0 0;
}

.history-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(250px, .7fr);
    gap: 1.5rem;
}

.history-container,
.requests-container {
    min-width: 0;
}

.history-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.history-section-header h2 {
    margin: 0;
    color: var(--purple-main);
    font-size: 1.35rem;
    font-weight: 900;
}

.history-refresh,
.request-link {
    border: 0;
    border-radius: 4px;
    background: var(--purple-main);
    color: #ffffff;
    padding: .45rem .7rem;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.request-link {
    background: var(--accent-color);
}

.history-table-wrapper {
    overflow: hidden;
    border-radius: 8px;
    background: #101827;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
}

.history-table th {
    padding: .75rem 1rem;
    background: #202b3c;
    color: #aeb7c7;
    font-size: .68rem;
    text-align: left;
    text-transform: uppercase;
}

.history-table td {
    padding: .7rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .78rem;
}

.history-table .col-time {
    width: 70px;
    color: var(--accent-color);
    font-weight: 900;
}

.history-table .col-cover {
    width: 54px;
    padding-right: 0;
}

.history-table .col-artist {
    color: #9ca6b7;
}

.requests-card-wrapper {
    min-height: 130px;
    padding: .7rem;
    border-radius: 8px;
    background: #202b3c;
}

.requests-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.request-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .7rem .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #ffffff;
    font-size: .78rem;
}

.request-item span {
    color: #aab0bf;
    font-size: .72rem;
}

.placeholder-item {
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #aab0bf;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .now-playing-hero-lastfm {
        width: calc(100% + 2rem);
        margin: -1rem -1rem 0;
    }

    .hero-inner-lastfm {
        min-height: 410px;
        display: block;
    }

    .hero-main-details {
        min-height: 410px;
        justify-content: flex-start;
        padding: 1.5rem;
    }

    .hero-track-title {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .hero-visual-side {
        position: absolute;
        inset: auto 0 0;
        height: 58%;
    }

    .hero-fade-overlay {
        background: linear-gradient(
            0deg,
            #17181d 0%,
            rgba(23, 24, 29, .55) 45%,
            transparent 100%
        );
    }

    .history-main-inner {
        padding-top: 1.5rem;
    }

    .history-content-grid {
        grid-template-columns: 1fr;
    }

    .played-tracks-content {
        padding: 1rem;
    }
}

@media (max-width: 600px) {

    .history-hero {
        min-height: 330px;
        margin: 0 0 1.5rem;
        padding: 1.25rem;
    }

    .history-hero-copy {
        max-width: 100%;
        justify-content: flex-start;
        padding-top: 1rem;
    }

    .history-hero img {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 58%;
        mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            #000 32%
        );
    }

    .radiodj-history-track {
        grid-template-columns: 3rem 36px minmax(0, 1fr);
        gap: .65rem;
    }

    .radiodj-history-track small {
        grid-column: 3;
    }

    .history-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .history-table th,
    .history-table td {
        padding: .65rem .55rem;
    }

    .history-table .col-artist {
        display: none;
    }
}