/* Fiction-specific styling */
.fiction-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.fiction-content {
    padding: 40px 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: var(--text-color);
}

.fiction-content p {
    margin-bottom: 24px;
    font-size: 1.05rem;
    text-align: left;
}

.fiction-content p:first-child {
    margin-top: 0;
}

.fiction-content p:last-child {
    margin-bottom: 0;
}

/* Tighter header spacing for chapters */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.header-content {
    flex: 1;
    text-align: center;
}

.subtitle {
    margin-bottom: 10px;
}

/* Header chapter navigation chevrons */
.header-nav {
    color: var(--muted-color);
    text-decoration: none;
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.35;
    transition: opacity 0.2s ease, color 0.2s ease;
    padding: 0 15px;
    border-bottom: none;
    flex-shrink: 0;
}

.header-nav:hover {
    opacity: 0.7;
    color: var(--accent-color);
    border-bottom: none;
}

.header-nav-placeholder {
    visibility: hidden;
    font-size: 2.5rem;
    padding: 0 15px;
    flex-shrink: 0;
}

/* Chapter divider */
.fiction-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 40px 0;
    opacity: 0.5;
}

/* Chapter navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.chapter-nav a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.chapter-nav a:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.chapter-nav .nav-disabled {
    color: var(--muted-color);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

.chapter-nav .nav-disabled:hover {
    background: transparent;
    color: var(--muted-color);
}

.breadcrumbs {
    text-align: center;
    margin: 6px 0 20px 0;
    color: var(--muted-color);
    font-size: 0.9rem;
}

/* Inline chapter date - appears after reading time */
.chapter-date {
    display: inline-block;
    margin-left: 15px;
    color: var(--muted-color);
    font-size: 0.85rem;
    font-weight: normal;
    font-style: italic;
    opacity: 0.7;
    cursor: pointer;
    position: relative;
}

.chapter-date::before {
    content: "•";
    margin-right: 15px;
    opacity: 0.5;
}

.chapter-date::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--muted-color);
    font-size: 0.75rem;
    font-style: normal;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 5px;
    z-index: 10;
}

.chapter-date:hover::after {
    opacity: 1;
}

.breadcrumbs a {
    opacity: 0.8;
}

.breadcrumbs a:hover {
    color: var(--accent-color-alt);
    opacity: 1;
}

.reading-time {
    display: inline-block;
    margin-left: 15px;
    color: var(--muted-color);
    font-size: 0.85rem;
    font-weight: normal;
    font-style: italic;
}

.reading-time::before {
    content: "•";
    margin-right: 15px;
    opacity: 0.5;
}

.back-link {
    text-align: center;
    margin-bottom: 10px;
}

.back-link a {
    color: var(--muted-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-link a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Bookmark highlight animation */
.bookmark-highlight {
    background: var(--accent-color);
    opacity: 0.15;
    transition: opacity 0.3s ease-out;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

/* Floating bookmark button */
.bookmark-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-color);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.bookmark-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.bookmark-button:active {
    transform: scale(0.95);
}

.bookmark-button-saved {
    background: var(--accent-color) !important;
    color: var(--bg-color) !important;
}

.bookmark-button svg {
    fill: currentColor;
}

/* Bookmark notification (resume message) */
.bookmark-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-color);
    padding: 12px 24px;
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.bookmark-notification-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Persistent bookmark indicator */
.bookmark-indicator {
    position: absolute;
    left: -30px;
    top: 5px;
    color: var(--accent-color);
    opacity: 0.7;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bookmark-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Auto-bookmark toggle button */
.auto-bookmark-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    font-size: 0.7rem;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--muted-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    font-family: inherit;
}

.auto-bookmark-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.auto-bookmark-toggle.disabled {
    opacity: 0.5;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .fiction-content {
        padding: 30px 0;
    }

    .fiction-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .header-nav,
    .header-nav-placeholder {
        display: none;
    }

    .chapter-nav {
        flex-direction: column;
        gap: 15px;
    }

    .chapter-nav a {
        width: 100%;
        text-align: center;
    }

    .bookmark-button {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .bookmark-indicator {
        left: -25px;
        top: 3px;
    }

    .bookmark-indicator svg {
        width: 14px;
        height: 14px;
    }

    .auto-bookmark-toggle {
        bottom: 75px;
        right: 20px;
        font-size: 0.65rem;
        padding: 4px 8px;
    }
}
