html {
    font-family: sans-serif;
    background: rgb(51, 51, 51);
    color: white;
    padding-top: 20px;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    text-align: center;
    flex-direction: column;
}

#tokenSection {
    display: none;
}

#deviceSection {
    display: none;
}

#playlistTrackCount {
    margin-top: 12px;
    font-size: 24px;
}

#playlistForm {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin: 0 auto 20px;
}

#playlistForm label {
    font-size: 18px;
    font-weight: 700;
}

#settingsSection {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
}

#settingsSection label {
    font-weight: 700;
}

#playDuration {
    box-sizing: border-box;
    width: 90px;
    padding: 8px 10px;
    border: 1px solid #777;
    border-radius: 5px;
    font-size: 18px;
    text-align: center;
}

.playlist-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

#playlistId {
    box-sizing: border-box;
    width: min(520px, calc(100vw - 40px));
    padding: 10px 12px;
    border: 1px solid #777;
    border-radius: 5px;
    font-size: 18px;
}

#countdown {
    margin-bottom: 20px;
    font-size: 30px;
    font-weight: bold;
}

.circle-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px;
}

.tile {
    width: 150px;
    height: 150px;
    margin: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-align: center;
    color: black;
    font-size: 20px;
    font-weight: 500;
    hyphens: auto;
    transition: opacity 0.2s ease-in-out;
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 28px;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.playlist-controls button {
    margin: 0;
    font-size: 18px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:hover {
    background-color: #45a049;
}

#earlyRevealButton {
    display: none;
}

#songDetails {
    position: relative;
    margin: 40px auto;
    padding: 20px;
    background: red;
    color: black;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 30px;
    height: 220px;
    width: 220px;
    box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, 0.6);
    text-align: center;
}

#songDetails .song-artist {
    font-size: 22px;
    font-weight: 600;
}

#songDetails .song-release-year {
    font-size: 60px;
    font-weight: 700;
}

#songDetails .song-name {
    font-style: italic;
    font-size: 22px;
    font-weight: 300;
}

#songDetails a {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 700px) {
    html {
        padding: 8px 8px 24px;
        max-width: none;
    }

    #playlistForm {
        gap: 5px;
        margin-bottom: 8px;
    }

    #playlistForm label,
    #settingsSection,
    #settingsSection label {
        font-size: 13px;
    }

    .playlist-controls {
        gap: 6px;
        width: 100%;
    }

    #playlistId {
        width: min(100%, 360px);
        padding: 7px 8px;
        font-size: 13px;
    }

    #playDuration {
        width: 64px;
        padding: 5px 6px;
        font-size: 13px;
    }

    .playlist-controls button {
        padding: 7px 10px;
        font-size: 13px;
    }

    #settingsSection {
        gap: 5px;
        margin-bottom: 8px;
    }

    #playlistTrackCount {
        margin-top: 4px;
        font-size: 13px;
        line-height: 1.25;
    }

    .circle-container {
        display: grid;
        grid-template-columns: repeat(5, minmax(54px, 1fr));
        gap: 5px;
        margin: 10px 0;
    }

    .tile {
        width: auto;
        height: auto;
        aspect-ratio: 1;
        margin: 0;
        font-size: clamp(10px, 2.8vw, 13px);
        line-height: 1.05;
        padding: 3px;
    }

    button {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 8px 14px;
        font-size: 18px;
    }

    #countdown {
        margin-bottom: 8px;
        font-size: 20px;
    }

    #songDetails {
        margin: 18px auto 48px;
        padding: 12px;
        gap: 12px;
        width: min(180px, calc(100vw - 56px));
        height: min(180px, calc(100vw - 56px));
    }

    #songDetails .song-artist {
        font-size: 15px;
    }

    #songDetails .song-release-year {
        font-size: 42px;
    }

    #songDetails .song-name {
        font-size: 15px;
    }

    #songDetails a {
        bottom: -30px;
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .circle-container {
        grid-template-columns: repeat(5, minmax(46px, 1fr));
        gap: 4px;
    }

    .tile {
        font-size: clamp(9px, 2.7vw, 11px);
    }
}
