/* Base styles for body and container */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.8;
    scroll-behavior: smooth;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Headings */
h1, h2, h3 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    border-left: 6px solid #3498db;
    padding-left: 0.8rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Tab specific styles */
.tabs {
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.tab-button {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: #777;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}
.tab-button:hover {
    color: #555;
}
.tab-button.active {
    color: #3498db;
    border-color: #3498db;
}
.tab-content {
    display: none;
    padding-top: 1rem;
}
.tab-content.active {
    display: block;
}

/* Novel text style */
.novel-text {
  white-space: pre-wrap;
  font-family: serif;
  line-height: 1.8;
  margin: 2rem 0;
}

/* Accordion style */
.accordion-question {
    width: 100%;
    background-color: #f1f1f1;
    border: none;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
}
.accordion-question:hover {
    background-color: #ddd;
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    padding: 0.75rem 1rem;
    background-color: #4f46e5;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Reading progress bar */
#reading-progress {
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 4px;
    background: #4f46e5; 
    width: 0; 
    z-index: 1001;
}

/* Dark mode */
body.dark { 
    background-color: #1f2937; 
    color: #000000; 
}
body.dark h1, body.dark h2, body.dark h3 {
    color: #c7d2fe;
}
body.dark .tabs {
    background-color: #374151;
    border-color: #4b5563;
}
body.dark .tab-button {
    color: #d1d5db;
}
body.dark .tab-button:hover {
    color: #fff;
}
body.dark .tab-button.active {
    color: #93c5fd;
    border-color: #93c5fd;
}