body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--vp-c-bg);
    color: var(--vp-c-text-1);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--vp-c-bg-elv);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--vp-c-divider);
    box-shadow: var(--shadow);
    z-index: 10;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--vp-c-brand-1) 0%, var(--vp-c-indigo-2) 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.doc-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 118, 199, 0.5);
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
}

.sidebar {
    width: 280px;
    background: var(--vp-c-bg-soft);
    border-radius: var(--border-radius);
    border: 1px solid var(--vp-c-divider);
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

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

.group-title {
    padding: 10px 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vp-c-brand-2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-title i {
    color: var(--vp-c-brand-2);
}

.file {
    padding: 12px 20px 12px 45px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem;
    color: var(--vp-c-brand-2);
}

.file:hover {
    background: linear-gradient(90deg, var(--vp-c-indigo-soft) 0%, transparent 100%);
    color: var(--vp-c-text-1);
}

.file.active {
    background: linear-gradient(90deg, var(--vp-c-indigo-soft) 0%, transparent 100%);
    color: var(--vp-c-text-1);
}

.file.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--vp-c-brand-1);
    border-radius: 0 4px 4px 0;
}

.file::after {
    content: "•";
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vp-c-brand-1);
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--vp-c-bg-soft);
    border-radius: var(--border-radius);
    border: 1px solid var(--vp-c-divider);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.editor-header {
    padding: 15px 25px;
    background: var(--vp-c-bg-elv);
    border-bottom: 1px solid var(--vp-c-divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-title {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--vp-c-brand-2);
}

.editor-title i {
    color: var(--vp-c-brand-1);
}

.editor-actions {
    display: flex;
    gap: 15px;
}

button {
    background: linear-gradient(135deg, var(--vp-c-brand-1) 0%, var(--vp-c-indigo-2) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

#logout-btn {
    background: linear-gradient(135deg, #ff2b51 0%, #ff2f4c 100%);
}

.CodeMirror {
    flex: 1;
    font-size: 15px;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    padding: 15px;
    background: transparent !important;
    color: var(--vp-c-text-1) !important;
    height: 100%;
}

.CodeMirror-gutters {
    background: var(--vp-c-bg-soft) !important;
    border-right: 1px solid var(--vp-c-divider) !important;
}

.CodeMirror-linenumber {
    color: var(--vp-c-text-2) !important;
}

.CodeMirror-line {
    color: var(--vp-c-text-1) !important;
}

.cm-s-dracula .CodeMirror-activeline-background {
    background: var(--vp-c-indigo-soft) !important;
}

.cm-s-dracula .cm-keyword { color: #8ec5f6 !important; }
.cm-s-dracula .cm-atom { color: #bd93f9 !important; }
.cm-s-dracula .cm-number { color: #bd93f9 !important; }
.cm-s-dracula .cm-def { color: #50fa7b !important; }
.cm-s-dracula .cm-variable { color: var(--vp-c-text-1) !important; }
.cm-s-dracula .cm-variable-2 { color: white !important; }
.cm-s-dracula .cm-variable-3 { color: white !important; }
.cm-s-dracula .cm-property { color: #66d9ef !important; }
.cm-s-dracula .cm-operator { color: #8ec5f6 !important; }
.cm-s-dracula .cm-comment { color: #6272a4 !important; }
.cm-s-dracula .cm-string { color: #f1fa8c !important; }
.cm-s-dracula .cm-string-2 { color: #f1fa8c !important; }
.cm-s-dracula .cm-meta { color: #f8f8f2 !important; }
.cm-s-dracula .cm-qualifier { color: #8ec5f6 !important; }
.cm-s-dracula .cm-builtin { color: #50fa7b !important; }
.cm-s-dracula .cm-bracket { color: #f8f8f2 !important; }
.cm-s-dracula .cm-tag { color: #ff79c6 !important; }
.cm-s-dracula .cm-attribute { color: #50fa7b !important; }
.cm-s-dracula .cm-hr { color: #8ec5f6 !important; }
.cm-s-dracula .cm-link { color: #8ec5f6 !important; }
.cm-s-dracula .cm-error { background: #ff5e7d !important; color: #f8f8f0 !important; }

.CodeMirror-cursor {
    border-left: 2px solid var(--vp-c-brand-1) !important;
}

.CodeMirror-selected {
    background: var(--vp-c-indigo-soft) !important;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--vp-c-bg-soft);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--vp-c-brand-1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vp-c-indigo-2);
}

.CodeMirror-dialog {
    background: var(--vp-c-bg-soft);
    border: 1px solid var(--vp-c-divider);
    border-radius: var(--border-radius);
    padding: 10px;
    color: var(--vp-c-text-1);
    box-shadow: var(--shadow);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.CodeMirror-dialog input {
    background: var(--vp-c-bg);
    border: 1px solid var(--vp-c-divider);
    color: var(--vp-c-text-1);
    padding: 8px;
    border-radius: 6px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.CodeMirror-dialog button {
    background: var(--vp-c-brand-1);
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.CodeMirror-dialog button:hover {
    background: var(--vp-c-indigo-2);
}

.toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    background: var(--vp-c-bg-soft);
    border: 1px solid var(--vp-c-divider);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.error i {
    color: var(--error);
}

.copy-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 10px;
}

.cm-url {
    color: #8be9fd;
    text-decoration: underline;
    cursor: pointer;
}

.cm-url:hover {
    color: #50fa7b;
}

.cm-tooltip {
    position: absolute;
    background: var(--vp-c-divider);
    padding: 1px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 816px;
}

.cm-tooltip iframe {
    display: block;
    border: 0.5px solid #6272a4;
    border-radius: 8px;
}

.cm-tooltip-fallback {
    color: #ff5555;
    font-size: 1rem;
    padding: 16px;
    text-align: center;
    font-family: 'Fira Code', monospace;
}