:root {
    --primary-color: #007AFF;
    --primary-hover: #0056CC;
    --background: #FFFFFF;
    --surface: #F2F2F7;
    --surface-elevated: #FFFFFF;
    --border: #C7C7CC;
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
    --background: #000000;
    --surface: #1C1C1E;
    --surface-elevated: #2C2C2E;
    --border: #38383A;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --text-tertiary: #48484A;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loading-content {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

.loading-content h2 {
    margin-bottom: 8px;
    font-weight: 600;
}

.loading-content p {
    color: var(--text-secondary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Screens */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    padding-top: var(--safe-area-top);
}

.screen.active {
    display: flex;
    animation: slideIn 0.3s ease;
}

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

/* Headers */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background-color: var(--surface-elevated);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-content .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background-color: var(--surface-elevated);
    border-bottom: 1px solid var(--border);
    min-height: 64px;
}

.editor-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.project-info h2 {
    font-size: 18px;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: var(--success);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 12px;
}

.editor-header-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.editor-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.mobile-menu {
    display: none;
}

@media (max-width: 768px) {
    .editor-header-right .icon-btn:not(#mobile-menu-btn) {
        display: none;
    }
    .mobile-menu {
        display: block;
    }
    .editor-header-center {
        justify-content: flex-end;
    }
}

/* Welcome Screen */
.welcome-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 80px;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #5856D6);
    border-radius: var(--radius);
    padding: 48px 32px;
    margin-bottom: 32px;
    color: white;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.projects-section {
    animation: fadeInUp 0.6s ease 0.1s both;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background-color: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.project-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

.project-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.project-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-actions {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    background-color: var(--surface-elevated);
    color: var(--text-secondary);
    font-size: 13px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: calc(20px + var(--safe-area-bottom));
}

/* Editor Layout */
.editor-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.file-explorer {
    width: 280px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .file-explorer {
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 60px;
        width: 100%;
        z-index: 100;
        transform: translateX(-100%);
    }
    .file-explorer.active {
        transform: translateX(0);
    }
}

.explorer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.explorer-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.explorer-actions {
    display: flex;
    gap: 8px;
}

.file-tree {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    user-select: none;
}

.file-item:hover {
    background-color: var(--border);
}

.file-item.active {
    background-color: var(--primary-color);
    color: white;
}

.file-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 14px;
}

.file-name {
    flex: 1;
    font-size: 14px;
}

.file-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

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

@media (max-width: 768px) {
    .editor-container {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 60px;
        z-index: 90;
        transform: translateX(100%);
    }
    .editor-container.active {
        transform: translateX(0);
    }
}

.editor-tabs {
    display: flex;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tab {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-right: 1px solid var(--border);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    background-color: var(--surface);
}

.tab:hover {
    background-color: var(--border);
}

.tab.active {
    background-color: var(--surface-elevated);
    position: relative;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-close {
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.tab-close:hover {
    opacity: 1;
}

.monaco-editor {
    flex: 1;
    min-height: 200px;
}

.console-output {
    height: 200px;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.console-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.console-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

.console-log {
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.console-error {
    color: var(--danger);
}

.console-warn {
    color: var(--warning);
}

.live-preview {
    width: 400px;
    background-color: var(--surface-elevated);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .live-preview {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .live-preview {
        position: fixed;
        top: 64px;
        right: 0;
        bottom: 60px;
        width: 100%;
        z-index: 100;
        transform: translateX(100%);
    }
    .live-preview.active {
        transform: translateX(0);
    }
}

.preview-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.preview-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.preview-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: white;
}

.preview-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    z-index: 10;
}

.preview-error i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--danger);
}

.preview-error h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

.hidden {
    display: none !important;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface-elevated);
    border-top: 1px solid var(--border);
    display: none;
    padding: 8px 20px;
    padding-bottom: calc(8px + var(--safe-area-bottom));
    z-index: 1000;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
    }
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    transition: var(--transition);
    flex: 1;
    cursor: pointer;
}

.nav-btn.active {
    color: var(--primary-color);
}

.nav-btn span {
    font-size: 11px;
    font-weight: 500;
}

/* Settings Screen */
.settings-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface-elevated);
}

.settings-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    margin-left: 16px;
}

.settings-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 80px;
}

.settings-section {
    background-color: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.settings-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

.setting-item label {
    font-size: 16px;
    color: var(--text-primary);
}

.setting-item select,
.setting-item input[type="range"] {
    background-color: var(--background);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.color-picker {
    display: flex;
    gap: 8px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.color-option.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 480px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--border);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--border);
}

.icon-btn.small {
    width: 36px;
    height: 36px;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background-color: var(--surface-elevated);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 3000;
    min-width: 180px;
}

.context-menu ul {
    list-style: none;
}

.context-menu li {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: var(--transition);
}

.context-menu li:hover {
    background-color: var(--border);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: var(--surface-elevated);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    min-width: 280px;
}

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

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

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

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

.toast-content {
    flex: 1;
}

.toast-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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

/* Responsive Adjustments */
@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 24px;
    }
    
    .app-header {
        padding: 16px;
    }
    
    .header-content h1 {
        font-size: 20px;
    }
    
    .welcome-main {
        padding: 16px;
    }
    
    .editor-header {
        padding: 12px 16px;
    }
    
    .settings-main {
        padding: 16px;
    }
}



/* Performance optimizations */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.loading-overlay .loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Context menu improvements */
.context-menu {
    position: fixed;
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 3000;
    min-width: 180px;
    max-width: 250px;
}

.context-menu ul {
    list-style: none;
    padding: 8px 0;
}

.context-menu li {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.context-menu li:hover {
    background: var(--border);
}

.context-menu li.danger {
    color: var(--danger);
}

.context-menu li.divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
    padding: 0;
    cursor: default;
}

.context-menu li.divider:hover {
    background: var(--border);
}

/* File tree improvements */
.folder-item {
    margin-bottom: 4px;
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.folder-header:hover {
    background: var(--border);
}

.folder-icon {
    width: 20px;
    margin-right: 12px;
    color: #FF9500;
}

.folder-name {
    flex: 1;
    font-size: 14px;
}

.folder-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.folder-header:hover .folder-actions {
    opacity: 1;
}

.folder-children {
    margin-left: 20px;
    border-left: 1px solid var(--border);
    padding-left: 8px;
    display: none;
}

.folder-item.expanded .folder-children {
    display: block;
}

.folder-item.expanded .folder-actions i {
    transform: rotate(90deg);
}

/* Tab improvements */
.tab {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-right: 1px solid var(--border);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    background: var(--surface);
    min-width: 120px;
    max-width: 200px;
}

.tab-icon {
    margin-right: 8px;
    font-size: 12px;
    opacity: 0.7;
}

.tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab.active {
    background: var(--surface-elevated);
}

.tab.active .tab-icon {
    opacity: 1;
}

/* Console improvements */
.console-log {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.console-log:last-child {
    border-bottom: none;
}

.console-log.console-error {
    color: var(--danger);
    background: rgba(255, 59, 48, 0.1);
}

.console-log.console-warn {
    color: var(--warning);
    background: rgba(255, 149, 0, 0.1);
}

.console-log.console-info {
    color: var(--primary-color);
    background: rgba(0, 122, 255, 0.1);
}

.console-timestamp {
    color: var(--text-tertiary);
    font-size: 11px;
    margin-right: 8px;
}

.console-type {
    font-weight: 600;
    margin-right: 8px;
    font-size: 11px;
}

.console-message {
    flex: 1;
    word-break: break-all;
}

/* Drag and drop */
.drag-over {
    background: var(--primary-color) !important;
    opacity: 0.3;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .tab {
        min-width: 100px;
        max-width: 150px;
        padding: 8px 12px;
    }
    
    .tab-title {
        font-size: 12px;
    }
    
    .context-menu {
        min-width: 160px;
        max-width: 200px;
    }
    
    .context-menu li {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Animation optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Monaco Editor Overrides */
.monaco-editor .margin {
    background-color: var(--surface) !important;
}

.monaco-editor {
    --vscode-editor-background: var(--surface-elevated) !important;
    --vscode-editor-foreground: var(--text-primary) !important;
}