/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: #4CAF50;
    width: 0;
    transition: width 0.3s ease;
}

/* Header Styles */
header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.author {
    font-style: italic;
    color: #888;
}

/* Reading Controls */
.reading-controls {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reading-settings, .reading-actions {
    display: flex;
    gap: 1rem;
}

.control-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.control-btn:hover {
    color: #4CAF50;
}

.setting-dropdown {
    display: none;
    position: absolute;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 0.5rem;
}

.setting-dropdown.active {
    display: block;
}

.setting-dropdown button {
    display: block;
    width: 100%;
    padding: 0.5rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.setting-dropdown button:hover {
    background: #f0f0f0;
}

/* Scene Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.scene {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    margin-bottom: 4rem;
}

.scene.visible {
    opacity: 1;
    transform: translateY(0);
}

.scene-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.scene-number {
    width: 40px;
    height: 40px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.scene-title {
    font-size: 1.8rem;
    margin: 0;
}

.scene-content {
    display: grid;
    gap: 2rem;
}

.scene-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.scene-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.image-container {
    position: relative;
}

.scene-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1rem 0;
}

.nav-button {
    padding: 0.8rem 1.5rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.nav-button:hover:not(:disabled) {
    background: #45a049;
}

/* Modal Styles */
.character-modal, .glossary-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.character-content, .glossary-content {
    position: relative;
    background: white;
    margin: 10% auto;
    padding: 2rem;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
}

.close-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Styles */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
}

/* Dark Mode */
.dark-mode {
    background: #1a1a1a;
    color: #fff;
}

.dark-mode .reading-controls {
    background: #2a2a2a;
}

.dark-mode .setting-dropdown {
    background: #2a2a2a;
    color: #fff;
}

.dark-mode .setting-dropdown button:hover {
    background: #3a3a3a;
}

/* High Contrast Mode */
.high-contrast {
    background: #000;
    color: #fff;
}

.high-contrast .scene-text {
    background: #000;
    color: #fff;
}

/* Immersive Mode */
.immersive-mode {
    max-width: none;
    padding: 0 2rem;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #4CAF50;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Text Size Classes */
.small-text {
    font-size: 0.9rem;
}

.medium-text {
    font-size: 1.1rem;
}

.large-text {
    font-size: 1.3rem;
}

/* Font Family Classes */
.serif {
    font-family: Georgia, serif;
}

.sans-serif {
    font-family: Arial, sans-serif;
}

.dyslexic {
    font-family: OpenDyslexic, Arial, sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reading-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .scene-images {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 2rem;
    }

    .scene-text {
        font-size: 1rem;
    }
}

/* Override Astra Theme Styles */
.ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#primary {
    margin: 0 !important;
    padding: 0 !important;
}

.entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix Scene Visibility */
.scene {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    display: block !important;
    margin-bottom: 4rem !important;
}

/* Ensure proper container width */
.container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

/* Fix content width */
.ast-container .entry-content {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ensure proper text visibility */
.scene-text {
    color: inherit !important;
    opacity: 1 !important;
}