/* Lab Page Styles - MAE 4190 Theme */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0e27;
    color: #e0e6ed;
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #161b33 0%, #1a1f3a 100%);
    border-bottom: 2px solid #30363d;
    padding: 30px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(22, 27, 51, 0.95);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #79c0ff;
    transform: translateX(-5px);
}

.header h1 {
    font-size: 1.8rem;
    color: #f0f6fc;
}

.lab-meta {
    font-size: 0.9rem;
    color: #8b949e;
}

/* Main layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 40px 20px;
}

/* Table of Contents */
.toc {
    position: sticky;
    top: 120px;
    height: fit-content;
    background: rgba(22, 27, 51, 0.6);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.toc h2 {
    font-size: 1.1rem;
    color: #58a6ff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #30363d;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
}

.toc a:hover {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.15);
    transform: translateX(8px);
}

.toc a.active {
    color: #58a6ff;
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.2), rgba(139, 92, 246, 0.1));
    font-weight: 500;
    border-left: 3px solid #58a6ff;
}

/* Main content */
.content {
    background: rgba(22, 27, 51, 0.4);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 50px;
    min-height: 80vh;
}

.content h2 {
    font-size: 2.2rem;
    color: #f0f6fc;
    margin-top: 50px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    padding-left: 40px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #58a6ff, #8b5cf6, #ec4899) 1;
    position: relative;
}

/* .content h2::before {
    content: '⚡';
    position: absolute;
    left: 0;
    font-size: 1.5rem;
} */

.content h2:first-child {
    margin-top: 0;
}

.content h3 {
    font-size: 1.3rem;
    color: #f0f6fc;
    margin-top: 30px;
    margin-bottom: 15px;
}

.content p {
    margin-bottom: 16px;
    color: #c9d1d9;
}

.content ul, .content ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.content li {
    margin-bottom: 8px;
    color: #c9d1d9;
}

/* Code blocks */
.content pre {
    background: #1c1f2e !important;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.content code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

.content p code {
    background: rgba(88, 166, 255, 0.15);
    color: #79c0ff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Images */
.content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 24px 0;
    border: 1px solid #30363d;
}

/* Video embeds */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid #30363d;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Callout boxes */
.callout {
    background: rgba(88, 166, 255, 0.1);
    border-left: 4px solid #58a6ff;
    padding: 16px 20px 16px 60px;
    margin: 20px 0;
    border-radius: 6px;
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.callout::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    line-height: 1;
}

.callout.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.callout.warning::before {
    content: '⚠️';
}

.callout.success {
    background: rgba(63, 185, 80, 0.1);
    border-left-color: #3fb950;
}

.callout.success::before {
    content: '';
}

/* Results section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.result-card {
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #58a6ff, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-card:hover::before {
    opacity: 1;
}

.result-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #58a6ff;
    box-shadow: 0 12px 30px rgba(88, 166, 255, 0.3);
}

.result-card h4 {
    color: #58a6ff;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    .toc {
        position: relative;
        top: 0;
    }

    .content {
        padding: 30px;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}