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

.iban,
h3 {
    color: #000;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0.05em;
}

:root {
    --ink: #1a1a2e;
    --parchment: #f5f0e8;
    --gold: #b8860b;
    --gold-light: #daa520;
    --mist: rgba(245, 240, 232, 0.6);
    --shadow: rgba(26, 26, 46, 0.12);
}

@font-face {
    font-family: 'Noto Serif SC';
    src: local('Noto Serif SC'), local('NotoSerifSC-Regular');
}

body {
    font-family: 'Georgia', 'Noto Serif SC', 'SimSun', serif;
    background: var(--parchment);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* decorative fog */
.fog {
    position: fixed;
    top: 0;
    width: 40vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

.fog--left {
    left: 0;
    background: linear-gradient(to right, rgba(218, 165, 32, 0.08), transparent);
}

.fog--right {
    right: 0;
    background: linear-gradient(to left, rgba(218, 165, 32, 0.08), transparent);
}

/* header */
.header {
    text-align: center;
    padding: 3rem 1rem 1.5rem;
    position: relative;
    z-index: 1;
}

.header__symbol {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold);
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

.header__symbol:hover {
    background: var(--gold);
    color: var(--parchment);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.header__title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-shadow: 0 2px 8px var(--shadow);
}

.header__subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.25em;
    margin-top: 0.3rem;
    color: var(--ink);
    opacity: 0.6;
}

/* chapter */
.chapter {
    width: 100%;
    max-width: 720px;
    padding: 1rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

.chapter__number {
    text-align: center;
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 0.5em;
    margin-bottom: 0.2rem;
}

.chapter__number-bg {
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.chapter__title {
    text-align: center;
    font-size: 1rem;
    color: var(--ink);
    opacity: 0.8;
    font-style: italic;
    margin-bottom: 2rem;
}

/* verses */
.verses {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.verse {
    background: rgba(255, 255, 255, 0.55);
    border-left: 3px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 4px 20px var(--shadow);
    opacity: 1;
    transform: translateY(0);
}

.verse.animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.verse.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.verse__chinese {
    font-size: 1.55rem;
    line-height: 2;
    letter-spacing: 0.15em;
    color: var(--ink);
    margin-bottom: 0;
    transition: margin-bottom 0.4s ease;
}

.verse__pinyin {
    font-size: 0.82rem;
    color: var(--gold-light);
    letter-spacing: 0.06em;
    margin-top: 0.4rem;
}

.verse__bulgarian {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    opacity: 0.75;
    margin-top: 0.8rem;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    padding-top: 0.8rem;
}

/* accordion */
.accordion {
    margin-top: 0.8rem;
}

.accordion__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--gold);
    padding: 0.3rem 0;
    transition: color 0.3s;
}

.accordion__toggle:hover {
    color: var(--gold-light);
}

.accordion__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border: 1px solid var(--gold);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.3s, color 0.3s, transform 0.3s;
    flex-shrink: 0;
}

.accordion__toggle:hover .accordion__icon {
    background: var(--gold);
    color: var(--parchment);
}

.accordion.open .accordion__icon {
    transform: rotate(45deg);
}

.accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
    opacity: 0;
    padding: 0 0 0 1.9rem;
}

.accordion.open .accordion__body {
    max-height: 300px;
    opacity: 1;
    padding: 0.5rem 0 0.2rem 1.9rem;
}

.accordion__text {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--ink);
    opacity: 0.6;
    font-style: italic;
}


/* intro page */
.intro {
    width: 100%;
    max-width: 720px;
    padding: 1rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

.intro__about {
    margin-bottom: 2.5rem;
}

.intro__heading {
    text-align: center;
    font-size: 1.3rem;
    color: var(--gold);
    letter-spacing: 0.3em;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.intro__text {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink);
    opacity: 0.8;
    margin-bottom: 1rem;
    text-align: justify;
}

.intro__text strong {
    color: var(--gold);
    opacity: 1;
}

.intro__text em {
    color: var(--gold-light);
}

/* table of contents */
.toc {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.55);
    border-left: 3px solid var(--gold);
    border-radius: 0 10px 10px 0;
    box-shadow: 0 2px 12px var(--shadow);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

a.toc__item:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(4px);
    box-shadow: 0 4px 20px var(--shadow);
}

.toc__item--disabled {
    opacity: 0.35;
    pointer-events: none;
    border-left-style: dashed;
}

.toc__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    background: var(--gold);
    color: var(--parchment);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toc__zh {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--ink);
    min-width: 4rem;
}

.toc__label {
    font-size: 0.9rem;
    color: var(--ink);
    opacity: 0.65;
}

/* header index - about button */
.header--index {
    position: relative;
}

.header__buttons {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    min-width: 220px;
    justify-content: center;
    z-index: 10;
}

.header__btn {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    color: var(--gold);
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--gold);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.header__btn:hover {
    background: var(--gold);
    color: var(--parchment);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

/* header home link */
.header__home {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    color: var(--gold);
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--gold);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.header__home:hover {
    background: var(--gold);
    color: var(--parchment);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

/* chapter index bar */
.index-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    position: relative;
    z-index: 2;
    max-width: 720px;
    width: 100%;
}

.index-bar__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 50%;
    transition: background 0.3s, color 0.3s, transform 0.2s, border-color 0.3s;
}

.index-bar__link:hover {
    background: var(--gold);
    color: var(--parchment);
    transform: translateY(-1px);
    border-color: var(--gold);
}

.index-bar__link--active {
    background: var(--gold);
    color: var(--parchment);
    border-color: var(--gold);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.35);
}

.index-bar__link--disabled {
    opacity: 0.25;
    pointer-events: none;
    border-style: dashed;
}

/* navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1;
}

.nav--bottom {
    margin-top: 1rem;
}

.nav__link {
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 6px;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

.nav__link:hover {
    background: var(--gold);
    color: var(--parchment);
    transform: translateY(-1px);
}

.nav__link--disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* footer */
.footer {
    margin-top: auto;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--ink);
    opacity: 0.35;
    z-index: 1;
}

.footer__home {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 1rem;
    opacity: 1;
    transition: opacity 0.3s;
}

.footer__home:hover {
    opacity: 0.6;
}

/* responsive */
@media (max-width: 520px) {
    .header__title {
        font-size: 2rem;
    }

    .verse__chinese {
        font-size: 1.25rem;
    }

    .verse {
        padding: 1.2rem 1.2rem;
    }

    .index-bar__link {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 0.7rem;
    }

    .index-bar {
        gap: 0.3rem;
    }

    .toc__zh {
        display: none;
    }

    .toc__item {
        gap: 0.6rem;
        padding: 0.7rem 1rem;
    }
}

/* about page */
.about {
    width: 100%;
    max-width: 800px;
    padding: 1rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

.about__hero {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.about__image-wrap {
    flex-shrink: 0;
    width: 280px;
    max-width: 100%;
}

.about__image {
    width: 100%;
    height: auto;
    min-height: 360px;
    border-radius: 12px;
    border-left: 4px solid var(--gold);
    box-shadow: 0 4px 24px var(--shadow);
    object-fit: cover;
    aspect-ratio: 3/4;
}

.about__intro {
    flex: 1;
    min-width: 260px;
}

.about__heading {
    font-size: 1.3rem;
    color: var(--gold);
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.about__text {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink);
    opacity: 0.85;
    margin-bottom: 1rem;
    text-align: justify;
}

.about__text strong {
    color: var(--gold);
    opacity: 1;
}

.about__text em {
    color: var(--gold-light);
}

.about__site {
    background: rgba(255, 255, 255, 0.55);
    border-left: 3px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.about__site .about__heading {
    margin-bottom: 1rem;
}

.about__site .about__text:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .about__hero {
        flex-direction: column;
    }

    .about__image-wrap {
        width: 100%;
    }
}

/* book page */
.book {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

.book__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.book__cover {
    display: block;
    max-width: 100%;
    width: 320px;
    height: auto;
    border-radius: 8px;
    border-left: 4px solid var(--gold);
    box-shadow: 0 4px 24px var(--shadow);
    object-fit: contain;
}

.book__text {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink);
    opacity: 0.85;
    text-align: justify;
}

.book__text strong {
    color: var(--gold);
}

.book__text em {
    color: var(--gold-light);
}
