/* 
 * Book Content Styles
 * Extracted from original HTML files and consolidated
 */

/* Base Section Styles */
.section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Typography */
.section h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Chapter-specific h1 colors */
.chapter-1 .section h1 {
    border-bottom: 3px solid #27ae60;
}

.chapter-2 .section h1 {
    border-bottom: 3px solid #e74c3c;
}

.chapter-3 .section h1 {
    border-bottom: 3px solid #f39c12;
}

.chapter-4 .section h1 {
    border-bottom: 3px solid #9b59b6;
}

.chapter-5 .section h1 {
    border-bottom: 3px solid #1abc9c;
}

.section h2 {
    color: #34495e;
    margin-top: 30px;
}

.section h3 {
    color: #495057;
    margin: 0 0 10px 0;
}

/* Diagram Container */
.diagram-container {
    margin: 30px 0;
    text-align: center;
}

.diagram-container svg {
    max-width: 100%;
    height: auto;
}

/* Explanation Boxes */
.explanation {
    background: #ecf0f1;
    padding: 15px;
    border-left: 4px solid #3498db;
    margin: 20px 0;
}

.chapter-1 .explanation {
    border-left: 4px solid #27ae60;
}

.chapter-2 .explanation {
    border-left: 4px solid #e74c3c;
}

.chapter-3 .explanation {
    border-left: 4px solid #f39c12;
}

.chapter-4 .explanation {
    border-left: 4px solid #9b59b6;
}

.chapter-5 .explanation {
    border-left: 4px solid #1abc9c;
}

/* Key Points */
.key-point {
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.chapter-1 .key-point {
    background: #d5f4e6;
}

.chapter-2 .key-point {
    background: #ffe5e5;
}

.chapter-3 .key-point {
    background: #fff5cd;
}

.chapter-4 .key-point {
    background: #f4e5ff;
}

.chapter-5 .key-point {
    background: #e5fff5;
}

/* Command Styles */
.command-box {
    background: #2c3e50;
    color: #27ae60;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 15px 0;
    overflow-x: auto;
}

.output-box {
    background: #34495e;
    color: #95a5a6;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    overflow-x: auto;
}

/* Command Grid */
.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.command-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

.command-card h3 {
    margin: 0 0 10px 0;
    color: #495057;
}

/* Code Elements */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e91e63;
}

/* Tables */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.comparison-table th, 
.comparison-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background: #27ae60;
    color: white;
}

.comparison-table tr:nth-child(even) {
    background: #f2f2f2;
}

/* Lists */
.section ul,
.section ol {
    margin: 10px 0;
    padding-left: 20px;
}

.section li {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .command-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .command-box, .output-box {
        font-size: 12px;
        padding: 10px;
    }
}

/* Container Styles */
.container-concept {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.container-example {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Practice Section Styles */
.practice-step {
    background: #e8f5e8;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 20px 0;
}

.practice-step h4 {
    color: #155724;
    margin: 0 0 10px 0;
}

/* Code Box for Script Display */
.code-box {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    margin: 15px 0;
    white-space: pre;
    overflow-x: auto;
    overflow-y: hidden;
    line-height: 1.5;
    max-width: 100%;
}

/* Warning and Info Boxes */
.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
}

.info {
    background: #cce7ff;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin: 15px 0;
}

.danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 15px 0;
}

.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 15px 0;
}