

:root {
    --topbar-h: 64px;
    --controls-h: 72px;
    --font-header: "Montserrat", serif;
    --font-display: "Montserrat", system-ui, sans-serif;
    /* Main PUP brand color */
    --maroon: #800000;
    --maroon-light: #a00000;
    
    --word-active: #b91c1c;
    --word-sung: #d4a0a0;
    /* Light theme colors */
    --bg-primary: #fafafa;
    --bg-surface: #f3f3f3;
    --bg-elevated: #d9d9d9;
    --bg-card: #e8e8e8;
    --text-primary: #111111;
    --text-secondary: #3d3d3d;
    --text-dim: #777777;
    --divider: rgba(0, 0, 0, 0.12);
    --controls-bg: #e8e8e8;
    --scrollbar-track: #d0d0d0;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

.topbar {
    height: var(--topbar-h);
    background: var(--maroon);
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Fixed logo size so it stays neat, plus a small shadow for depth */
.topbar-logo {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.topbar-text {
    display: flex;
    flex-direction: column;
}

/* Uppercase heading to get closer to the PUP website look */
.topbar-title {
    font-family: var(--font-header);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Smaller tagline below the main school name */
.topbar-sub {
    font-family: var(--font-header);
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 1px;
}

.player {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100% - var(--topbar-h) - var(--controls-h));
}

.sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    text-align: center;
    overflow-y: auto;
}

/* Square image holder with rounded corners and a stronger shadow */
.album-art {
    width: 240px;
    height: 240px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.45),
        0 2px 8px rgba(128, 0, 0, 0.2);
    margin-bottom: 16px;
    margin-top: 30px;
    flex-shrink: 0;
}

/* cover keeps the image filling the box without squishing it */
.album-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main song title styling */
.song-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

/* Secondary text for the subtitle line */
.song-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* --- Hymn Info Card ---
   Simple card wrapper for the extra hymn details */
.hymn-info {
    width: 100%;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 14px 16px;
    text-align: left;
}

/* Card heading stands out with maroon text and a divider */
.info-heading {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--maroon);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--divider);
}

/* Each info row stacks the label and its values */
.info-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 0;
}

/* Adds a divider only when another row comes after the previous one */
.info-row + .info-row {
    border-top: 1px solid var(--divider);
}

/* Small label style so the actual values stay more noticeable */
.info-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    font-weight: 500;
}

/* Main value text for each info item */
.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.lyrics-panel {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 48px;
    position: relative;
}

/* Custom scrollbar styling for browsers that support the WebKit version */
.lyrics-panel::-webkit-scrollbar {
    width: 10px;
}

.lyrics-panel::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.lyrics-panel::-webkit-scrollbar-thumb {
    background: var(--maroon);
    border-radius: 5px;
    border: 2px solid var(--scrollbar-track);
}

.lyrics-panel::-webkit-scrollbar-thumb:hover {
    background: var(--maroon-light);
}

/* Placeholder text before the actual lyrics are shown */
.lyrics-placeholder {
    text-align: center;
    color: var(--text-dim);
    font-size: 1rem;
    padding-top: 40%;
    font-style: italic;
}

.lyrics-spacer {
    height: 25vh;
}

.lyric-line {
    text-align: left;
    padding: 10px 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    opacity: 0.3;
    transition:
        opacity 0.2s ease-out,
        transform 0.2s ease-out;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    transform-origin: left center;
}

/* Active line gets full opacity and the zoom effect */
.lyric-line.active {
    opacity: 1;
    transform: scale(1.18);
}

/* Past lines stay visible so the sung word colors can still be seen */
.lyric-line.past {
    opacity: 1;
}

/* Instrumental lines look lighter and more separate from the regular lyrics */
.lyric-line.instrumental {
    font-style: italic;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: -0.02em;
    opacity: 0.3;
}

.lyric-line.instrumental.past {
    opacity: 0.15;
}

.word {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
}

/* Hover underline helps show that the words are clickable */
.word:hover {
    text-decoration-line: underline;
    text-decoration-color: var(--text-dim);
    text-underline-offset: 4px;
}

/* Current word being sung */
.word.active {
    color: var(--word-active);
}

/* Words that already passed get a softer color */
.word.sung {
    color: var(--word-sung);
}

.controls-bar {
    height: var(--controls-h);
    background: var(--controls-bg);
    border-top: 1px solid var(--divider);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
}

/* Side control buttons keep a lighter ghost-button look */
.control-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition:
        color 0.2s ease,
        transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.control-btn:hover {
    color: var(--text-primary);
}

.control-btn:active {
    transform: scale(0.9);
}

/* Main play button is circular so it stands out more than the side controls */
.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--text-primary);
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease-out;
}

.play-btn:hover {
    transform: scale(1.06);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn i {
    font-size: 16px;
}

/* Small nudge so the play triangle looks centered by eye */
.icon-play {
    margin-left: 2px;
}

/* This section stretches to use the remaining horizontal space */
.progress-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tabular numbers stop the time labels from jumping around in width */
.time-label {
    font-size: 1rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
}

#timeTotal {
    text-align: right;
}

/* Seek bar track */
.progress-container {
    flex: 1;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 3px;
    cursor: pointer;
}

/* Filled part of the seek bar */
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--maroon), var(--maroon-light));
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
}
