/* Book Reader Dark Theme Styles */
/* This will override the original book styles to match the system's dark theme */

.restyled-book-content {
    color: #e0e0e0;
    background: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    line-height: 1.8;
    font-size: 16px;
}

.restyled-book-content .chapter-container {
    background: transparent;
    color: #e0e0e0;
    max-width: 100%;
    padding: 0;
}

.restyled-book-content .chapter-header-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 2px solid #4a9eff;
}

.restyled-book-content .chapter-number {
    color: #4a9eff;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.restyled-book-content .chapter-title {
    color: #e0e0e0;
    font-size: 32px;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.restyled-book-content .chapter-meta {
    color: #888;
    font-style: italic;
}

.restyled-book-content .section-title {
    color: #4a9eff;
    border-bottom: 2px solid #4a9eff;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 24px;
}

.restyled-book-content .section-header {
    border-bottom: 2px solid #404040;
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.restyled-book-content .section-number {
    color: #4a9eff;
    font-size: 24px;
    font-weight: 700;
}

.restyled-book-content .section-heading {
    color: #e0e0e0;
    font-size: 22px;
}

.restyled-book-content .section-intro,
.restyled-book-content .section-intro-text {
    color: #aaa;
    font-size: 16px;
    line-height: 1.8;
}

.restyled-book-content .learning-objectives-section {
    background: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
}

.restyled-book-content .objectives-list {
    list-style: none;
    padding: 0;
}

.restyled-book-content .objectives-list li {
    padding: 12px 0 12px 35px;
    position: relative;
    color: #e0e0e0;
    font-size: 16px;
}

.restyled-book-content .objectives-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4a9eff;
    font-weight: bold;
    font-size: 18px;
}

.restyled-book-content .content-section {
    background: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.restyled-book-content .approach-card,
.restyled-book-content .concept-box {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.restyled-book-content .approach-title,
.restyled-book-content h3 {
    color: #4a9eff;
    font-size: 20px;
    margin-bottom: 15px;
}

.restyled-book-content .approach-description,
.restyled-book-content p {
    color: #e0e0e0;
    line-height: 1.8;
    margin-bottom: 15px;
}

.restyled-book-content .pros-cons {
    margin-top: 15px;
}

.restyled-book-content .pros h4,
.restyled-book-content .cons h4 {
    color: #4a9eff;
    font-size: 16px;
    margin-bottom: 10px;
}

.restyled-book-content .pros ul,
.restyled-book-content .cons ul {
    list-style: none;
    padding: 0;
}

.restyled-book-content .pros li,
.restyled-book-content .cons li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: #e0e0e0;
}

.restyled-book-content .pros li:before {
    content: "+";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.restyled-book-content .cons li:before {
    content: "-";
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: bold;
}

.restyled-book-content code {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #4a9eff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.restyled-book-content pre {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.restyled-book-content pre code {
    background: transparent;
    border: none;
    color: #e0e0e0;
    padding: 0;
}

.restyled-book-content .comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.restyled-book-content .assignment-box {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 2px solid #4a9eff;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.restyled-book-content .assignment-box h3 {
    color: #4a9eff;
    margin-bottom: 15px;
}

.restyled-book-content .assignment-box p {
    color: #e0e0e0;
}

.restyled-book-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.restyled-book-content table th {
    background: #2d2d2d;
    color: #4a9eff;
    padding: 12px;
    text-align: left;
    border: 1px solid #404040;
    font-weight: 600;
}

.restyled-book-content table td {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 12px;
    border: 1px solid #404040;
}

.restyled-book-content table tr:hover td {
    background: #2d2d2d;
}

.restyled-book-content a {
    color: #4a9eff;
    text-decoration: none;
}

.restyled-book-content a:hover {
    color: #3a8eef;
    text-decoration: underline;
}

.restyled-book-content ul,
.restyled-book-content ol {
    color: #e0e0e0;
    margin: 15px 0;
    padding-left: 30px;
}

.restyled-book-content li {
    margin: 8px 0;
    line-height: 1.8;
}

.restyled-book-content blockquote {
    border-left: 4px solid #4a9eff;
    padding-left: 20px;
    margin: 20px 0;
    color: #aaa;
    font-style: italic;
}

.restyled-book-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #404040;
    margin: 20px 0;
}

/* Prism.js code highlighting adjustments for dark theme */
.restyled-book-content .token.comment,
.restyled-book-content .token.prolog,
.restyled-book-content .token.doctype,
.restyled-book-content .token.cdata {
    color: #888;
}

.restyled-book-content .token.punctuation {
    color: #e0e0e0;
}

.restyled-book-content .token.property,
.restyled-book-content .token.tag,
.restyled-book-content .token.boolean,
.restyled-book-content .token.number,
.restyled-book-content .token.constant,
.restyled-book-content .token.symbol,
.restyled-book-content .token.deleted {
    color: #ff6b6b;
}

.restyled-book-content .token.selector,
.restyled-book-content .token.attr-name,
.restyled-book-content .token.string,
.restyled-book-content .token.char,
.restyled-book-content .token.builtin,
.restyled-book-content .token.inserted {
    color: #4ecdc4;
}

.restyled-book-content .token.operator,
.restyled-book-content .token.entity,
.restyled-book-content .token.url,
.restyled-book-content .language-css .token.string,
.restyled-book-content .style .token.string {
    color: #ffe66d;
}

.restyled-book-content .token.atrule,
.restyled-book-content .token.attr-value,
.restyled-book-content .token.keyword {
    color: #4a9eff;
}

.restyled-book-content .token.function,
.restyled-book-content .token.class-name {
    color: #ffd93d;
}

.restyled-book-content .token.regex,
.restyled-book-content .token.important,
.restyled-book-content .token.variable {
    color: #ff6b6b;
}

/* Responsive */
@media (max-width: 768px) {
    .restyled-book-content {
        padding: 20px;
        font-size: 14px;
    }

    .restyled-book-content .chapter-title {
        font-size: 24px;
    }

    .restyled-book-content .section-heading {
        font-size: 18px;
    }
}

