@font-face {
    font-family: 'Source Code Pro';
    src: url('SourceCodePro-Regular.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: #000000;
    overflow: hidden;
    forced-color-adjust: none;
    user-select: none;
}

#castview {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000000;
    font-family: 'Source Code Pro', monospace;
    color: #00FF00;
}

/* ---------- Logo, top-left ---------- */

#app-logo {
    position: absolute;
    top: 2vh;
    left: 2vh;
    width: 20vh;
    height: 20vh;
}

#app-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- "Played before" panel, top-right ---------- */

#played-before-panel {
    position: absolute;
    top: 5vh;
    right: 5vh;
    width: 42vh;
    height: 60vh;
    display: flex;
    flex-direction: column;
}

#played-before-header {
    height: 3.9vh;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3vh;
    color: #00FF00;
}

#track-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8vh;
    padding: 1.4vh;
    overflow: hidden;
}

.track-item {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    border: 1px solid #00FF00;
    border-radius: 5px;
    overflow: hidden;
}

.track-thumb {
    height: 80%;
    aspect-ratio: 1 / 1;
    margin-left: 0.6vh;
    border: 1px solid #00FF00;
    border-radius: 5px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #000000;
}

.track-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    flex: 1;
    min-width: 0;
    margin-left: 0.5vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.track-title {
    font-size: 2.3vh;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 1.6vh;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Now-playing block, centered ---------- */

#now-playing-block {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#now-playing-label {
    height: 4.25vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5vh;
    color: #00FF00;
}

#album-art {
    width: 50vh;
    height: 50vh;
    border: 1px solid #00FF00;
    border-radius: 4.2vh;
    overflow: hidden;
    background: #000000;
}

#album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#song-title {
    margin-top: 1.5vh;
    font-size: 5vh;
    color: #00FF00;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#song-artist {
    margin-top: 0.3vh;
    font-size: 2.5vh;
    color: #00FF00;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---------- Playlist name bar, bottom ---------- */

#playlist-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5vh;
    display: flex;
    align-items: center;
    padding-left: 20px;
    background: #000000;
}

#playlist-name {
    font-size: 2.5vh;
    color: #00FF00;
}
