/* Python E-Book CSS Styling */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgb(240, 248, 255), rgb(230, 240, 250));
    color: rgb(30, 30, 30);
    line-height: 1.8;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgb(255, 255, 255);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid rgb(70, 130, 180);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, rgb(70, 130, 180), rgb(100, 149, 237));
    color: rgb(255, 255, 255);
    padding: 40px;
    text-align: center;
    border-bottom: 5px solid rgb(30, 90, 150);
}

header h1 {
    font-size: 2.8em;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 25px;
    opacity: 0.95;
}

.print-btn {
    background-color: rgb(255, 255, 255);
    color: rgb(70, 130, 180);
    border: 3px solid rgb(255, 255, 255);
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.print-btn:hover {
    background-color: rgb(240, 248, 255);
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Navigation Styles */
.navigation {
    background: linear-gradient(135deg, rgb(240, 248, 255), rgb(230, 240, 250));
    padding: 30px;
    border-bottom: 3px solid rgb(70, 130, 180);
}

.navigation h2 {
    color: rgb(30, 90, 150);
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.nav-buttons button {
    background: linear-gradient(135deg, rgb(70, 130, 180), rgb(100, 149, 237));
    color: rgb(255, 255, 255);
    border: 2px solid rgb(30, 90, 150);
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.nav-buttons button:hover {
    background: linear-gradient(135deg, rgb(100, 149, 237), rgb(135, 206, 250));
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* Content Section Styles */
.content-section {
    padding: 40px;
    border-bottom: 2px solid rgb(220, 230, 240);
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    color: rgb(30, 90, 150);
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid rgb(70, 130, 180);
}

.content-section h3 {
    color: rgb(50, 110, 170);
    font-size: 1.6em;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
}

.content-section p {
    font-size: 1.1em;
    font-weight: bold;
    color: rgb(40, 40, 40);
    margin-bottom: 20px;
    line-height: 1.9;
}

.content-section ul {
    margin-left: 40px;
    margin-bottom: 20px;
}

.content-section li {
    font-size: 1.05em;
    font-weight: bold;
    color: rgb(50, 50, 50);
    margin-bottom: 12px;
    line-height: 1.8;
}

/* Code Block Styles */
.code-block {
    background: linear-gradient(135deg, rgb(40, 44, 52), rgb(50, 54, 62));
    border: 3px solid rgb(70, 130, 180);
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    overflow-x: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.code-block pre {
    color: rgb(144, 238, 144);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    font-weight: bold;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-block pre strong {
    color: rgb(144, 238, 144);
    font-weight: bold;
}

.code-block strong {
    color: rgb(144, 238, 144);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background-color: rgb(255, 255, 255);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border: 3px solid rgb(70, 130, 180);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, rgb(70, 130, 180), rgb(100, 149, 237));
}

thead th {
    color: rgb(255, 255, 255);
    padding: 18px;
    text-align: left;
    font-size: 1.1em;
    font-weight: bold;
    border-bottom: 3px solid rgb(30, 90, 150);
}

tbody tr {
    border-bottom: 2px solid rgb(220, 230, 240);
}

tbody tr:nth-child(even) {
    background-color: rgb(240, 248, 255);
}

tbody tr:hover {
    background-color: rgb(230, 240, 250);
}

tbody td {
    padding: 15px;
    color: rgb(40, 40, 40);
    font-size: 1em;
    font-weight: bold;
}

/* Code in Table Cells */
table code,
table strong code,
tbody td strong {
    background-color: rgb(255, 248, 220);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: rgb(139, 69, 19);
    border: 1px solid rgb(255, 215, 0);
}

/* Specifically for code-like content in tables */
td:nth-child(3) strong,
td:nth-child(4) strong {
    background-color: rgb(240, 255, 240);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: rgb(0, 100, 0);
    border: 1px solid rgb(144, 238, 144);
}

/* Flowchart Styles */
.flowchart {
    background: linear-gradient(135deg, rgb(250, 250, 250), rgb(245, 245, 250));
    border: 3px solid rgb(70, 130, 180);
    border-radius: 10px;
    padding: 30px;
    margin: 25px 0;
    overflow-x: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flowchart pre {
    color: rgb(30, 90, 150);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    font-weight: bold;
    line-height: 1.4;
    white-space: pre;
}

/* Mind Map Styles */
.mindmap {
    background: linear-gradient(135deg, rgb(255, 250, 240), rgb(250, 245, 235));
    border: 3px solid rgb(70, 130, 180);
    border-radius: 10px;
    padding: 30px;
    margin: 25px 0;
    overflow-x: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mindmap pre {
    color: rgb(30, 90, 150);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    font-weight: bold;
    line-height: 1.3;
    white-space: pre;
}

/* Disclaimer Styles */
.disclaimer {
    background: linear-gradient(135deg, rgb(255, 248, 220), rgb(255, 250, 230));
    border: 3px solid rgb(255, 165, 0);
    border-radius: 10px;
    padding: 30px;
    margin: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.disclaimer h3 {
    color: rgb(200, 100, 0);
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
}

.disclaimer p {
    color: rgb(80, 60, 20);
    font-size: 1em;
    font-weight: bold;
    line-height: 1.8;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, rgb(70, 130, 180), rgb(100, 149, 237));
    color: rgb(255, 255, 255);
    padding: 30px;
    text-align: center;
    border-top: 5px solid rgb(30, 90, 150);
}

footer p {
    font-size: 1.1em;
    font-weight: bold;
    margin: 10px 0;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border: none;
    }
    
    .navigation, .print-btn {
        display: none;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
    
    header {
        background: rgb(70, 130, 180);
        color: white;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .content-section {
        padding: 25px;
    }
    
    .content-section h2 {
        font-size: 1.8em;
    }
    
    .content-section h3 {
        font-size: 1.4em;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-buttons button {
        width: 100%;
    }
    
    table {
        font-size: 0.85em;
    }
    
    .code-block pre {
        font-size: 0.8em;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: rgb(70, 130, 180);
    color: rgb(255, 255, 255);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgb(240, 248, 255);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgb(70, 130, 180), rgb(100, 149, 237));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgb(100, 149, 237), rgb(135, 206, 250));
}