body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

.container {
    max-width: 800px;
    margin: 30px auto; /* Changed from margin: 30px 40px to auto */
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    width: 90%; /* Add this to ensure container doesn't touch screen edges */
}

.upload-area {
    padding: 90px 50px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.file-info {
    color: #666;
    font-size: 16px;
}
h1{
    padding-top: 10px;
    color: #5d5d5d;
}
.sub{
    font-size: 22px;
    color: #7d7d7d;
    font-weight: 700;
    font-style: italic;
}
button {
    background-color: #04BB45;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 500;
}

button:hover {
    background-color: #04BB45;
}

.main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Reader styles - Spotify-like width constraint */
.reader-container {  
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0 120px;
    display: flex;
    justify-content: center;
}

#pdf-viewer {
    font-size: 22px;
    padding: 0px 10px;
    font-weight: 500;
}


.pdf-page {
    margin-bottom: 16px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 20px;

}

/* Player controls - Spotify-like compact design */
/* Main audio controls container */
.audio-controls {
    background: #282828;
    padding: 20px 40px;
    border-top: 1px solid #404040;
}

/* Play button styling */
.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1DB954;  /* Spotify green */
    border: none;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.06);
    background: #1ed760;
}

/* Controls row styling */
.controls-middle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
}

/* Select dropdowns styling */
#voiceSelect, #speedSelect {
    background: #404040;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    min-width: 160px;
    cursor: pointer;
    transition: background 0.2s;
}

#speedSelect {
    min-width: 120px;
}

#voiceSelect:hover, #speedSelect:hover {
    background: #505050;
}

/* Progress bar styling */
.progress-bar {
    margin: 20px 0px;
    height: 5px;
    background: #404040;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

#progress {
    background: white;
    height: 100%;
    border-radius: 2px;
    transition: width 0.1s linear;
    position: relative; /* Added */
}

#progress::after {
    content: '';
    position: absolute;
    right: -4px;  /* Half of dot width to center it */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;  /* Dot size */
    height: 20px;  /* Dot size */
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); /* Optional: adds depth */
}

.progress-bar:hover #progress {
    background: white;
}

/* Optional: make dot bigger on hover */
.progress-bar:hover #progress::after {
    width: 10px;
    height: 10px;
    right: -5px;
}



.time-indicator {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 11px;
    color: #888;
}


/* Text highlight */
.highlighted-text {
    background-color: rgba(29, 185, 84, 0.2);
    border-radius: 2px;
}

.page-number {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
    user-select: none; /* Prevent selection */
}

.pdf-page {
    position: relative;
    margin-bottom: 20px;
}

/* Ensure page numbers don't get affected by text layer changes */
.text-layer {
    position: relative;
    z-index: 1;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    background-color: #04BB45;
    padding: 10px 0px;
}

.logo img {
    max-width: 200px;  /* Adjust size as needed */
    height: auto;
}

/* For mobile screens */
@media only screen and (max-width: 768px) {
    .logo img {
        max-width: 200px;  /* Smaller logo for mobile */
    }
    .container {
        margin: 15px 10px;
        padding: 10px;
    }
    .upload-area {
        padding: 40px 20px;
    }
    .audio-controls {
        padding: 15px 20px;
    }
    .controls-middle {
        display: flex;
        flex-direction: row;  /* side by side */
        justify-content: space-between;  /* This is key for proper spacing */
        gap: 10px;
        margin-top: 20px;
    }
    
        #voiceSelect, #speedSelect {
            width: 45%;  /* This ensures they take equal space */
        }
    
    
    .control-btn {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    #pdf-viewer {
        font-size: 18px;
    }
    
    .file-info {
        font-size: 14px;
    }
    
    button {
        font-size: 20px;
        padding: 8px 16px;
    }
    .progress-bar {
        margin: 15px 0px;
    }
    
    #progress::after {
        width: 16px;
        height: 16px;
    }
    
    .time-indicator {
        font-size: 10px;
        top: -16px;
    }
    .reader-container {
        padding: 10px 0 100px;
    }
    

}
