:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #c0392b;
    --bg: #f5f6fa;
    --text: #2c3e50;
    --code-bg: #2d2d30;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding-bottom: 60px;
}

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

/* Header Standard */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 { margin: 0 0 10px 0; font-size: 2.5em; }
header p { margin: 0; opacity: 0.9; font-size: 1.1em; }

/* Section Standard */
.section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--accent);
}

h2 { color: var(--primary); border-bottom: 2px solid #eee; padding-bottom: 10px; margin-top: 0; }

/* Buttons Standard */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-next { background: var(--accent); }
.btn-run { background: var(--success); }
.btn-reset { background: var(--warning); }

.nav-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Code Container Standard */
.code-container {
    background: var(--code-bg);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
    border: 1px solid #444;
}

/* Prism Fix: Code block */
pre[class*="language-"] {
    margin: 0 !important;
    padding: 20px !important;
    border-radius: 0 !important;
    max-height: 400px;
}

/* Editable area (Hidden by default or toggled) */
.code-editor {
    width: 100%;
    height: 300px;
    background: transparent;
    color: #ccc;
    border: none;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
    outline: none;
    display: none; /* Default hidden, show on edit */
}

.code-header {
    background: #1e1e1e;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

.output {
    background: #1e1e1e;
    color: #2ecc71;
    padding: 15px;
    font-family: monospace;
    border-top: 1px solid #444;
    white-space: pre-wrap;
    min-height: 50px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999; transition: opacity 0.5s;
}
.spinner {
    width: 50px; height: 50px;
    border: 5px solid #f3f3f3; border-top: 5px solid var(--accent);
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Mermaid Fix */
.mermaid {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
