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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    overflow: hidden;
}

.site-header {
    background: #2d3748;
    color: white;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
}

.site-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: #90cdf4;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #4a5568;
}

.split-container {
    display: flex;
    height: calc(100vh - 56px);
}

.lab-guide {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: #fafafa;
    border-right: 1px solid #e2e8f0;
    max-width: 55%;
}

.lab-guide h1 {
    color: #1a202c;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3182ce;
}

.lab-guide h2 {
    color: #2d3748;
    font-size: 1.35rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.lab-guide h3 {
    color: #4a5568;
    font-size: 1.1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.lab-guide p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.lab-guide ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.lab-guide li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.lab-guide pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.lab-guide code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.lab-guide :not(pre) > code {
    background: #edf2f7;
    color: #c53030;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.lab-guide pre {
    position: relative;
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    padding-top: 2.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a0aec0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
}

.lab-guide pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.copy-btn.copied {
    background: #48bb78;
    border-color: #48bb78;
    color: white;
}

.lab-guide table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.lab-guide table th,
.lab-guide table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.lab-guide table th {
    background: #edf2f7;
    font-weight: 600;
    color: #2d3748;
}

.lab-guide blockquote {
    border-left: 4px solid #3182ce;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #4a5568;
    font-style: italic;
}

.lab-guide hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2rem 0;
}

.lab-guide .explanation {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    color: #2b6cb0;
    font-size: 0.95rem;
}

.terminal-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    max-width: 45%;
    resize: none;
}

.terminal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.terminal-toolbar span {
    color: #888;
    font-size: 0.8rem;
}

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

.toolbar-buttons button {
    background: #3d3d3d;
    border: none;
    color: #ccc;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.toolbar-buttons button:hover {
    background: #4d4d4d;
}

#terminal {
    flex: 1;
    padding: 0.75rem;
    overflow: hidden;
    resize: none;
}

.examples-accordion {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.examples-accordion {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion {
    margin: 0.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #edf2f7;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #edf2f7;
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #e2e8f0;
}

.accordion-header .arrow {
    transition: transform 0.2s;
    font-size: 0.8rem;
    color: #718096;
}

.accordion.open .accordion-header .arrow {
    transform: rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #edf2f7;
}

.accordion.open .accordion-content {
    max-height: 300px;
    overflow-y: auto;
}

.accordion.open .accordion-content table {
    margin: 0;
    background: #edf2f7;
}

.accordion.open .accordion-content table th,
.accordion.open .accordion-content table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #cbd5e0;
    background: #edf2f7;
    color: #2d3748;
}

.accordion.open .accordion-content table th {
    background: #e2e8f0;
    color: #1a202c;
}

.accordion-code {
    padding: 1rem;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    overflow-x: auto;
}

.accordion-actions {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #4a5568;
}

.accordion-load-btn {
    background: #38a169;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.accordion-load-btn:hover {
    background: #2f855a;
}

.day-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #edf2f7;
    border-top: 1px solid #e2e8f0;
}

.day-nav button {
    background: #3182ce;
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.day-nav button:hover:not(:disabled) {
    background: #2c5282;
}

.day-nav button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.day-nav span {
    color: #4a5568;
    font-weight: 500;
}

.logo-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #4a5568;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    background: #2d3748;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
}

.loading-overlay.hidden {
    display: none;
}

.intro-container {
    display: block;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.intro-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.intro-header h1 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.intro-header p {
    font-size: 1.2rem;
    color: #4a5568;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.intro-footer {
    text-align: center;
    padding: 3rem 0;
    color: #718096;
}

.intro-footer p {
    margin-bottom: 1rem;
}

.begin-btn {
    display: inline-block;
    background: #3182ce;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.begin-btn:hover {
    background: #2c5282;
}
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #4a5568;
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    color: #a0aec0;
}

.loading-progress {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #718096;
}

@media (max-width: 1024px) {
    .split-container {
        flex-direction: column;
    }

    .lab-guide,
    .terminal-panel {
        max-width: 100%;
        flex: none;
        height: 50%;
    }

    .logo-container {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
    }
}
