:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #334155;
    --text-light: #94a3b8;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --sidebar-width: 300px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    --transition-normal: all 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.02);
    height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    height: 100vh;
    overflow-y: hidden;
    background-image: 
        radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.03) 0%, transparent 70%),
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.sidebar-header h1 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.note-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.note-item:hover {
    background-color: #f8f9fa;
}

.note-item.active {
    background-color: #e8f0fe;
    border-left: 3px solid var(--primary-color);
}

.note-item.sortable-ghost {
    opacity: 0.4;
    background-color: #e8f0fe;
}

.note-item.sortable-drag {
    opacity: 0.8;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.note-item .drag-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: move;
    opacity: 0;
    transition: opacity 0.2s;
    background-color: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-item:hover .drag-handle {
    opacity: 1;
}

.note-item .drag-handle::after {
    content: "⋮⋮";
    font-size: 12px;
    color: var(--text-light);
    line-height: 1;
}

.note-title {
    font-weight: 500;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    padding-left: 12px;
}

.note-actions {
    opacity: 0;
    transition: var(--transition-normal);
}

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

.editor-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    flex: 1;
}

.editor-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.01);
    flex-shrink: 0;
}

.editor-title {
    flex: 1;
    margin-right: 15px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition-normal);
}

.editor-title:focus {
    background-color: rgba(0, 0, 0, 0.03);
    box-shadow: none;
    outline: none;
}

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

.editor-actions .btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: var(--transition-normal);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    transform: translateY(-1px);
}

.editor-content {
    padding: 0;
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.editor-wrapper {
    display: flex;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.line-numbers {
    width: 40px;
    background-color: rgba(0, 0, 0, 0.03);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    text-align: right;
    user-select: none;
    overflow-y: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.line-numbers div {
    padding: 0 8px 0 0;
    position: relative;
    height: 1.7em;
}

.line-numbers div.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

#noteContent, #apiContent {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: transparent;
    border-radius: 0;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    flex: 1;
    min-height: 0;
}

#noteContent:focus, #apiContent:focus {
    outline: none;
    box-shadow: none;
}

.text-stats {
    display: flex;
    align-items: center;
}

#textStats {
    font-size: 0.85rem;
    white-space: nowrap;
}

.editor-toolbar {
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex-shrink: 0;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    color: var(--text-color);
}

.toolbar-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.toolbar-btn.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.toolbar-btn i {
    font-size: 1.1rem;
}

.toolbar-btn:active {
    transform: translateY(1px);
    background-color: rgba(99, 102, 241, 0.2);
}

.copy-notification {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    display: none;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-notification.show {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

.editor-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(0, 0, 0, 0.01);
    color: var(--text-light);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.note-path {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.empty-list-message {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.api-url-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    font-size: 14px;
    word-break: break-all;
}

.copy-url-btn, .copy-btn {
    margin-left: 10px;
    cursor: pointer;
}

.api-path-input {
    font-family: var(--font-mono);
}

/* 简化的API URL输入框样式 */
#apiUrlContainer input[type="text"] {
    font-family: var(--font-mono);
    font-size: 14px;
    background-color: #f8f9fa;
}

#apiUrlContainer .card {
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        max-height: 40vh;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
        height: auto;
        min-height: 60vh;
        overflow-y: visible;
        display: block;
    }
    
    .editor-container {
        height: auto;
        min-height: 60vh;
        display: block;
    }
    
    .editor-content {
        height: auto;
        min-height: 300px;
    }
    
    .editor-wrapper {
        height: auto;
        min-height: 300px;
    }
    
    #noteContent, #apiContent {
        height: 300px;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .editor-title {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .editor-actions {
        justify-content: space-between;
    }
} 