html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 18px;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.content {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

/* Main Container */
.editor-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: calc(100% + 200px);
    width: 100%;
    /* Full screen + 200px */
    padding: 0.3rem;
    margin: 0;
    box-sizing: border-box;
}

.toolbar {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    background-color: #f0f0f0;
    border-radius: 4px;
    align-items: center;
    flex-shrink: 0;
    /* Don't shrink toolbar */
}

/* Input Area */
.input-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #e8f4f8;
    border-radius: 4px;
    flex-shrink: 0;
}

.input-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.input-area textarea {
    width: 100%;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 16px;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    background-color: #fff;
}

/* Layout Structure */
.main-area {
    display: flex;
    flex-direction: row;
    /* Side by side */
    flex: 1;
    gap: 1rem;
    min-height: 0;
}

.left-section {
    flex: 1;
    /* Takes 50% width */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.code-editor {
    flex: 1.5;
    /* Takes moderate portion of left section height */
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
}

#monaco-editor-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Input Data Panel */
.input-data-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    max-height: 180px;
    /* 6 lines approximately */
}

.input-data-header {
    padding: 0.5rem 1rem;
    background-color: #e3f2fd;
    border-bottom: 1px solid #90caf9;
    font-weight: bold;
    font-size: 16px;
    color: #000;
    flex-shrink: 0;
}

.input-data-textarea {
    flex: 1;
    width: 100%;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 18px;
    padding: 0.5rem;
    background-color: #fff;
    color: #000;
    border: none;
    resize: none;
    outline: none;
    overflow-y: auto;
    min-height: 120px;
}

.output-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Takes equal or smaller portion of left section height */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.output-header {
    padding: 0.5rem 1rem;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.output-content {
    flex: 1;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 16px;
    overflow-y: auto;
    white-space: pre-wrap;
    background-color: #fff;
}

.question-panel {
    flex: 1;
    /* Takes 50% width (Right Column) */
    display: flex;
    flex-direction: column;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    overflow: hidden;
}

.question-header {
    padding: 0.5rem 1rem;
    background-color: #ffc107;
    border-bottom: 1px solid #e0a800;
    font-weight: bold;
    font-size: 20px;
    color: #000;
    flex-shrink: 0;
}

.question-content {
    flex: 1;
    padding: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 22px;
    overflow-y: auto;
    white-space: pre-wrap;
    background-color: #fffbf0;
    line-height: 1.6;
}

/* Buttons and Indicators */
.numbered-buttons-wrapper {
    display: flex;
    flex-direction: row;
    gap: 3px;
    align-items: center;
}

.btn-1 {
    background-color: #007bff;
    color: white;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-1:hover {
    background-color: #0056b3;
}

.btn-1.btn-correct {
    background-color: #28a745 !important;
}

.btn-1.btn-correct:hover {
    background-color: #218838 !important;
}

.btn-1.btn-incorrect {
    background-color: #dc3545 !important;
}

.btn-1.btn-incorrect:hover {
    background-color: #c82333 !important;
}

.btn-run {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.2rem;
}

.btn-run:hover {
    background-color: #218838;
}

.btn-run:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.status-indicator {
    font-size: 16px;
    color: #666;
}

.verification-result {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.verification-result.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.verification-result.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Verification Dialog Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.verification-dialog {
    background-color: #fff;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.verification-dialog.correct {
    border: 3px solid #28a745;
}

.verification-dialog.incorrect {
    border: 3px solid #dc3545;
}

.dialog-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.dialog-close:hover {
    color: #000;
}

.dialog-content {
    padding: 2rem;
    text-align: center;
}

.dialog-icon {
    font-size: 64px;
    margin-bottom: 1rem;
}

.verification-dialog.correct .dialog-icon {
    color: #28a745;
}

.verification-dialog.incorrect .dialog-icon {
    color: #dc3545;
}

.dialog-message {
    font-size: 24px;
    font-weight: bold;
}

.verification-dialog.correct .dialog-message {
    color: #28a745;
}

.verification-dialog.incorrect .dialog-message {
    color: #dc3545;
}

.dialog-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
}

.dialog-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.dialog-button:hover {
    background-color: #0056b3;
}

/* Console Modal */
.console-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.console-window {
    background-color: #1e1e1e;
    border: 2px solid #444;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.console-header {
    background-color: #2d2d30;
    color: #fff;
    padding: 1rem;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.console-close:hover {
    background-color: #e81123;
}

.console-output {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 18px;
    color: #d4d4d4;
    line-height: 1.5;
}

.console-output>div {
    margin-bottom: 0.25rem;
}

.input-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.prompt-symbol {
    color: #4ec9b0;
    font-weight: bold;
}

.console-input {
    flex: 1;
    background-color: transparent;
    border: none;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 18px;
    outline: none;
    padding: 0;
}

/* Clear Button */
.btn-clear {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.2rem;
}

.btn-clear:hover {
    background-color: #5a6268;
}

/* Login and Password Fields */
.toolbar input[type="text"],
.toolbar input[type="password"] {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    margin-right: 1rem;
    height: 3rem;
}

.toolbar label {
    font-weight: bold;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    height: 3rem;
}

/* Error line highlighting */
.error-line {
    color: #dc3545;
    font-weight: bold;
}

/* Connect and Send Buttons */
.btn-connect,
.btn-send {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.2rem;
}



.btn-connect:hover,
.btn-send:hover {
    background-color: #0056b3;
}

.btn-send:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}