/* Machine Learning Overview - Main Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.page-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.page-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Tabs Container */
.tabs-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 150px;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-button.active {
    background: #667eea;
    color: white;
    border-bottom: 3px solid #4ecdc4;
}

/* Tab Content */
.tab-content {
    min-height: 600px;
}

.tab-pane {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.tab-header h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.tab-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Content Placeholder */
.content-placeholder {
    margin: 2rem 0;
}

.placeholder-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    border-left: 5px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.placeholder-box h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.placeholder-box ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.placeholder-box li {
    padding: 0.8rem 1rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
    transition: transform 0.2s ease;
}

.placeholder-box li:hover {
    transform: translateX(5px);
}

.placeholder-box .note {
    margin-top: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-style: italic;
    text-align: center;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Introduction Tab Styles */
.intro-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.intro-section h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.section-intro {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Definition Box */
.definition-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.definition-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

.definition-text strong {
    font-size: 1.2em;
}

/* Example Box */
.example-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid #4ecdc4;
    margin: 1.5rem 0;
}

.example-box h4 {
    color: #667eea;
    margin-bottom: 1rem;
}

.example-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.example-list li {
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.comparison-card.ml-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

.comparison-card h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.comparison-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.flow-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.flow-arrow {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
}

.comparison-desc {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
}

/* ML Types Grid */
.ml-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.ml-type-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ml-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.ml-type-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.ml-type-card h4 {
    color: #667eea;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.ml-type-desc {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.ml-type-details {
    font-size: 0.95rem;
}

.ml-type-details p {
    margin: 0.8rem 0;
    color: #555;
}

.ml-type-details ul {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
    color: #666;
}

.ml-type-details li {
    margin: 0.5rem 0;
}

/* Concepts Grid */
.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.concept-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid #4ecdc4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.concept-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.concept-card h4 {
    color: #667eea;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.concept-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* IID Info Box */
.iid-info-box {
    background: linear-gradient(135deg, #e8f4fd, #f0f8ff);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid #2196F3;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
}

.iid-info-box h4 {
    color: #2196F3;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.iid-info-box p {
    color: #555;
    margin: 1rem 0;
    line-height: 1.7;
}

.iid-info-box strong {
    color: #1976D2;
}

.iid-info-box ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #555;
}

.iid-info-box li {
    margin: 0.8rem 0;
    line-height: 1.6;
}

/* Applications Grid */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.application-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    text-align: center;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.app-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.application-card h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.application-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-top: 1rem;
}

.application-card li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.application-card li:last-child {
    border-bottom: none;
}

/* When to Use Grid */
.when-to-use-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.use-case-box {
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.use-case-box.good {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left: 5px solid #28a745;
}

.use-case-box.bad {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left: 5px solid #dc3545;
}

.use-case-box h4 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.use-case-box.good h4 {
    color: #155724;
}

.use-case-box.bad h4 {
    color: #721c24;
}

.use-case-box ul {
    list-style: none;
    padding: 0;
}

.use-case-box li {
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

/* Getting Started */
.getting-started-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    border-left: 5px solid #667eea;
}

.getting-started-box h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.prerequisites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.prereq-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
}

.prereq-item strong {
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.prereq-item p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

.steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    position: relative;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.steps-list li strong {
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.steps-list li p {
    color: #666;
    margin: 0.5rem 0 0 0;
}

/* Learning Path */
.learning-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.path-step {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    text-align: center;
    transition: all 0.3s ease;
}

.path-step:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.step-content h5 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.path-arrow {
    font-size: 2rem;
    color: #667eea;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .tabs-nav {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: auto;
        width: 100%;
    }
    
    .tab-pane {
        padding: 1.5rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .ml-types-grid {
        grid-template-columns: 1fr;
    }
    
    .when-to-use-grid {
        grid-template-columns: 1fr;
    }
    
    .learning-path {
        flex-direction: column;
    }
    
    .path-arrow {
        transform: rotate(90deg);
    }
    
    .flow-item {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

/* Mindmap Styles */
.mindmap-container {
    width: 100%;
    margin: 2rem 0;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mindmap-controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.mode-switcher {
    display: flex;
    gap: 0.5rem;
}

.mode-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.search-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 250px;
}

.search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.clear-search-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #e9ecef;
    border-color: #cbd5e1;
}

.search-count {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 500;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.mindmap-svg-container {
    width: 100%;
    min-height: 600px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: visible;
    position: relative;
}

.mindmap-svg-container svg {
    width: 100%;
    height: auto;
    display: block;
}

/* D3.js Node and Link Styles */
.node {
    cursor: pointer;
}

.node circle {
    fill: #667eea;
    stroke: #fff;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.node rect {
    fill: #667eea;
    stroke: #fff;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.node text {
    font-size: 12px;
    fill: #333;
    dominant-baseline: middle;
    transition: all 0.3s ease;
}

.link {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 1.3px;
    transition: all 0.3s ease;
}

/* Highlight styles - Bold font and brighter colors */
.node.highlight-node circle,
.node.highlight-node rect {
    fill: #f97316 !important;
    stroke: #fff;
    stroke-width: 3px;
    filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.5));
    transform: scale(1.3);
}

.node.highlight-node text {
    fill: #f97316 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    stroke: rgba(249, 115, 22, 0.2);
    stroke-width: 0.5px;
}

.link.highlight-link {
    stroke: #f97316 !important;
    stroke-width: 2.6px !important;
    opacity: 1;
}

/* Search match highlight */
.node.search-match circle,
.node.search-match rect {
    fill: #ffd700 !important;
    stroke: #ffa500;
    stroke-width: 2.5px;
}

.node.search-match text {
    fill: #ff8c00 !important;
    font-weight: bold;
}

/* Group colors */
.group-center circle, .group-center rect {
    fill: #2563eb;
}

.group-supervised circle, .group-supervised rect {
    fill: #10b981;
}

.group-unsupervised circle, .group-unsupervised rect {
    fill: #7c3aed;
}

.group-rl circle, .group-rl rect {
    fill: #f59e0b;
}

.group-semi circle, .group-semi rect {
    fill: #ec4899;
}

.group-meta circle, .group-meta rect {
    fill: #14b8a6;
}

/* Module indicator */
.module-indicator {
    fill: #28a745;
    font-size: 10px;
    pointer-events: none;
}

.node.highlight-node .module-indicator {
    fill: #f97316;
    font-size: 12px;
}

/* Tooltip */
.mindmap-tooltip {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.9rem;
    color: #555;
    min-height: 50px;
    transition: all 0.3s ease;
}

.mindmap-tooltip b {
    color: #667eea;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.mindmap-tooltip em {
    color: #28a745;
    font-style: normal;
    font-weight: 500;
}

/* Responsive for mindmap */
@media (max-width: 768px) {
    .mindmap-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mode-switcher,
    .search-section,
    .action-buttons {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .mindmap-svg-container {
        min-height: 400px;
        overflow-x: auto;
    }
    
    .node text {
        font-size: 10px;
    }
    
    .node.highlight-node text {
        font-size: 12px !important;
    }
}

