/* 1. MAIN STRUCTURE */
html, body {
    min-width: 500px;
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--color-bg-light);
    margin: 0;
}

#main-content {
    position: relative;
    height: calc(100vh - var(--header-height) -
        var(--footer-height));
    flex-direction: column;
}

#main-content > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#container {
    display: flex;
    height: 100%;
    overflow: hidden;
}

#left-panel,
#right-panel {
    height: 100vh;
    flex: 1;
    display: inline-block;
    vertical-align: top;
    padding: 20px;
    box-sizing: border-box;
}

#header-bar, #footer-bar{
    width: 100%;
    align-items: center;
    background-color: var(--color-primary-blue);
    color: var(--color-primary-gold);
    text-align: center;
    letter-spacing: 1px;
}

/*  Header  */
#header-bar{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    padding: 0 16px; /* No vertical, small horizontal */
    border-bottom: 4px solid var(--slate-grey);
    position: relative;
    
    font-weight: bold;
    
}

#header-bar .header-left{
    position: absolute;
    left: 0px;
    display: flex;
    align-items: center;
    flex: 0 1 auto;
}

#header-title {
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    text-align: center;
    white-space: nowrap;
    margin: 0 auto; /* I don't understand this */
    cursor: pointer;
    user-select: none; /* xkcd's worst nightmare */
}

#footer-bar{
    justify-content: center;
    height: var(--footer-height);
    padding: 0 10px; /* No vertical, 10px horizontal */
    border-top: 4px solid var(--slate-grey);
    font-size: 1.2rem;
    position: fixed;
    bottom: 0;
}

#footer-bar a{
    color: var(--color-primary-gold);
}

/* 2.  PANEL SPECIFIC STYLES */
#left-panel {
    background: var(--color-bg-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

#right-panel {
    background: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

#scoreboard {
    font-size: clamp(0.8rem, 5vw, 4rem);
    font-weight: bold;
}

#verse-display-container {
    height: var(--height-verse-container);
    max-height: var(--height-verse-container);
    min-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;

    padding: 7px;
    box-sizing: border-box;

    border: 2px solid black;
    border-radius: var(--border-radius-med);

    background: var(--color-primary-gold);
}

#verses {
    font-size: var(--font-size-med);
}

/*  3. TIMER AND CONTROLS (Positioning) */
#timer-container {
    min-height: 20px;
    width: 100%;
    height: 30px;
    background: var(--color-bg-light);
    border: 2px solid #000000;
    margin: 10px auto;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

#timer-bar {
    min-height: 16px;
    height: 100%;
    background: var(--color-timer-start);
    width: 100%;
    transition: width 0.1s linear, background-color 0.2s linear;
    border-radius: 6px;
}

#timer-container.warning-flash {
    animation: flash-red 1s ease-in-out infinite;
}

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

#lb-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}