/* FBI & NPHY Educational Website Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #10b981;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

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

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

/* Navigation Bar */
.navbar {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.level-indicator {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 600;
}

#current-level {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
}

.nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

.breadcrumb-item::after {
    content: ' / ';
    margin-left: 8px;
    color: var(--border-color);
}

.breadcrumb-item:last-child::after {
    content: '';
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Content Wrapper */
.content-wrapper {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    min-height: 600px;
    position: relative;
}

/* Level Content */
.level-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.level-content.active {
    display: block;
}

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

.level-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.level-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

/* Image Container */
.image-container {
    position: relative;
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.image-container.clickable {
    cursor: pointer;
}

.image-container.clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.main-image, .section-image, .component-image, .block-image, .circuit-image, .timing-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.click-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.clickable:hover .click-hint {
    opacity: 1;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.info-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Key Concepts */
.key-concepts {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
    border-left: 4px solid #f59e0b;
}

.key-concepts h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.key-concepts ul {
    list-style: none;
    padding: 0;
}

.key-concepts li {
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.key-concepts li:last-child {
    border-bottom: none;
}

.key-concepts strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Split View (Level 2) */
.split-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 32px;
    margin: 40px 0;
}

.split-section {
    background: var(--light-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.split-section.clickable {
    cursor: pointer;
}

.split-section.clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.section-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.section-content {
    padding: 24px;
}

.section-content h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-content ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.section-content li {
    margin: 8px 0;
    font-size: 14px;
}

/* Technical Specs Table */
.technical-specs {
    margin: 40px 0;
}

.technical-specs h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    overflow: hidden;
}

.specs-table th {
    background: var(--primary-color);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.specs-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table tr:nth-child(even) {
    background: var(--light-bg);
}

.specs-table tr:hover {
    background: #e0f2fe;
}

/* Component Grid (Level 3) */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin: 40px 0;
}

.component-card {
    background: var(--light-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.component-card.clickable {
    cursor: pointer;
}

.component-card.clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.component-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.component-header h2 {
    font-size: 20px;
    margin: 0;
}

.component-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.component-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.component-details {
    padding: 24px;
}

.component-details h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.component-details ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.component-details li {
    margin: 8px 0;
    font-size: 13px;
}

/* Data Flow Diagram */
.dataflow-diagram {
    margin: 60px 0;
}

.dataflow-diagram h3 {
    font-size: 24px;
    margin-bottom: 32px;
    text-align: center;
    color: var(--text-primary);
}

.flow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 32px;
    background: var(--light-bg);
    border-radius: 12px;
}

.flow-step {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    min-width: 150px;
    text-align: center;
    position: relative;
}

.flow-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.flow-content strong {
    display: block;
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.flow-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.flow-arrow {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Block Diagram Container (Level 4) */
.block-diagram-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 40px;
    margin: 40px 0;
}

.block-detail {
    background: var(--light-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.block-detail.clickable {
    cursor: pointer;
}

.block-detail.clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.block-detail h3 {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 20px;
    font-size: 20px;
    margin: 0;
}

.block-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.block-description {
    padding: 24px;
}

.block-description h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.block-description ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.block-description li {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.block-description p {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 12px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
}

/* Timing Diagram */
.timing-diagram {
    margin: 60px 0;
    background: var(--light-bg);
    border-radius: 12px;
    padding: 32px;
}

.timing-diagram h3 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.timing-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.timing-specs h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.timing-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
}

.timing-table th {
    background: var(--secondary-color);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
}

.timing-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
}

.timing-table tr:last-child td {
    border-bottom: none;
}

.timing-table tr:nth-child(even) {
    background: white;
}

/* Circuit Grid (Level 5) */
.circuit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
    gap: 40px;
    margin: 40px 0;
}

.circuit-card {
    background: var(--light-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.circuit-card h3 {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    padding: 20px;
    font-size: 20px;
    margin: 0;
}

.circuit-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.circuit-code {
    background: #1e293b;
    padding: 20px;
}

.circuit-code h4 {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 12px;
}

.circuit-code pre {
    margin: 0;
    overflow-x: auto;
}

.circuit-code code {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.circuit-details {
    padding: 24px;
}

.circuit-details p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0;
}

.circuit-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Layout Section */
.layout-section {
    margin: 60px 0;
}

.layout-section h3 {
    font-size: 24px;
    margin-bottom: 32px;
    text-align: center;
    color: var(--text-primary);
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.layout-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid var(--primary-color);
}

.layout-card h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.layout-card ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.layout-card li {
    margin: 8px 0;
    font-size: 14px;
}

/* Tools Section */
.tools-section {
    margin: 60px 0;
    background: var(--light-bg);
    border-radius: 12px;
    padding: 32px;
}

.tools-section h3 {
    font-size: 24px;
    margin-bottom: 32px;
    text-align: center;
    color: var(--text-primary);
}

.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.tool-category h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

.tool-category ul {
    list-style: none;
    padding: 0;
}

.tool-category li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.tool-category li:last-child {
    border-bottom: none;
}

/* Footer */
.footer-info {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.footer-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .component-grid, .circuit-grid {
        grid-template-columns: 1fr;
    }
    
    .timing-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .split-view {
        grid-template-columns: 1fr;
    }
    
    .block-diagram-container {
        grid-template-columns: 1fr;
    }
    
    .level-title {
        font-size: 28px;
    }
    
    .flow-container {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .content-wrapper {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    .level-title {
        font-size: 24px;
    }
    
    .level-description {
        font-size: 16px;
    }
}
