/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --parchment: #f3e8d0;
    --parchment-deep: #e8d5a3;
    --ink: #1a1208;
    --ink-light: #3d2e1c;
    --gold: #c49a2b;
    --gold-dim: #8b6914;
    --crimson: #6b1d1d;
    --crimson-glow: #a83232;
    --ember: #e8651a;
    --ember-dim: #8b3a0e;
    --frost: #b8d4e3;
    --frost-deep: #2c4a5e;
    --shadow: rgba(0, 0, 0, 0.7);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'EB Garamond', 'Georgia', serif;
    background: #0d0905;
    color: var(--parchment);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Add this to body or a wrapper */
body {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}
/* ===== EMBER CANVAS ===== */
#ember-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* ===== MAIN NAVIGATION (9 CIRCLES) - Original Style ===== */
.archive-timeline {
    width: 100%;
    padding: 1.5rem 1rem;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background: rgba(13, 9, 5, 0.9);
    border-bottom: 1px solid rgba(196, 154, 43, 0.2);
    display: flex;
    justify-content: center;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: transparent;
    border: none;
    border-radius: 0;
}

.timeline-list a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
    color: rgba(160, 140, 120, 0.5);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    border-radius: 0;
    background: transparent;
}

.timeline-num {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.9rem;
    color: var(--gold-dim);
    transition: color 0.3s ease;
}

.timeline-label {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(243, 232, 208, 0.4);
    transition: color 0.3s ease;
}

.timeline-list a:hover .timeline-num,
.timeline-list a:focus .timeline-num {
    color: var(--gold);
}

.timeline-list a:hover .timeline-label,
.timeline-list a:focus .timeline-label {
    color: var(--parchment);
}

/* Connecting line */
.timeline-list::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: rgba(196, 154, 43, 0.15);
    z-index: -1;
}

/* ===== LIBRARY NAV (TBR/DNF) - Pill Style ===== */
.library-nav {
    position: relative !important;
    background: transparent !important;
    border-bottom: none !important;
    padding: 0.5rem !important;
    margin-bottom: 2rem;
}

.library-nav .timeline-list {
    display: flex;
    list-style: none;
    padding: 0.3rem;
    margin: 0;
    gap: 0.3rem;
    background: rgba(30, 25, 20, 0.4);
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: auto;
    justify-content: center;
    position: relative;
}

.library-nav .timeline-list::before {
    display: none;
}

.library-nav .timeline-list li {
    display: inline-block;
    margin: 0;
}

.library-nav .timeline-list a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.2rem;
    text-decoration: none;
    color: rgba(160, 140, 120, 0.5);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border-radius: 30px;
    position: relative;
    white-space: nowrap;
    background: transparent;
    flex-direction: row;
}

.library-nav .timeline-list a.active {
    color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.05);
}

.library-nav .timeline-list a:hover:not(.active) {
    color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.05);
}

.library-nav .timeline-num {
    font-size: 0.65rem;
    color: rgba(212, 175, 55, 0.2);
}

.library-nav .timeline-list a.active .timeline-num {
    color: var(--gold);
}

.library-nav .timeline-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(160, 140, 120, 0.5);
    text-transform: none;
}

.library-nav .timeline-list a.active .timeline-label {
    color: var(--gold);
}

/* ===== MAIN CONTENT ===== */
.limbo {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 2;
    padding: 2rem;
    height: 950px;   
    background: radial-gradient(#2e0a0a, #000000);
    padding-top: 100px;
}

.limbo-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    text-align: center;
    color: var(--gold);
    justify-content: left;
    top: 68%;
    left: 20%;
    position: absolute;
}

.limbo-description {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    text-align: center;
    margin-top: 1rem;
    color: var(--parchment);
    justify-content: left;
    top: 29%;
    left: 17%;
    position: absolute;
}

.limbo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent);
    z-index: -1;
}

/* ===== LIBRARY SECTION ===== */
.library-section {
    margin-top: 2rem;
    padding: 4rem 2rem;
    background: url('images/backgroundl.png') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.limbo,
.library-section {
    margin: 0;
    padding: 0;
}

.library-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(30, 25, 20, 0.5);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(212, 175, 55, 0.1);
}

/* ===== BOOKSHELF WITH SLIDING ===== */
.bookshelf-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 200%;
}

.bookshelf {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
    width: 50%;
    flex-shrink: 0;
}

/* ===== BOOK ROWS ===== */
.book-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 3px solid rgba(60, 45, 30, 0.5);
    position: relative;
}

.book-row:last-child {
    border-bottom: none;
}

/* ===== INDIVIDUAL BOOK ===== */
.book {
    width: 65px;
    height: 220px;
    background: linear-gradient(180deg, #1a1510, #2a2018);
    border-radius: 2px 10px 10px 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.7), inset -2px 0 0 rgba(212, 175, 55, 0.1), inset 0 2px 0 rgba(212, 175, 55, 0.05);
    transform: perspective(800px) rotateY(0deg);
    transform-origin: left center;
    flex-shrink: 0;
    overflow: hidden;
}

/* ===== BOOK SPINE ===== */
.book-spine {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.3rem;
    background: linear-gradient(90deg, rgba(30, 25, 20, 0.95), rgba(50, 40, 30, 0.8) 25%, rgba(40, 35, 25, 0.9) 75%, rgba(20, 15, 10, 0.98));
    border-radius: 2px 10px 10px 2px;
    position: relative;
}

/* ===== GOLD DECORATIVE BANDS ===== */
.book-spine::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0.6), rgba(212, 175, 55, 0.4), transparent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.book-spine::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0.6), rgba(212, 175, 55, 0.4), transparent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* ===== GOLD DOT ===== */
.gold-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* ===== BOOK NUMBER ===== */
.book-number {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.4rem;
    color: rgba(212, 175, 55, 0.15);
    letter-spacing: 2px;
}

/* ===== BOOK TITLE ===== */
.book-title {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold, #d4af37);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    line-height: 1.4;
    padding: 0.5rem 0;
    flex-shrink: 0;
    max-height: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    line-clamp: 10;
    -webkit-box-orient: vertical;
}

/* ===== BOOK AUTHOR ===== */
.book-author {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 0.5rem;
    color: rgba(160, 140, 120, 0.4);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 3px;
    margin-top: auto;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    width: 50%;
    text-align: center;
    flex-shrink: 0;
}

/* ===== BOOK VARIATIONS ===== */
.book:nth-child(1) { background: linear-gradient(180deg, #1a1510, #3d2a1a); border-left: 2px solid rgba(212, 175, 55, 0.2); }
.book:nth-child(2) { background: linear-gradient(180deg, #1a1510, #1a2a3d); border-left: 2px solid rgba(100, 150, 200, 0.2); }
.book:nth-child(3) { background: linear-gradient(180deg, #1a1510, #3d1a2a); border-left: 2px solid rgba(200, 100, 150, 0.2); }
.book:nth-child(4) { background: linear-gradient(180deg, #1a1510, #2a3d1a); border-left: 2px solid rgba(100, 200, 100, 0.2); }
.book:nth-child(5) { background: linear-gradient(180deg, #1a1510, #3d2a1a); border-left: 2px solid rgba(212, 175, 55, 0.3); }
.book:nth-child(6) { background: linear-gradient(180deg, #1a1510, #2a1a3d); border-left: 2px solid rgba(150, 100, 200, 0.2); }
.book:nth-child(7) { background: linear-gradient(180deg, #1a1510, #3d1a1a); border-left: 2px solid rgba(200, 50, 50, 0.2); }
.book:nth-child(8) { background: linear-gradient(180deg, #1a1510, #1a3d3d); border-left: 2px solid rgba(50, 200, 200, 0.2); }
.book:nth-child(9) { background: linear-gradient(180deg, #1a1510, #3d2a1a); border-left: 2px solid rgba(212, 175, 55, 0.25); }
.book:nth-child(10) { background: linear-gradient(180deg, #1a1510, #2a2a3d); border-left: 2px solid rgba(150, 150, 200, 0.2); }

/* ===== DNF BOOK STYLING ===== */
.bookshelf.category-dnf .book {
    opacity: 0.7;
    filter: grayscale(0.3);
}

.bookshelf.category-dnf .book-title {
    color: #8b6b6b;
    text-decoration: line-through;
    text-decoration-color: rgba(200, 50, 50, 0.3);
    text-decoration-thickness: 1px;
}

.bookshelf.category-dnf .book-author {
    color: rgba(160, 140, 120, 0.3);
}

/* ===== BOOK HOVER EFFECTS ===== */
.book:hover {
    transform: perspective(800px) rotateY(-15deg) translateY(-8px) scale(1.02);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.8), -2px 0 20px rgba(212, 175, 55, 0.3), 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.book:hover .book-title {
    color: #fff;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.book:hover .book-author {
    color: rgba(212, 175, 55, 0.6);
}

.book:active {
    transform: perspective(800px) rotateY(-20deg) scale(0.95);
}

/* ===== BOOK GLOW ANIMATION ===== */
@keyframes bookGlow {
    0%, 100% { box-shadow: 3px 0 10px rgba(0, 0, 0, 0.6); }
    50% { box-shadow: 3px 0 20px rgba(212, 175, 55, 0.15); }
}

.book {
    animation: bookGlow 4s ease-in-out infinite;
}

.book:nth-child(2) { animation-delay: 0.3s; }
.book:nth-child(3) { animation-delay: 0.6s; }
.book:nth-child(4) { animation-delay: 0.9s; }
.book:nth-child(5) { animation-delay: 1.2s; }
.book:nth-child(6) { animation-delay: 1.5s; }
.book:nth-child(7) { animation-delay: 1.8s; }
.book:nth-child(8) { animation-delay: 2.1s; }
.book:nth-child(9) { animation-delay: 2.4s; }
.book:nth-child(10) { animation-delay: 2.7s; }

/* ===== SLIDER INDICATORS ===== */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--gold, #d4af37);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transform: scale(1.2);
}

.slider-dot:hover {
    background: rgba(212, 175, 55, 0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .book {
        width: 45px;
        height: 150px;
    }
    
    .book-title {
        font-size: 0.5rem;
        letter-spacing: 3px;
    }
    
    .book-author {
        font-size: 0.4rem;
        letter-spacing: 1px;
    }
    
    .book-spine {
        padding: 0.8rem 0.2rem;
    }
    
    .book-row {
        gap: 0.8rem;
    }
    
    .book-number {
        font-size: 0.3rem;
    }
    
    .gold-dot {
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .book {
        width: 35px;
        height: 120px;
    }
    
    .book-title {
        font-size: 0.4rem;
        letter-spacing: 2px;
    }
    
    .book-author {
        font-size: 0.35rem;
        letter-spacing: 1px;
    }
    
    .book-spine {
        padding: 0.5rem 0.1rem;
    }
    
    .book-row {
        gap: 0.5rem;
    }
    
    .book-number {
        font-size: 0.25rem;
        bottom: 10%;
    }
    
    .gold-dot {
        width: 2px;
        height: 2px;
    }
}

/* ===== IMAGES SECTION ===== */
.limbo-top-right-image {
    position: absolute;
    top: 150px;
    right: -400px;
    width: 53%;
    height: auto;
    z-index: -1;
    opacity: 89%;
}

.limbo-top-left-image {
    position: absolute;
    top: -240px;
    left: -240px;
    width: 45%;
    height: auto;
    z-index: -1;
    opacity: 50%;
}

.limbo-top-center-image {
    position: absolute;
    bottom: -280px;
    left: -280px;
    width: 45%;
    height: auto;
    z-index: -1;
    opacity: 50%;
}

.limbo-tarot-card-image {
    position: absolute;
    top: 20%;
    left: 6%;
    width: 39%;
    height: auto;
    z-index: -1;
}

.limbo-sword-image {
    position: absolute;
    top: 20%;
    left: 27%;
    width: 39%;
    height: auto;
    z-index: -1;
}

.limbo-DanteNvirgil-image {
    position: absolute;
    top: 30%;
    left: 48%;
    width: 49%;
    height: auto;
    z-index: -1;
}

.limbo-DNV-image {
    position: absolute;
    top: 42%;
    left: 52%;
    width: 46%;
    height: auto;
    z-index: -1;
}

.limbo-funimg-image {
    position: absolute;
    top: 29%;
    left: 80%;
    width: 10%;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
}