* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;

    font-family: Arial, sans-serif;
    background: #eef4f7;
    color: #17304f;
}

.player {
    width: min(92vw, 420px);
    padding: 28px;

    background: white;
    border-radius: 18px;
    text-align: center;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.12);
}

.now-playing {
    margin: 25px 0;
}

#cover {
    display: block;
    width: min(100%, 255px);
    aspect-ratio: 1 / 1;
    object-fit: cover;

    margin: 0 auto 22px auto;
    border-radius: 16px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}

#artistName {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

#trackTitle {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #405965;
}

#status {
    font-size: 14px;
    color: #667f96;
}

.radios {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

button {
    width: 100%;
    padding: 15px;

    border: none;
    border-radius: 10px;

    font-size: 16px;
    cursor: pointer;
}

.radio-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;
    min-height: 130px;
    padding: 10px 6px;

    border: 2px solid transparent;
    border-radius: 16px;

    background: #e8f1f7;
    color: #17304f;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.radio-button:hover {
    transform: translateY(-2px);
    border-color: #9fc5e3;
    background: #d8eaf5;

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.10);
}

.radio-button img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
}

.radio-button span {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.playback-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#playBtn,
#siteBtn {
    min-height: 56px;
    padding: 15px;

    background: #0b63b6;
    color: white;

    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;

    border: none;
    border-radius: 10px;

    cursor: pointer;
}

#siteBtn:hover {
    background: #09549a;
}

#playBtn:disabled,
.history-open:disabled {
    opacity: 0.45;
    cursor: default;
}

.history-open {
    margin-top: 10px;

    background: #e8f1f7;
    color: #0b63b6;

    font-size: 13px;
    font-weight: 700;
}

.history-open:hover:not(:disabled) {
    background: #d8eaf5;
}


/* HISTORIQUE */

.history {
    margin-top: 18px;
    text-align: left;
}

.history h2 {
    margin: 0 0 10px 0;
    font-size: 17px;
    color: #17304f;
}

#historyList {
    display: grid;
    gap: 5px;
}

.history-item {
    display: flex;
    align-items: center;

    min-height: 42px;
    padding: 6px 9px;

    background: #f6f9fb;
    border-radius: 8px;
}

.history-item.with-cover {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 9px;
}

.history-item img {
    width: 40px;
    height: 40px;

    object-fit: cover;
    border-radius: 6px;
}

.history-text {
    min-width: 0;
}

.history-artist {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #17304f;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-title {
    margin-top: 2px;

    font-size: 12px;
    line-height: 1.2;
    color: #60758a;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-empty {
    padding: 10px;
    text-align: center;
    font-size: 13px;
    color: #81919a;
}

.history-toggle {
    margin-top: 9px;
    padding: 9px 12px;

    background: #e8f1f7;
    color: #0b63b6;

    font-size: 13px;
    font-weight: 700;
}

.history-toggle:hover {
    background: #d8eaf5;
}


/* TELEPHONE */

@media (max-width: 480px) {

    body {
        align-items: flex-start;
        padding: 18px 0;
    }

    .player {
        width: 94vw;
        padding: 20px;
        border-radius: 16px;
    }

    .now-playing {
        margin: 22px 0;
    }

    #cover {
        width: min(100%, 255px);
    }

    #artistName {
        font-size: 19px;
        line-height: 1.3;
    }

    #trackTitle {
        font-size: 17px;
        line-height: 1.3;
    }

    #status {
        font-size: 14px;
    }

    button {
        min-height: 52px;
        font-size: 16px;
    }

    #playBtn,
    #siteBtn {
        min-height: 56px;
        font-size: 17px;
    }

    .history-open {
        min-height: 44px;
        font-size: 13px;
    }

    .history {
        margin-top: 18px;
    }

    .history-item {
        min-height: 40px;
    }

    .history-toggle {
        min-height: 40px;
        font-size: 13px;
    }
}
