/* CSS 變數 */
:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-sidebar: #2c3e50;
    --bg-input: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-sidebar: #ecf0f1;
    --border-color: #dee2e6;
    --divider-color: #34495e;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --transition: all 0.2s ease;
    --border-radius: 6px;
    --border-radius-sm: 4px;
}

/* 暗色模式 */
body.dark-mode {
    --bg-primary: #2b3544;
    --bg-secondary: #1e2530;
    --bg-tertiary: #343d4c;
    --bg-sidebar: #1e2530;
    --bg-input: #343d4c;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-sidebar: #e8eaed;
    --border-color: #3c4450;
    --divider-color: #3c4450;
}

/* 明亮模式側邊欄 */
body:not(.dark-mode) .sidebar-nav {
    background: #f8f9fa;
    color: var(--text-primary);
    border-right: 1px solid var(--border-color);
}

body:not(.dark-mode) .sidebar-nav .logo {
    border-bottom: 1px solid var(--border-color);
}

body:not(.dark-mode) .sidebar-nav .logo h1 {
    color: var(--text-primary);
}

body:not(.dark-mode) .sidebar-nav .logo i {
    color: var(--primary-color);
}

body:not(.dark-mode) .nav-item {
    color: var(--text-secondary);
}

body:not(.dark-mode) .nav-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

body:not(.dark-mode) .nav-item.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
}

body:not(.dark-mode) .nav-footer {
    border-top: 1px solid var(--border-color);
}

body:not(.dark-mode) .sidebar-toggle {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

body:not(.dark-mode) .sidebar-toggle i {
    color: var(--text-secondary);
}

body:not(.dark-mode) .sidebar-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body:not(.dark-mode) .sidebar-toggle:hover i {
    color: white;
}

/* 基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dashboard 布局 */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左側導航欄 */
.sidebar-nav {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--divider-color);
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
    z-index: 100;
}

.sidebar-nav.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-nav.collapsed .logo h1,
.sidebar-nav.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--divider-color);
    position: relative;
    height: 60px;
}

.sidebar-nav .logo i {
    font-size: 1.75rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.sidebar-nav .logo h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-sidebar);
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.sidebar-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.sidebar-toggle i {
    font-size: 0.75rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.sidebar-toggle:hover i {
    color: white;
}

.sidebar-nav.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

body.dark-mode .sidebar-toggle {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

body.dark-mode .sidebar-toggle i {
    color: var(--text-primary);
}

.nav-menu {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* 暗色模式下的導航項目 */
body.dark-mode .nav-item {
    color: rgba(226, 232, 240, 0.7);
}

body.dark-mode .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-sidebar);
}

body.dark-mode .nav-item.active {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    white-space: nowrap;
    transition: var(--transition);
}

.nav-footer {
    border-top: 1px solid var(--divider-color);
    padding: 1rem 0;
}

/* 主要內容區 */
.main-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

/* 視圖容器 */
.view-container {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.view-container.active {
    display: flex;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    height: 60px;
}

.theme-toggle-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.theme-toggle-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* 分割視圖（左右布局） */
.split-view {
    display: flex;
    flex: 1;
    gap: 0;
    background-color: var(--bg-secondary);
    overflow: hidden;
    padding: 1.5rem;
}

.split-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.split-panel:first-child {
    margin-right: 0.75rem;
}

.split-panel:last-child {
    margin-left: 0.75rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    flex-shrink: 0;
    height: 56px;
}

.panel-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* 上傳區域 */
.upload-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    margin: 1.5rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-secondary);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.upload-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    opacity: 0.8;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.file-types {
    font-size: 0.875rem;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.file-limit {
    font-size: 0.8125rem;
    color: var(--warning-color);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* 檔案列表容器 */
.files-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

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

.file-item.selected {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--primary-color);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.file-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-details h4 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.file-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* 預覽區域 */
.preview-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#splitOptions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#splitOptions input {
    width: 60px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.8125rem;
    transition: var(--transition);
}

#splitOptions input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.preview-empty i {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    opacity: 0.3;
}

.preview-empty p {
    font-size: 1rem;
    font-weight: 500;
}

/* 按鈕樣式 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

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

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

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 模式選擇器 */
.mode-selector {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.mode-selector:hover {
    border-color: var(--primary-color);
}

.mode-selector:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* 詞庫和歷史記錄列表 */
.dictionary-list,
.history-list {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.dictionary-item,
.history-item {
    padding: 1.25rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.dictionary-item:hover,
.history-item:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.dictionary-item-header,
.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
}

.dictionary-item h4,
.history-item h4 {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.dictionary-item p,
.history-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.icon-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

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

/* 設定 */
.settings-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.settings-group h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.setting-label {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-label input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.setting-label input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.shortcuts-list {
    display: grid;
    gap: 0.875rem;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
}

kbd {
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 模態框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

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

.modal-content.large {
    max-width: 860px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}

.modal-header h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
}

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

.modal-body {
    padding: 2rem;
}

.modal-body label {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body input[type="text"],
.modal-body textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
}

.modal-body input[type="text"]:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modal-body textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.875rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* 詞條編輯 */
.dictionary-entries {
    margin-bottom: 1rem;
}

.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.entry-actions {
    display: flex;
    gap: 0.625rem;
}

.entries-list {
    display: grid;
    gap: 1rem;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.5rem;
}

.entry-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.entry-item input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.entry-item input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.entry-item span {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 1.125rem;
}

/* 進度顯示 */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-content {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    min-width: 360px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--bg-secondary);
    border-radius: 5px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    width: 0%;
    border-radius: 5px;
}

.progress-percent {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.75rem;
}

#progressText {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.toast {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 1.125rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    border: 1px solid var(--border-color);
    animation: slideInRight 0.3s ease;
}

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

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

.toast i {
    font-size: 1.375rem;
    flex-shrink: 0;
}

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

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

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

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

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

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

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

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

/* 響應式設計 */
@media (max-width: 1024px) {
    .split-view {
        flex-direction: column;
    }
    
    .split-panel:first-child,
    .split-panel:last-child {
        margin: 0.5rem 0;
    }
    
    .dictionary-list,
    .history-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 220px;
        --sidebar-collapsed-width: 60px;
    }
    
    .view-header {
        padding: 1.25rem 1.5rem;
    }
    
    .view-header h2 {
        font-size: 1.5rem;
    }
    
    .panel-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .split-view {
        padding: 1rem;
    }
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* 選擇文本樣式 */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
}
