/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #1a1a1a;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.print-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.print-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Table of Contents */
.toc-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.toc-container h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #1e3c72;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 4px solid #667eea;
    padding-bottom: 1rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.toc-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Content Sections */
.content-section {
    background: white;
    margin-bottom: 2rem;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.content-section h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #1e3c72;
    margin-bottom: 1.5rem;
    border-left: 6px solid #667eea;
    padding-left: 1rem;
}

.content-section h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2a5298;
    margin: 1.5rem 0 1rem;
}

.content-section h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin: 1rem 0 0.5rem;
}

.content-box {
    margin-top: 1rem;
}

.content-box p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-box ul,
.content-box ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-box li {
    font-size: 1.05rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Tables */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.styled-table thead tr {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    text-align: left;
    font-weight: 800;
}

.styled-table th,
.styled-table td {
    padding: 15px 20px;
    font-weight: 700;
}

.styled-table tbody tr {
    border-bottom: 2px solid #f3f3f3;
    background-color: #fafafa;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f0f0f0;
}

.styled-table tbody tr:hover {
    background-color: #e8eaf6;
    transform: scale(1.01);
    transition: all 0.3s ease;
}

.styled-table tbody td {
    color: #1a1a1a;
}

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.concept-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.concept-card h4 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e3c72;
    margin-bottom: 0.8rem;
}

.concept-card p {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
}

/* Flowchart */
.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.flow-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 0.5rem 0;
}

.flow-box strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.flow-box p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.flow-arrow {
    font-size: 2.5rem;
    font-weight: 900;
    color: #667eea;
    margin: 0.3rem 0;
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0;
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.code-block h4 {
    background: #2d2d2d;
    color: #fff;
    padding: 12px 20px;
    margin: 0;
    font-weight: 800;
    font-size: 1.1rem;
    border-bottom: 2px solid #667eea;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: #a9b7c6;
    line-height: 1.6;
}

/* Use Case Grid */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.usecase-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-top: 5px solid #667eea;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.usecase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.usecase-card h4 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e3c72;
    margin-bottom: 1rem;
}

.usecase-card p {
    font-size: 1rem;
    font-weight: 700;
    color: #2a5298;
    margin: 0.8rem 0;
}

.usecase-card ul {
    margin-left: 1.5rem;
}

.usecase-card li {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.3rem;
}

/* Cost Example */
.cost-example {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe4b3 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid #ff9800;
    margin: 1.5rem 0;
}

.cost-example p {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.cost-example ul {
    margin-left: 1.5rem;
}

.cost-example li {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Mind Map */
.mindmap {
    position: relative;
    min-height: 600px;
    margin: 2rem 0;
    padding: 3rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.mindmap-center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.mindmap-branch {
    flex: 0 1 220px;
}

.branch-node {
    background: white;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-top: 4px solid #667eea;
}

.branch-node strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e3c72;
    margin-bottom: 0.8rem;
}

.sub-nodes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sub-nodes span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #555;
    padding: 0.3rem 0;
}

/* Q&A Section */
.qa-item {
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qa-question {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qa-question:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.toggle-icon {
    font-size: 1.3rem;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #f9f9f9;
}

.qa-answer.active {
    max-height: 1000px;
    padding: 20px 25px;
    border-top: 2px solid #e0e0e0;
}

.qa-answer p {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.qa-answer ul,
.qa-answer ol {
    margin-left: 2rem;
}

.qa-answer li {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer p {
    font-size: 1rem;
    font-weight: 700;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .navbar,
    .toc-container,
    .print-btn,
    .footer {
        display: none;
    }
    
    .content-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 2rem;
    }
    
    .qa-answer {
        max-height: none !important;
        display: block !important;
    }
    
    h2, h3, h4 {
        page-break-after: avoid;
        color: #000;
    }
    
    .styled-table,
    .concept-card,
    .usecase-card {
        page-break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.8rem;
    }
    
    .concept-grid,
    .usecase-grid {
        grid-template-columns: 1fr;
    }
    
    .flow-box {
        min-width: 250px;
    }
    
    .mindmap {
        padding: 1.5rem;
    }
    
    .styled-table {
        font-size: 0.9rem;
    }
    
    .styled-table th,
    .styled-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .content-section h3 {
        font-size: 1.3rem;
    }
    
    .code-block code {
        font-size: 0.85rem;
    }
}