/* ========================================
   TOC PAGE CSS
   ======================================== */

.toc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
    border: 1px dashed #c6201e;
    padding: 20px;
    border-radius: 5px;
}

.toc-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.toc-book-frame {
    background: var(--bg-book);
    padding: 16px;
    border: 2px solid #333;
}

.toc-book-cover {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
}

.toc-buy-text {
    font-family: var(--font-pixel);
    font-size: 1.4rem;
    color: var(--neon-purple);
    text-shadow: var(--neon-glow);
    text-decoration: underline;
    text-transform: uppercase;
}

.toc-right {
    position: relative;
}

.toc-title {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: var(--white);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.toc-list {
    list-style: none;
    padding: 0;
    counter-reset: toc-counter;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}

.toc-item {
    margin-bottom: 10px;
    font-family: var(--font-pixel);
    font-size: 1.15rem;
    counter-increment: toc-counter;
}

.toc-item::before {
    content: counter(toc-counter) ". ";
    color: var(--white);
}

.toc-link {
    text-decoration: underline;
    transition: color 0.2s;
}

.toc-link-free {
    color: var(--blue-link);
}

.toc-link-free:hover {
    color: #88bbff;
}

.toc-link-buy {
    color: var(--white);
}

.toc-link-buy:hover {
    color: #ccc;
}

.toc-floating-buy {
    position: fixed;
    right: 20px;
    bottom: 70px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    text-align: center;
    z-index: 100;
}

.toc-floating-buy a {
    display: block;
}

.toc-floating-buy small {
    font-size: 0.85rem;
    color: #333;
}

.toc-pagination {
    text-align: center;
    margin-top: 20px;
    font-family: var(--font-pixel);
    font-size: 1.2rem;
}

.toc-pagination span {
    color: #666;
    margin: 0 5px;
}

.toc-pagination .active {
    color: var(--white);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .toc-row {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 15px;
    }

    .toc-right {
        padding-right: 0;
    }

    .toc-floating-buy {
        position: static;
        transform: none;
        margin-top: 12px;
        display: inline-block;
    }

    .toc-book-cover {
        max-width: 200px;
    }

    .toc-list {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .toc-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .toc-item {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .toc-book-cover {
        max-width: 160px;
    }

    .toc-book-frame {
        padding: 12px;
    }

    .toc-floating-buy {
        padding: 10px 14px;
    }

    .toc-floating-buy a {
        font-size: 0.95rem;
    }
}
