body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 10px;
    padding-top: 90px; /* Add space for the heading */
    background-color: #fafaf8;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1250px;
    margin-left: auto;
    margin-right: auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 20px 10px 20px 200px; /* Top Right Bottom Left */
}

h1 {
    position: absolute;
    top: 20px; /* Adjust this value as needed */
    left: 0;
    right: 0;
    text-align: center;
    color: #1d1d1f;
    margin: 0;
    font-size: 32px;
    z-index: 1; /* Ensures the title appears above other elements */
    font-family: "Noto Serif Display", serif;
    font-weight: 300;
    letter-spacing: 0.05em;
}

@media (max-width: 1450px) {
    .container {
        width: 95%; /* Use percentage when screen is smaller than container */
        padding: 20px 10px 20px 10px; /* Top Right Bottom Left */
        margin-left: auto;
        margin-right: auto;
    }
    h1 {
        text-align: left;
        left: 30px;
    }
}

.text-container {
    display: flex;
    gap: 20px;
}

.text-column {
    padding: 20px;
}

.greek-column {
    flex: 1;
    border-right: 1px solid #e5e5e5;
}

/* this used to be 1.55 but ch 5 didnt work */
.english-column {
    flex: 1.75;
}

.word {
    display: inline-block;
    margin-right: 7px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.word.highlighted {
    background-color: rgba(252, 55, 16, 0.475);
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

/* Modified to ensure exact same line height */
.greek-text {
    color: #333;
    font-size: 20px;
    font-family: "SBL Greek", Gentium, serif;
    line-height: 40px; /* Fixed pixel value instead of multiplier */
    text-align: justify;
}

.english-text {
    color: #667;
    font-size: 18px; /* Same as Greek text */
    line-height: 40px; /* Same fixed pixel value */
    text-align: justify;
    font-family: "Palatino", "Palatino Linotype", "Book Antiqua", serif;
}

.paragraph {
    margin-bottom: 20px;
}

.narrow-screen-message {
    display: none;
}

.hide-narrow-screen-message .narrow-screen-message {
    display: none;
}

/* View Switcher */
.view-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.view-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(245, 245, 247, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #667;
    transition: all 0.2s ease;
}

.view-button:hover {
    background-color: rgba(230, 230, 235, 0.9);
    transform: scale(1.05);
}

.view-button.active {
    background-color: #1d1d1f;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Add these classes for showing/hiding columns */
.hide-greek .greek-column {
    display: none;
}

.hide-english .english-column {
    display: none;
}

/* When one column is hidden, expand the other */
.hide-greek .english-column,
.hide-english .greek-column {
    flex: 1;
    max-width: 100%;
    border-right: none;
}

.single-column-container {
    max-width: 800px;
    padding: 20px 10px 20px 1%; /* Top Right Bottom Left */
}

/* Highlighting Toggle Button */
.highlight-toggle {
    position: absolute;
    top: 20px;
    right: 150px; /* Position it to the right of the view switcher with some spacing */
    z-index: 2;
}

.highlight-button {
    width: 30px;
    height: 30px;
    border-radius: 4px; /* Square with slightly rounded corners */
    background-color: rgba(252, 55, 16, 0.475); /* Same as the highlight color */
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
}

.highlight-button:hover {
    transform: scale(1.05);
}

.highlight-button.disabled {
    background-color: rgba(252, 55, 16, 0.1); /* Faded version when disabled */
}

/* Class for when highlighting is disabled */
.disable-highlighting .word.highlighted {
    background-color: transparent !important; /* Override the highlighting */
}

/* Audio player styles */
.audio-player-container {
    background-color: rgba(245, 245, 247, 0.5);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 20px;
    margin: 0;
    max-width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px;
    min-width: 80px;
}

.audio-button {
    background-color: transparent;
    color: #667;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
    width: 30px;
    height: 30px;
}

.audio-button:hover {
    color: #1d1d1f;
}

.audio-button.speed-active {
    color: #1d1d1f;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.audio-button:focus {
    outline: none;
}

.audio-progress-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-progress {
    flex-grow: 1;
    height: 4px;
    background-color: rgba(160, 160, 160, 0.3);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.audio-progress-bar {
    height: 100%;
    background-color: rgba(60, 60, 60, 0.9);
    width: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.05s linear;
    will-change: width;
}

.audio-progress-bar.seeking-smooth {
    transition: width 0.15s ease-out !important;
}

.audio-time {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #667;
    font-weight: 500;
    width: 110px;
    min-width: 110px;
    justify-content: flex-end;
    margin-left: 15px;
}

#current-time, #duration {
    display: inline-block;
    width: 45px; /* Fixed width for time displays */
    text-align: center; /* Center the text within the fixed width */
    font-variant-numeric: tabular-nums; /* Use monospace numbers */
}

/* speed controler */
.speed-control-container {
    display: none; /* Hidden by default */
    align-items: center;
    gap: 5px;
    margin-left: 15px;
    margin-right: 15px;
}

.speed-select {
    background-color: transparent;
    color: #667;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all 0.2s;
}

.speed-select:hover {
    color: #1d1d1f;
    border-color: rgba(0, 0, 0, 0.2);
}

.speed-select:focus {
    outline: none;
    border-color: #1d1d1f;
}

@media (max-width: 768px) {
    /* Only hide text container in the default view */
    .container:not(.hide-greek):not(.hide-english) .text-container {
        display: none;
    }
    
    /* Show narrow screen message only in default view */
    .container:not(.hide-greek):not(.hide-english) .narrow-screen-message {
        display: block;
        text-align: center;
        padding: 20px;
        color: #667;
        font-style: italic;
        margin-top: 20px;
        background-color: #f8f8f8;
        border-radius: 8px;
    }
    
    /* For single column views, adjust column width */
    .hide-greek .english-column,
    .hide-english .greek-column {
        width: 100%;
        padding: 10px;
    }
}