/* OktoScript Editor Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e;
    color: #d4d4d4;
    overflow: hidden;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Header */
.editor-header {
    background: #252526;
    border-bottom: 1px solid #3e3e42;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.header-left h1 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.version {
    background: #ffd700;
    color: #1e1e1e;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #ffd700;
    color: #1e1e1e;
    font-weight: 600;
}

.btn-primary:hover {
    background: #ffed4e;
}

.btn-secondary {
    background: #3e3e42;
    color: #d4d4d4;
}

.btn-secondary:hover {
    background: #4e4e52;
}

.btn-icon {
    background: #3e3e42;
    color: #d4d4d4;
    padding: 8px 12px;
    font-size: 16px;
}

.btn-icon:hover {
    background: #4e4e52;
}

.btn-link {
    background: transparent;
    color: #ffd700;
    text-decoration: none;
}

.btn-link:hover {
    background: #3e3e42;
}

/* Editor Wrapper */
.editor-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    background: #1e1e1e;
}

.editor-wrapper.centered {
    padding: 0 20%;
}

.editor-wrapper.centered #editor {
    max-width: 1200px;
    margin: 0 auto;
}

#editor {
    height: 100%;
    width: 100%;
}

/* CodeMirror Custom Styles */
.CodeMirror {
    height: 100% !important;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
    flex: 1;
}

.CodeMirror-scroll {
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
}

.CodeMirror-sizer {
    min-height: 100% !important;
}

.CodeMirror-focused {
    outline: none;
}

.CodeMirror-linenumber {
    color: #858585;
}

.CodeMirror-cursor {
    border-left: 2px solid #ffd700;
}

/* Syntax highlighting */
.cm-comment {
    color: #6a9955;
}

.cm-keyword {
    color: #c586c0;
    font-weight: 600;
}

.cm-string {
    color: #ce9178;
}

.cm-number {
    color: #b5cea8;
}

.cm-operator {
    color: #d4d4d4;
}

.cm-variable {
    color: #9cdcfe;
}

/* Error markers */
.error-marker {
    background: rgba(211, 47, 47, 0.2) !important;
    border-bottom: 2px solid #d32f2f;
    border-left: 3px solid #d32f2f;
}

/* Footer */
.editor-footer {
    background: #ffd700;
    border-top: 1px solid #ffed4e;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

.status-left {
    display: flex;
    gap: 16px;
    color: #1e1e1e;
    font-weight: 500;
}

.status-right {
    color: #1e1e1e;
}

.status-saved {
    font-weight: 600;
}

.status-unsaved {
    color: #d32f2f;
}

.status-saved {
    color: #2e7d32;
}

/* Autocomplete */
.CodeMirror-hints {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    z-index: 1000;
}

.CodeMirror-hint {
    color: #d4d4d4;
    padding: 4px 8px;
    border-radius: 2px;
}

.CodeMirror-hint-active {
    background: #ffd700;
    color: #1e1e1e;
}

.CodeMirror-hint .cm-keyword {
    color: #c586c0;
    font-weight: 600;
}

.CodeMirror-hint .cm-variable {
    color: #9cdcfe;
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #2e7d32;
    color: white;
}

.notification-info {
    background: #1976d2;
    color: white;
}

.notification-error {
    background: #d32f2f;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header-right {
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .status-left {
        flex-direction: column;
        gap: 4px;
    }
    
    .editor-wrapper.centered {
        padding: 0 5%;
    }
}
