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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #2d2d30;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #404040;
}

.title {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.controls {
    display: flex;
    gap: 10px;
}

.controls button {
    background-color: #0e639c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    position: relative;
}

.controls button:hover {
    background-color: #1177bb;
}

.controls button:active {
    background-color: #0a5a8a;
}

/* Tab bar styles */
.tab-bar {
    background-color: #252526;
    border-bottom: 1px solid #404040;
    display: flex;
    align-items: center;
    min-height: 35px;
    overflow: hidden;
}

.tabs-container {
    display: flex;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab {
    background-color: #2d2d30;
    border-right: 1px solid #404040;
    color: #cccccc;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    min-width: 120px;
    max-width: 200px;
    font-size: 13px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.tab.active {
    background-color: #1e1e1e;
    color: #ffffff;
    border-bottom: 2px solid #0e639c;
}

.tab:hover:not(.active) {
    background-color: #37373d;
}

.tab-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.tab-name.unsaved::after {
    content: ' •';
    color: #ffffff;
}

.tab-close {
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.tab-close:hover {
    background-color: #404040;
    color: #ffffff;
}

.new-tab-btn {
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border-left: 1px solid #404040;
}

.new-tab-btn:hover {
    background-color: #37373d;
    color: #ffffff;
}

.editor-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 200px;
    background-color: #252526;
    border-right: 1px solid #404040;
    padding: 15px;
}

.sidebar h3 {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-list {
    list-style: none;
}

.file-item {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    color: #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:hover {
    background-color: #2a2d2e;
}

.file-item.active {
    background-color: #37373d;
    color: #ffffff;
}

.file-item.unsaved::after {
    content: '•';
    color: #ffffff;
    font-weight: bold;
}

.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-header {
    background-color: #2d2d30;
    padding: 8px 15px;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filename {
    font-size: 13px;
    color: #cccccc;
}

.status {
    font-size: 12px;
    color: #888888;
}

#monaco-editor {
    flex: 1;
    background-color: #1e1e1e;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100vh;
    background-color: #252526;
    border-left: 1px solid #404040;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.settings-panel.hidden {
    transform: translateX(100%);
}

.settings-panel.visible {
    transform: translateX(0);
}

.settings-content {
    padding: 20px;
}

.settings-content h3 {
    color: #ffffff;
    margin-bottom: 20px;
    border-bottom: 1px solid #404040;
    padding-bottom: 10px;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 14px;
}

.setting-group label {
    display: block;
    color: #cccccc;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-group input[type="checkbox"] {
    margin-right: 8px;
}

.editor-setting {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.editor-setting label {
    min-width: 100px;
    margin: 0;
    color: #cccccc;
    font-size: 13px;
}

.editor-setting select,
.editor-setting input[type="range"] {
    background: #1e1e1e;
    border: 1px solid #404040;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    flex: 1;
}

.editor-setting select:focus,
.editor-setting input[type="range"]:focus {
    border-color: #0e639c;
    outline: none;
}

.editor-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
    color: #cccccc;
    font-size: 13px;
}

.editor-option input[type="checkbox"] {
    margin: 0;
}

#fontSizeValue {
    min-width: 35px;
    font-size: 12px;
    color: #cccccc;
}

.color-setting {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.color-setting label {
    min-width: 120px;
    margin: 0;
}

.color-setting input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.color-setting input[type="range"] {
    flex: 1;
    min-width: 80px;
}

.opacity-label {
    min-width: 35px;
    font-size: 12px;
    color: #cccccc;
}

.color-presets {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-presets button {
    background: #444;
    color: white;
    border: 1px solid #666;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.color-presets button:hover {
    background: #555;
}

.data-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.data-buttons button {
    background: #0e639c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    flex: 1;
    min-width: 100px;
}

.data-buttons button:hover {
    background: #1177bb;
}

.data-buttons button.danger {
    background: #dc3545;
}

.data-buttons button.danger:hover {
    background: #c82333;
}

.data-info {
    color: #888888;
    font-size: 11px;
    line-height: 1.4;
}

.space-guide {
    pointer-events: none;
}

.tab-guide {
    pointer-events: none;
}

.python-colon-guide {
    font-weight: bold;
    pointer-events: none;
}

.block-start-guide, .block-end-guide {
    font-weight: bold;
    pointer-events: none;
}

.indent-guide {
    pointer-events: none;
}

.html-tag-guide {
    color: #ff69b4 !important;
    opacity: 0.8;
    font-weight: bold;
    pointer-events: none;
}

.css-property-guide {
    color: #87ceeb !important;
    opacity: 0.8;
    pointer-events: none;
}

.css-block-guide {
    color: #dda0dd !important;
    opacity: 0.8;
    font-weight: bold;
    pointer-events: none;
}

.typed-block-start-guide, .typed-block-end-guide {
    color: #20b2aa !important;
    opacity: 0.8;
    font-weight: bold;
    pointer-events: none;
}

/* Default visual guide styles */
.space-guide {
    color: rgba(100, 149, 237, 0.7) !important;
    pointer-events: none;
    font-weight: normal;
}

.tab-guide {
    color: rgba(100, 149, 237, 0.7) !important;
    pointer-events: none;
    font-weight: normal;
}

.python-colon-guide {
    color: rgba(50, 205, 50, 0.8) !important;
    pointer-events: none;
    font-weight: bold;
}

.block-start-guide, .block-end-guide {
    color: rgba(255, 165, 0, 0.8) !important;
    pointer-events: none;
    font-weight: bold;
}

.indent-guide {
    color: rgba(50, 205, 50, 0.6) !important;
    pointer-events: none;
    font-weight: normal;
}

.dyslexia-font {
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Arial', sans-serif !important;
    font-weight: 500 !important;
}

.dyslexia-font .monaco-editor,
.dyslexia-font .monaco-editor .view-lines {
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Arial', sans-serif !important;
    font-weight: 500 !important;
}

.increased-spacing .monaco-editor,
.increased-spacing .monaco-editor .view-lines {
    letter-spacing: 0.12em !important;
    line-height: 1.6 !important;
}

.line-highlight .monaco-editor .margin,
.line-highlight .monaco-editor .monaco-editor-background {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.line-highlight .monaco-editor .current-line {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.block-boundaries .monaco-editor .view-lines .view-line {
    border-left: 1px solid rgba(100, 149, 237, 0.2);
}

.block-boundaries .monaco-editor .bracket-match {
    background-color: rgba(100, 149, 237, 0.3) !important;
    border: 1px solid #6495ed !important;
}

/* Text-to-Speech Panel */
.tts-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background-color: #252526;
    border-left: 1px solid #404040;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.tts-panel.hidden {
    transform: translateX(100%);
}

.tts-panel.visible {
    transform: translateX(0);
}

.tts-content {
    padding: 20px;
}

.tts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #404040;
}

.tts-header h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 0;
}

.tts-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tts-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tts-btn {
    background-color: #0e639c;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.tts-btn:hover {
    background-color: #1177bb;
}

.tts-btn:active {
    background-color: #0d5a8f;
}

.tts-btn.stop {
    background-color: #d32f2f;
}

.tts-btn.stop:hover {
    background-color: #f44336;
}

.tts-btn span {
    font-size: 18px;
}

.tts-settings-group {
    padding: 15px;
    background-color: #1e1e1e;
    border-radius: 4px;
    border: 1px solid #404040;
}

.tts-settings-group h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tts-setting {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tts-setting:last-child {
    margin-bottom: 0;
}

.tts-setting label {
    color: #cccccc;
    min-width: 60px;
    font-size: 13px;
}

.tts-setting select {
    flex: 1;
    background-color: #3c3c3c;
    color: #ffffff;
    border: 1px solid #404040;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 13px;
}

.tts-setting input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    background: #404040;
    outline: none;
    border-radius: 3px;
    height: 4px;
}

.tts-setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #0e639c;
    cursor: pointer;
    border-radius: 50%;
}

.tts-setting input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #0e639c;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.tts-setting span {
    color: #cccccc;
    min-width: 45px;
    text-align: right;
    font-size: 12px;
}

.tts-info {
    background-color: #1e1e1e;
    border: 1px solid #404040;
    border-radius: 4px;
    padding: 15px;
}

.tts-info p {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 13px;
}

.tts-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tts-info li {
    color: #cccccc;
    padding: 5px 0;
    font-size: 12px;
    line-height: 1.5;
}

.tts-info kbd {
    background-color: #3c3c3c;
    border: 1px solid #555555;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: #ffffff;
}

/* Feedback Modal Styles */
.feedback-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.feedback-intro {
    background-color: #1e1e1e;
    border-left: 3px solid #0e639c;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.feedback-intro p {
    margin: 0;
    color: #cccccc;
    line-height: 1.6;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    background-color: #3c3c3c;
    border: 1px solid #555555;
    color: #ffffff;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0e639c;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    color: #888888;
    font-size: 12px;
    margin-top: -2px;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.feedback-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.feedback-actions button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0e639c;
    color: white;
}

.btn-primary:hover {
    background-color: #1177bb;
}

.btn-primary:active {
    background-color: #0d5a8f;
}

.btn-secondary {
    background-color: #555555;
    color: white;
}

.btn-secondary:hover {
    background-color: #666666;
}

.feedback-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.feedback-status.hidden {
    display: none;
}

.feedback-status.success {
    background-color: #1e4620;
    border: 1px solid #4caf50;
    color: #4caf50;
}

.feedback-status.error {
    background-color: #4a1f1f;
    border: 1px solid #f44336;
    color: #f44336;
}

.feedback-status.sending {
    background-color: #1e3a4a;
    border: 1px solid #2196F3;
    color: #2196F3;
}

.feedback-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #404040;
}

.feedback-footer p {
    color: #cccccc;
    font-size: 13px;
    margin: 0;
}

.feedback-footer a {
    color: #0e639c;
    text-decoration: none;
}

.feedback-footer a:hover {
    color: #1177bb;
    text-decoration: underline;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #2d2d30;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #404040;
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    color: #cccccc;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ffffff;
    background: #404040;
    border-radius: 4px;
}

.modal-body {
    padding: 20px;
}

.shortcut-section {
    margin-bottom: 25px;
}

.shortcut-section h4 {
    color: #ffffff;
    margin-bottom: 12px;
    border-bottom: 1px solid #404040;
    padding-bottom: 8px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut {
    background: #404040;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    min-width: 80px;
    text-align: center;
}

.description {
    color: #cccccc;
    flex: 1;
    margin-left: 15px;
}

/* Search modal styles */
.search-modal {
    max-width: 500px;
    width: 90%;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-input-group label {
    color: #cccccc;
    font-size: 13px;
    font-weight: bold;
}

.search-input-group input[type="text"] {
    background: #1e1e1e;
    border: 1px solid #404040;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.search-input-group input[type="text"]:focus {
    border-color: #0e639c;
    outline: none;
}

.search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cccccc;
    font-size: 13px;
    cursor: pointer;
}

.search-option input[type="checkbox"] {
    margin: 0;
}

.search-results {
    padding: 8px 12px;
    background: #2d2d30;
    border-radius: 4px;
    border: 1px solid #404040;
}

.search-results #matchCount {
    color: #cccccc;
    font-size: 13px;
}

.search-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-actions button {
    background: #0e639c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.search-actions button:hover {
    background: #1177bb;
}

.search-actions button:disabled {
    background: #555;
    cursor: not-allowed;
}

/* Search highlights in editor */
.search-highlight {
    background-color: rgba(255, 255, 0, 0.3) !important;
    border: 1px solid #ffff00;
}

.search-highlight-current {
    background-color: rgba(255, 165, 0, 0.5) !important;
    border: 1px solid #ffa500;
}

/* Button tooltips */
.controls button {
    position: relative;
}

.controls button::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.controls button:hover::after {
    opacity: 1;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888888;
    font-size: 16px;
}

.empty-state button {
    margin-top: 20px;
    background-color: #0e639c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.empty-state button:hover {
    background-color: #1177bb;
}

/* Success/error notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.info {
    background-color: #17a2b8;
}

.notification.warning {
    background-color: #ffc107;
    color: #212529;
}

/* Error Modal */
.error-modal {
    max-width: 600px;
    width: 90%;
}

.error-content {
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.5;
}

.error-details {
    text-align: left;
    margin: 20px 0;
    padding: 15px;
    background: #1e1e1e;
    border-radius: 4px;
    border: 1px solid #404040;
}

.error-details h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 14px;
}

.error-details pre {
    color: #cccccc;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.4;
}

.error-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.error-actions button {
    background: #0e639c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: 100px;
}

.error-actions button:hover {
    background: #1177bb;
}

.error-actions button.danger {
    background: #dc3545;
}

.error-actions button.danger:hover {
    background: #c82333;
}

.error-actions button.warning {
    background: #ffc107;
    color: #212529;
}

.error-actions button.warning:hover {
    background: #e0a800;
}

/* Connection Status */
.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideUp 0.3s ease;
}

.connection-status.hidden {
    display: none;
}

.connection-status.online {
    background: #28a745;
}

.status-icon {
    font-size: 14px;
}

.status-text {
    font-size: 12px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 30, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #404040;
    border-top: 4px solid #0e639c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-text {
    font-size: 16px;
    color: #cccccc;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Error states */
.editor-error {
    border: 2px solid #dc3545 !important;
    animation: pulse 2s infinite;
}

.file-error {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-left: 3px solid #dc3545 !important;
}

.file-error::after {
    content: ' ⚠️';
}

/* Recovery mode indicators */
.recovery-mode {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
}

.recovery-indicator {
    position: fixed;
    top: 60px;
    right: 20px;
    background: #ffc107;
    color: #212529;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1500;
    animation: slideUp 0.3s ease;
}

.recovery-indicator.hidden {
    display: none;
}

/* Help Modal Styles */
.help-modal {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

.help-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #404040;
}

.help-nav-btn {
    background: #404040;
    color: #cccccc;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.help-nav-btn:hover {
    background: #555;
    color: #ffffff;
}

.help-nav-btn.active {
    background: #0e639c;
    color: #ffffff;
}

.help-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.help-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.help-section.active {
    display: block;
}

.help-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #0e639c;
    padding-bottom: 8px;
}

.help-section h4 {
    color: #ffffff;
    margin: 20px 0 10px 0;
    font-size: 16px;
}

.help-section h5 {
    color: #cccccc;
    margin: 15px 0 8px 0;
    font-size: 14px;
}

.help-section p {
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 12px;
}

.help-section ul, .help-section ol {
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 15px;
    padding-left: 20px;
}

.help-section li {
    margin-bottom: 5px;
}

/* Tutorial Steps */
.tutorial-step {
    background: rgba(14, 99, 156, 0.1);
    border: 1px solid #0e639c;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.tutorial-step h4 {
    margin-top: 0;
    color: #ffffff;
    font-size: 16px;
}

.example-code {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.example-code pre {
    margin: 0;
    color: #d4d4d4;
    font-size: 13px;
    line-height: 1.5;
}

.example-code code {
    color: #d4d4d4;
    font-family: inherit;
}

/* Feature Highlights */
.feature-highlight {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.feature-highlight h4 {
    margin-top: 0;
    color: #28a745;
}

/* Accessibility Features */
.accessibility-feature {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 18px;
}

.accessibility-feature h4 {
    margin-top: 0;
    color: #ffc107;
}

/* Visual Guide Examples */
.guide-explanation {
    background: rgba(108, 117, 125, 0.1);
    border: 1px solid #6c757d;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 18px;
}

.guide-example {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin: 0 2px;
}

.guide-example.space {
    background: rgba(100, 149, 237, 0.3);
    color: #6495ed;
}

.guide-example.tab {
    background: rgba(100, 149, 237, 0.3);
    color: #6495ed;
}

.guide-example.python {
    background: rgba(50, 205, 50, 0.3);
    color: #32cd32;
}

.guide-example.block-start,
.guide-example.block-end {
    background: rgba(255, 165, 0, 0.3);
    color: #ffa500;
}

.guide-example.html {
    background: rgba(255, 105, 180, 0.3);
    color: #ff69b4;
}

.guide-example.css-prop {
    background: rgba(135, 206, 235, 0.3);
    color: #87ceeb;
}

.guide-example.css-block {
    background: rgba(221, 160, 221, 0.3);
    color: #dda0dd;
}

.guide-example.indent {
    background: rgba(50, 205, 50, 0.3);
    color: #32cd32;
}

.language-guide {
    margin: 15px 0;
    padding: 12px;
    background: rgba(45, 45, 48, 0.5);
    border-radius: 4px;
}

.language-guide h5 {
    margin-top: 0;
    color: #ffffff;
    font-size: 14px;
}

.code-example {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
}

.code-example pre {
    margin: 0;
    color: #d4d4d4;
    font-size: 12px;
    line-height: 1.4;
}

.customization-info {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid #17a2b8;
    border-radius: 6px;
    padding: 18px;
    margin: 20px 0;
}

.customization-info h4 {
    margin-top: 0;
    color: #17a2b8;
}

/* FAQ Styles */
.faq-item {
    background: rgba(52, 58, 64, 0.5);
    border: 1px solid #495057;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-item h4 {
    background: #495057;
    color: #ffffff;
    margin: 0;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-item h4:hover {
    background: #5a6268;
}

.faq-content {
    padding: 20px;
    border-top: 1px solid #6c757d;
}

.faq-content p {
    margin-bottom: 10px;
}

.faq-content strong {
    color: #ffffff;
}

.faq-content ol, .faq-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.error-reporting {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 18px;
    margin: 20px 0;
}

.error-reporting h4 {
    margin-top: 0;
    color: #dc3545;
}

/* Tips and Tricks */
.tip-category {
    margin-bottom: 30px;
}

.tip-category h4 {
    color: #0e639c;
    border-bottom: 1px solid #0e639c;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.tip-item {
    background: rgba(14, 99, 156, 0.05);
    border: 1px solid rgba(14, 99, 156, 0.3);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.tip-item h5 {
    margin-top: 0;
    color: #0e639c;
    font-size: 14px;
}

.pro-tip {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    position: relative;
}

.pro-tip::before {
    content: "💡";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #2d2d30;
    padding: 0 8px;
    font-size: 20px;
}

.pro-tip h4 {
    margin-top: 0;
    color: #ffd700;
}

/* Keyboard shortcuts in content */
kbd {
    background: #404040;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    border: 1px solid #666;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Scrollbar for help content */
.help-content::-webkit-scrollbar {
    width: 8px;
}

.help-content::-webkit-scrollbar-track {
    background: #2d2d30;
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Animation for content transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for help modal */
@media (max-width: 768px) {
    .help-modal {
        width: 98%;
        max-height: 95vh;
    }
    
    .help-navigation {
        justify-content: center;
    }
    
    .help-nav-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .help-content {
        max-height: 50vh;
    }
    
    .tutorial-step,
    .accessibility-feature,
    .guide-explanation {
        padding: 12px;
    }
    
    .example-code,
    .code-example {
        font-size: 11px;
        padding: 8px;
    }
}