/* Base styling for ancient Chinese aesthetics */
:root {
    --imperial-gold: #D4AF37;
    --imperial-red: #8B0000;
    --imperial-black: #000000;
    --imperial-white: #F5F5F5;
    --imperial-beige: #F5F5DC;
    
    --scroll-decoration-size: 24px;
}

/* Custom scrollbar for the ancient Chinese theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--imperial-beige);
}

::-webkit-scrollbar-thumb {
    background: var(--imperial-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--imperial-red);
}

/* Prose customizations for Chinese text */
#chapter-content {
    line-height: 1.8;
    font-size: 1.125rem;
}

#chapter-content h2 {
    color: var(--imperial-red);
    font-size: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    text-align: center;
    position: relative;
}

#chapter-content h2::before,
#chapter-content h2::after {
    content: "❦";
    color: var(--imperial-gold);
    position: absolute;
    font-size: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

#chapter-content h2::before {
    left: 0;
}

#chapter-content h2::after {
    right: 0;
}

#chapter-content p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

/* Chapter navigation */
.chapter-button {
    transition: all 0.3s ease;
    position: relative;
}

.chapter-button::before,
.chapter-button::after {
    content: "";
    position: absolute;
    width: var(--scroll-decoration-size);
    height: var(--scroll-decoration-size);
    opacity: 0;
    transition: all 0.3s ease;
}

.chapter-button::before {
    top: -5px;
    left: -5px;
    border-top: 2px solid var(--imperial-gold);
    border-left: 2px solid var(--imperial-gold);
}

.chapter-button::after {
    bottom: -5px;
    right: -5px;
    border-bottom: 2px solid var(--imperial-gold);
    border-right: 2px solid var(--imperial-gold);
}

.chapter-button:hover::before,
.chapter-button:hover::after,
.chapter-button.active::before,
.chapter-button.active::after {
    opacity: 1;
}

.chapter-button.active {
    color: var(--imperial-red);
    font-weight: bold;
    transform: scale(1.05);
}

/* Dark theme */
body.dark-theme {
    background-color: #121212;
    color: var(--imperial-white);
}

body.dark-theme #chapter-content {
    background-color: rgba(30, 30, 30, 0.9);
    color: var(--imperial-white);
}

body.dark-theme header,
body.dark-theme footer {
    border-color: var(--imperial-gold);
}

body.dark-theme .bg-imperial-black\/5 {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #chapter-content h2::before,
    #chapter-content h2::after {
        display: none;
    }
}

/* Animation for background particles */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.bg-particle {
    position: absolute;
    opacity: 0.05;
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}



