body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    padding-top: 5vh;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    gap: 20px;
}

header {
    height: 5vh;
    width: 100%;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    font-weight: 500;
    padding: 8px 16px;
    transition: color 0.3s ease;
}

header a span {
    margin-right: 8px;
    font-size: 1.1em;
}
.sidebar {
    width: 300px;
    background-color: white;
    color: #333;
    padding: 30px 0;
    padding-top: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: calc(5vh + 20px);
}
.sidebar h3 {
    color: #333;
    text-align: center;
    margin: 0 0 20px 0;
    padding: 0 20px;
    font-size: 18px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar li {
    margin: 0;
}
.sidebar a {
    display: block;
    color: #666;
    text-decoration: none;
    padding: 12px 20px;
    transition: background-color 0.3s, color 0.3s;
    border-left: 3px solid transparent;
}
.sidebar a:hover {
    background-color: #f8f8f8;
    color: #333;
    border-left-color: #3498db;
}
.sidebar a.active {
    background-color: #3498db;
    color: white;
    border-left-color: #2980b9;
}
.main-content {
    flex: 1;
    max-width: 800px;
    padding-top: 20px;
}
.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}
.code-block {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}
.run-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 0;
    transition: background-color 0.3s;
}
.run-button:hover {
    background-color: #45a049;
}
.run-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.output {
    background-color: #000;
    color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    min-height: 50px;
    white-space: pre-wrap;
}
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}
.status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
}
.status.loading {
    background-color: #fff3cd;
    color: #856404;
}
.status.ready {
    background-color: #d4edda;
    color: #155724;
}
.code-textarea {
    width: 100%;
    font-family: 'Courier New', monospace;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f8f8;
    font-size: 14px;
    resize: vertical;
    margin: 15px 0;
    box-sizing: border-box;
    line-height: 1.5;
}
.code-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}
.code-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}
.code-editor .CodeMirror {
    height: auto;
    min-height: 120px;
    max-height: 540px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    overflow-y: auto;
}
.code-editor .CodeMirror-focused {
    outline: none;
}
.code-editor:focus-within {
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}
.code-editor .CodeMirror-scroll {
    padding: 10px;
    overflow-x: hidden;
}
.code-editor .CodeMirror-lines {
    padding: 10px 0;
}
.code-editor .CodeMirror-hscrollbar {
    display: none !important;
}
.code-editor .CodeMirror-scrollbar-filler {
    display: none !important;
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 10px;
}
.loading-overlay .loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-overlay .loading-text {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}
.container {
    position: relative;
}

code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    margin: 0 4px;
    outline: solid 1px #dddddd;
    border-radius: 2px;
}
