/* Modern Editor Styles */
.editor-view {
    position: fixed;
    left: var(--filesystem-width);
    right: var(--chat-width);
    top: 0;
    bottom: 0;
    background: rgb(40, 41, 45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: auto;
    z-index: 50;
}

.file-content {
    font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #FFFFFF;
    padding: 24px 32px;
    min-height: 100vh;
    background: rgb(40, 41, 45);
}

/* Style the pre element */
.file-content pre {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* Style the code element */
.file-content code {
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-all;
    word-wrap: break-word;
    tab-size: 4;
    display: block;
}

/* Override some Prism defaults */
.file-content pre[class*="language-"],
.file-content code[class*="language-"] {
    text-shadow: none;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

/* Ensure the code element is editable properly */
.file-content code[contenteditable="true"]:focus {
    outline: none;
    color: inherit;
}

/* Selection style */
.file-content::selection,
.file-content *::selection {
    background-color: rgba(88, 144, 255, 0.3);
}

.save-notification {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 16px 24px;
    border-radius: 16px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.save-notification.success {
    background: rgba(40, 167, 69, 0.9);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.save-notification.error {
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(100px) translateX(0);
        opacity: 0;
    }
    to {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
}

/* Add subtle hover effect to the editor content */
.file-content:hover {
    background: rgb(41, 42, 46);
}

/* Add focus state for the editor */
.file-content:focus {
    outline: none;
    background: rgb(40, 41, 45);
    box-shadow: inset 0 0 0 1px rgba(88, 144, 255, 0.2);
}

/* Scrollbar styling */
.editor-view::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.editor-view::-webkit-scrollbar-track {
    background: rgb(35, 36, 40);
}

.editor-view::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    border: 3px solid rgb(40, 41, 45);
}

.editor-view::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Update token colors to match Xcode */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6C7986; /* Xcode comment green */
}

.token.punctuation {
    color: #ffffff; /* White for better visibility */
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #D0BF69; /* Xcode number yellow */
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #FC6A5D; /* Xcode string red */
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #ffffff; /* White for operators */
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #FC5FA3; /* Xcode keyword pink */
}

.token.function,
.token.class-name {
    color: #67B7A4; /* Xcode function green */
}

.token.regex,
.token.important,
.token.variable {
    color: #41A1C0; /* Xcode variable blue */
}

/* Additional Xcode-specific tokens */
.token.property-access,
.token.method {
    color: #67B7A4; /* Xcode method green */
}

.token.parameter {
    color: #41A1C0; /* Xcode parameter blue */
}

.token.type {
    color: #D0A8FF; /* Xcode type purple */
}

.token.preprocessor {
    color: #FD8F3F; /* Xcode preprocessor orange */
}