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


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.link-text {
    color: #3498db;
}

/* 导航栏样式 */
.tab-navigation {
    background: white;
    border-bottom: 1px solid #e1e4e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 24px;
}

.tab-list {
    display: flex;
    padding: 0 24px;
}

/* 语言选择器样式 */
.language-selector {
    display: flex;
    align-items: center;
}

.language-select {
    padding: 4px 8px;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    color: #586069;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 80px;
}

.language-select:hover {
    border-color: #0366d6;
}

.language-select:focus {
    border-color: #0366d6;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #586069;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tab-button:hover {
    color: #0366d6;
    background-color: #f6f8fa;
}

.tab-button.active {
    color: #0366d6;
    border-bottom-color: #0366d6;
}

/* Tab内容容器 */
.tab-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* 设置栏相关 */

/* 左侧设置面板 */
.settings-panel {
    width: 280px;
    background: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: width 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.settings-panel.collapsed {
    width: 20px;
}

.settings-panel.collapsed .settings-content {
    opacity: 0;
    pointer-events: none;
}

.collapse-btn {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e1e4e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    background: #f6f8fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.collapse-btn svg {
    transition: transform 0.3s ease;
}

.settings-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    transition: opacity 0.3s ease;
}

.settings-content h2 {
    font-size: 20px;
    margin-bottom: 24px;
    color: #1a1a1a;
}


/* 响应式设计 */
@media (max-width: 1024px) {
    .settings-panel {
        width: 30%;
        min-width: 200px;
    }

    .main-content {
        width: 70%;
    }

    .settings-panel.collapsed {
        min-width: 0px;
        width: 20px;
    }
}

@media (max-width: 768px) {
    .settings-panel {
        width: 25%;
        min-width: 180px;
    }

    .main-content {
        width: 75%;
    }

    .settings-panel.collapsed {
        min-width: 0px;
        width: 20px;
    }

    .settings-panel .setting-group {
        padding: 0 10px;
    }

    .settings-header {
        padding: 15px 10px 0 10px;
    }

    .setting-group input,
    .setting-group select,
    .setting-group textarea {
        font-size: 12px;
        padding: 8px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .content-header {
        padding: 10px 15px;
        flex-wrap: wrap;
    }

    .header-right {
        gap: 5px;
    }

    .text-block-pair {
        margin-bottom: 15px;
        min-height: 60px;
    }

    .original-block,
    .translation-block {
        padding: 10px;
        font-size: 14px;
    }

    .translate-button {
        width: 50px;
        font-size: 10px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #2c3e50;
        color: #ecf0f1;
    }

    .settings-panel {
        background: #34495e;
        border-color: #4a5c6a;
    }

    .panel-header {
        background: #2c3e50;
        border-color: #4a5c6a;
    }

    .block-content {
        background: #2c3e50;
        border-color: #4a5c6a;
        color: #ecf0f1;
    }

    .block-content:hover {
        border-color: #3498db;
    }

    .setting-group input,
    .setting-group select,
    .setting-group textarea {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #4a5c6a;
    }
}

/* 主内容面板 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    /* padding: 10px 15px; */
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-right: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #586069;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    color: #586069;
}

.section-header {
    font-size: 16px;
    font-weight: 600;
    color: #586069;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
    user-select: none;
}

.section-header:hover {
    color: #0366d6;
}

.section-toggle-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.section-header.collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

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

.setting-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.setting-group input,
.setting-group select,
.setting-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    /* transition: border-color 0.3s; */
}

.setting-group input:focus,
.setting-group select:focus,
.setting-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.setting-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 错误模态框相关 */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #34495e;
        color: #ecf0f1;
    }
}


input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #586069;
    margin-top: 50px;
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}
