/* Custom styles from style.css */
body {
    font-family: 'Inter', sans-serif;
    background-color: #1f2937; /* Dark background */
}
/* UPDATED: Reader container is now a component, not a full page */
#reader-container {
    /* min-height: calc(100vh - 8rem); */
    max-height: 85vh; /* Set a max height */
    overflow-y: auto;
    position: relative; /* Already was relative */
}
#epub-viewer {
    width: 100%;
    /* The container needs a defined height for epub.js to fill */
    height: 80vh; 
}
#txt-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}
/* Hide default file input */
#file-upload-input {
    display: none;
}
.pdf-page {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
    border-radius: 0.5rem;
    max-width: 100%;
}
/* New styles for App UI */
.view {
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Loading Overlay */
#loading-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Default hidden states for pages */
#auth-page.hidden,
#signup-page.hidden,
#loading-overlay.hidden {
    display: none;
}

/* NEW: Default flow: show app, hide auth */
#auth-page,
#signup-page {
    display: none;
}
#app-page {
    display: flex;
}
#app-page.hidden {
    display: none;
}
#auth-page.hidden {
    display: none;
}
/* When auth page is shown, it should be flex */
#auth-page:not(.hidden) {
    display: flex;
}
#signup-page:not(.hidden) {
    display: flex;
}


/* Debug Panel Styles */
#debug-panel {
    border: 1px dashed #4b5563; /* gray-600 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 0.75rem; /* p-3 */
    max-height: 150px;
    overflow-y: auto;
    background-color: #111827; /* gray-900 */
}
#debug-log p {
    margin-bottom: 0.25rem; /* mb-1 */
    font-family: monospace;
    word-break: break-all;
}
#debug-log p.error {
    color: #f87171; /* red-400 */
    font-weight: 600;
}