/* Final Polish - Ultimate Fix */
[v-cloak] { display: none; }
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #f8f8f8;
    --panel-color: #ffffff;
    --text-color: #1d1d1f;
    --accent-color: #c84a00;
    --subtle-text-color: #6e6e73;
    --border-color: #e5e5e6;
    --highlight-bg: #fff3e0;

    --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    --nav-width: 330px;
    --content-width: 850px; /* Widened as per request */
    --border-radius: 10px;
    --transition-main: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: var(--font-sans); background-color: var(--bg-color); background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23e5e5e6" fill-opacity="0.3" fill-rule="evenodd"%3E%3Cpath d="M5 0h1L0 6V5zM6 5v1H5z"/%3E%3C/g%3E%3C/svg%3E'); color: var(--text-color); -webkit-font-smoothing: antialiased; }

#app { display: flex; height: 100vh; }

/* Navigation Panel */
.navigation-panel { width: var(--nav-width); height: 100%; background-color: var(--panel-color); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; flex-shrink: 0; box-shadow: 5px 0 25px -15px rgba(0,0,0,0.05); }

.site-header { padding: 1.75rem 1.5rem; border-bottom: 1px solid var(--border-color); text-align: center; flex-shrink: 0; }
.site-title-link { text-decoration: none; color: var(--text-color); }
.site-title { font-weight: 700; font-size: 1.8rem; }
.toc-container { flex-grow: 1; overflow-y: auto; padding: 0.5rem 0; }
.toc-list { list-style: none; }
.toc-chapter { font-family: var(--font-sans); font-weight: 600; font-size: 1rem; }
.toc-chapter-title { padding: 0.9rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s ease; }
.toc-chapter-title:hover { background-color: var(--highlight-bg); }
.toc-chapter-title.active { color: var(--accent-color); }
.chapter-arrow { transition: transform 0.3s ease; transform: rotate(0deg); }
.toc-chapter-title.expanded .chapter-arrow { transform: rotate(90deg); }

.toc-article-list {
    list-style: none;
    background-color: #fdfdfd;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.toc-article-list.expanded {
    max-height: 1000px; /* A large enough value to show all articles */
}

.toc-article-list li a { display: flex; align-items: center; text-decoration: none; color: var(--subtle-text-color); padding: 0.6rem 1.5rem 0.6rem 2.5rem; border-left: 3px solid transparent; transition: all 0.2s ease; }
.toc-article-list li a .article-number { margin-right: 0.8em; }
.toc-article-list li a:hover { color: var(--text-color); }
.toc-article-list li a.active { color: var(--accent-color); font-weight: 600; border-left-color: var(--accent-color); }

/* Content Panel */
.content-panel { flex-grow: 1; height: 100vh; overflow-y: auto; scroll-behavior: smooth; position: relative; z-index: 900; }
.article-wrapper { max-width: var(--content-width); margin: 0 auto; padding: 5rem 2rem; }
.article-content { font-size: 18px; line-height: 1.8; letter-spacing: 0.03em; }
.article-content p { margin-bottom: 1.6rem; }
.article-header { margin-bottom: 3rem; text-align: center; }
.chapter-info { font-family: var(--font-sans); color: var(--subtle-text-color); margin-bottom: 1rem; font-size: 0.9rem; }
.article-header h1 { font-weight: 700; font-size: 2.4rem; line-height: 1.3; }
.article-meta { font-family: var(--font-sans); color: var(--subtle-text-color); font-size: 0.85rem; margin-top: 1.5rem; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 0.5rem 0; display: inline-block; }
.article-footer-nav { margin-top: 4rem; display: flex; justify-content: space-between; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.article-footer-nav a { text-decoration: none; color: var(--text-color); padding: 1rem; border-radius: var(--border-radius); transition: background-color 0.2s ease; flex-basis: 48%; }
.article-footer-nav a:hover { background-color: var(--highlight-bg); }
.nav-label { font-weight: 600; color: var(--text-color); }
.nav-title { font-size: 1rem; color: var(--subtle-text-color); }
.next-article { text-align: right; }

/* Cover & Transitions */
.book-cover { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.book-title { font-size: 3rem; font-weight: 700; }
.book-subtitle { font-size: 1.1rem; color: var(--subtle-text-color); margin-top: 1rem; }
.cover-decoration { width: 50px; height: 2px; background-color: var(--accent-color); margin: 2rem auto; }
.fade-slide-enter-active, .fade-slide-leave-active { transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.fade-slide-enter-from { opacity: 0; transform: translateY(20px); }
.fade-slide-leave-to { opacity: 0; }

/* Mobile Specific */
.mobile-header, .hamburger-menu { display: none; }
@media (max-width: 1024px) {
    #app { flex-direction: column; }

    .navigation-panel { position: fixed; transform: translateX(-100%); z-index: 1000; box-shadow: 0 0 60px rgba(0,0,0,0.2); transition: transform var(--transition-main); }
    .navigation-panel.is-open { transform: translateX(0); pointer-events: auto; }
    .content-panel { width: 100%; }
    .navigation-panel:not(.is-open) { pointer-events: none; }

    .hamburger-menu { display: flex; flex-direction: column; justify-content: space-around; align-items: center; position: fixed; top: 1rem; left: 1rem; z-index: 1100; background: var(--panel-color); border: 1px solid var(--border-color); width: 48px; height: 48px; border-radius: 50%; cursor: pointer; padding: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
    .hamburger-menu span { display: block; width: 100%; height: 2px; background: var(--text-color); transition: all 0.3s; }
    .navigation-panel.is-open + .mobile-header .hamburger-menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .navigation-panel.is-open + .mobile-header .hamburger-menu span:nth-child(2) { opacity: 0; }
    .navigation-panel.is-open + .mobile-header .hamburger-menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .mobile-header { display: flex; align-items: center; justify-content: center; padding: 0 4rem; text-align: center; position: sticky; top: 0; background: rgba(253, 253, 253, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); height: 56px; z-index: 950; }
    .mobile-header-title { font-family: var(--font-sans); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .article-wrapper { padding: 2rem 1rem; max-width: 100%; }
    .article-content { text-align: justify; }
}


