        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #1e40af;
            --primary-dark: #1e3a8a;
            --primary-light: #3b82f6;
            --secondary: #7c3aed;
            --secondary-dark: #6d28d9;
            --accent: #06b6d4;
            --accent-dark: #0891b2;
            --success: #059669;
            --warning: #d97706;
            --error: #ffb6c1;
            --info: #0284c7;
            --bg-primary: #ffffff;
            --bg-secondary: #f8fafc;
            --bg-tertiary: #f1f5f9;
            --bg-quaternary: #e2e8f0;
            --bg-dark: #0f172a;
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-tertiary: #64748b;
            --text-quaternary: #94a3b8;
            --text-inverse: #ffffff;
            --border: #e2e8f0;
            --border-light: #f1f5f9;
            --border-dark: #cbd5e1;
            --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            --gradient-secondary: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
            --gradient-tertiary: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
            --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
            --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
            --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
            --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
            --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.06);
            --blur-sm: blur(4px);
            --blur: blur(8px);
            --blur-md: blur(12px);
            --blur-lg: blur(16px);
            --blur-xl: blur(24px);
            --transition-fast: 0.15s ease;
            --transition: 0.2s ease;
            --transition-slow: 0.3s ease;
            --border-radius-sm: 6px;
            --border-radius: 8px;
            --border-radius-md: 12px;
            --border-radius-lg: 16px;
            --border-radius-xl: 20px;
            --border-radius-2xl: 24px;
            --border-radius-full: 9999px;
        }

        html {
          font-size: 15px; /* 显式设置基准值（推荐） */
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--bg-secondary);
            color: var(--text-primary);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 导航栏 */
        .navbar {
            background: rgba(255, 255, 255, 0.95);
            border-bottom: 1px solid var(--border-light);
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: var(--blur-md);
            transition: all var(--transition);
            box-shadow: var(--shadow-xs);
        }

        .navbar:hover {
            box-shadow: var(--shadow-sm);
        }

        .navbar-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 72px;
            transition: height var(--transition);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1.375rem;
            font-weight: 800;
            color: var(--text-primary);
            text-decoration: none;
            transition: all var(--transition);
        }

        .logo:hover {
            transform: translateY(-1px);
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            background: var(--gradient-primary);
            border-radius: var(--border-radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-inverse);
            font-weight: 800;
            font-size: 1.125rem;
            box-shadow: var(--shadow-sm);
            transition: all var(--transition);
        }

        .logo-icon:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow);
        }

        .nav-menu {
            display: flex;
            align-items: center;
            gap: 1.7rem;
        }

        .nav-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            padding: 0.75rem 1.25rem;
            border-radius: var(--border-radius-full);
            transition: all var(--transition);
            position: relative;
            overflow: hidden;
        }

        .nav-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: var(--gradient-secondary);
            transition: left var(--transition-slow);
            z-index: -1;
            opacity: 0.1;
        }

        .nav-link:hover {
            color: var(--primary);
            background: var(--bg-tertiary);
            transform: translateY(-1px);
        }

        .nav-link:hover::before {
            left: 0;
        }

        .nav-link.active {
            color: var(--primary);
            background: var(--bg-tertiary);
            box-shadow: var(--shadow-xs);
        }

        .user-section {
            display: flex;
            flex-direction: row;
            justify-content: flex-end;
            align-items: center;
            gap: 1.25rem;
        }

        .token-badge {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1.25rem;
            background: var(--gradient-tertiary);
            border: 1px solid var(--border);
            border-radius: var(--border-radius-full);
            font-size: 0.875rem;
            color: var(--text-secondary);
            font-weight: 500;
            box-shadow: var(--shadow-xs);
            transition: all var(--transition);
        }

        .token-badge:hover {
            box-shadow: var(--shadow-sm);
            transform: translateY(-1px);
        }

        .token-badge svg {
            color: var(--primary);
        }

        .token-badge span {
            font-weight: 700;
            color: var(--primary);
            font-size: 0.9rem;
        }

        .sbtn {
            padding: 0.75rem 1.5rem;
            border-top-right-radius: var(--border-radius);
            border-bottom-right-radius: var(--border-radius);
            font-weight: 600;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all var(--transition);
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            white-space: nowrap;
            user-select: none;
        }


        /* 按钮样式 */
        .btn {
            padding: 0.75rem 1.5rem;
            border-radius: var(--border-radius);
            font-weight: 600;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all var(--transition);
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            white-space: nowrap;
            user-select: none;
        }

        .sbtn::before,
        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .sbtn:hover::before,
        .btn:hover::before {
            left: 100%;
        }

        .btn-primary {
            background: var(--gradient-primary);
            color: var(--text-inverse);
            box-shadow: var(--shadow-sm);
        }

        .btn-primary:hover {
            background: var(--gradient-primary);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .btn-primary:active {
            transform: translateY(0);
            box-shadow: var(--shadow-sm);
        }

        .btn-secondary {
            background: var(--bg-primary);
            color: var(--text-primary);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-xs);
        }

        .btn-secondary:hover {
            background: var(--bg-tertiary);
            border-color: var(--border-dark);
            transform: translateY(-1px);
            box-shadow: var(--shadow-sm);
        }

        .btn-outline {
            background: transparent;
            color: var(--primary);
            border: 2px solid var(--primary);
            position: relative;
            z-index: 1;
        }

        .btn-outline::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 100%;
            background: var(--gradient-primary);
            transition: width var(--transition-slow);
            z-index: -1;
        }

        .btn-outline:hover {
            color: var(--text-inverse);
            border-color: var(--primary);
            transform: translateY(-1px);
        }

        .btn-outline:hover::after {
            width: 100%;
        }

        .btn-success {
            background: var(--success);
            color: var(--text-inverse);
            box-shadow: var(--shadow-sm);
        }

        .btn-success:hover {
            background: var(--success);
            transform: translateY(-1px);
            box-shadow: var(--shadow);
            filter: brightness(1.1);
        }

        .btn-warning {
            background: var(--warning);
            color: var(--text-inverse);
            box-shadow: var(--shadow-sm);
        }

        .btn-warning:hover {
            background: var(--warning);
            transform: translateY(-1px);
            box-shadow: var(--shadow);
            filter: brightness(1.1);
        }

        .btn-error {
            background: var(--error);
            color: var(--text-inverse);
            box-shadow: var(--shadow-sm);
        }

        .btn-error:hover {
            background: var(--error);
            transform: translateY(-1px);
            box-shadow: var(--shadow);
            filter: brightness(1.1);
        }

        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.8rem;
        }

        .btn-lg {
            padding: 1rem 2rem;
            font-size: 1rem;
            border-radius: var(--border-radius-md);
        }

        .btn-xl {
            padding: 1.25rem 2.5rem;
            font-size: 1.125rem;
            border-radius: var(--border-radius-md);
        }

        .btn-2xl {
            padding: 1.5rem 3rem;
            font-size: 1.25rem;
            border-radius: var(--border-radius-lg);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }

        .btn:disabled:hover {
            transform: none !important;
            box-shadow: var(--shadow-xs) !important;
        }

        /* 页面切换 */
        .page {
            min-height: calc(100vh - 64px);
        }

        /* Hero Section */
        .hero {
            padding: 4rem 0;
            background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
        }

        .hero-content {
            text-align: center;
            max-width: 800px;
            margin: 0 auto;
        }

        .hero h1 {
            font-size: 3rem;
            font-weight: 800;
            line-height: 1.2;
            margin-bottom: 1.5rem;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero-subtitle {
            font-size: 1.25rem;
            color: var(--text-secondary);
            margin-bottom: 2rem;
            line-height: 1.8;
        }

        .hero-stats {
            display: flex;
            justify-content: center;
            gap: 3rem;
            margin-top: 3rem;
        }

        .stat-item {
            text-align: center;
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
        }

        .stat-label {
            font-size: 0.875rem;
            color: var(--text-tertiary);
        }

        /* Feature Cards */
        .features {
            padding: 4rem 0;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 3rem;
        }

        .feature-card {
            background: var(--bg-primary);
            border-radius: 12px;
            padding: 2rem;
            box-shadow: var(--shadow);
            transition: all 0.3s;
            border: 1px solid var(--border);
        }

        .feature-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary);
        }

        .feature-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            color: white;
        }

        .feature-card h3 {
            font-size: 1.25rem;
            margin-bottom: 0.75rem;
            color: var(--text-primary);
        }

        .feature-card p {
            color: var(--text-secondary);
            line-height: 1.6;
        }

        /* 工作流程 */
        .workflow-section {
            padding: 4rem 0;
            background: var(--bg-primary);
        }

        .workflow-container {
            max-width: 1000px;
            margin: 0 auto;
        }

        .workflow-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .workflow-header h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .workflow-steps {
            display: flex;
            justify-content: space-between;
            margin-bottom: 3rem;
            position: relative;
        }

        .workflow-steps::before {
            content: '';
            position: absolute;
            top: 30px;
            left: 60px;
            right: 60px;
            height: 2px;
            background: var(--border);
        }

        .workflow-step {
            flex: 1;
            text-align: center;
            position: relative;
        }

        .step-circle {
            width: 60px;
            height: 60px;
            background: var(--bg-primary);
            border: 2px solid var(--border);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            font-weight: 700;
            font-size: 1.25rem;
            color: var(--text-tertiary);
            position: relative;
            z-index: 1;
            transition: all 0.3s;
        }

        .workflow-step.active .step-circle {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
            transform: scale(1.1);
        }

        .workflow-step.completed .step-circle {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        .workflow-step.error .step-circle {
            background: var(--error);
            border-color: var(--error);
            color: white;
        }

        .col-error {
            color: var(--error);
        }
        .col-success {
            color: var(--success);
        }
        .col-in-progress {
            color: var(--primary);
        }

        .step-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }

        .step-desc {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        /* 工作区 */
        .workspace {
            background: var(--bg-primary);
            border-radius: 16px;
            box-shadow: var(--shadow-lg);
            overflow: hidden;
        }

        .workspace-header {
            padding: 1.5rem 2rem;
            background: var(--bg-tertiary);
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .workspace-body {
            padding: 2rem;
        }

        /* 上传区域 */
        .upload-zone {
            border: 2px dashed var(--border);
            border-radius: 12px;
            padding: 3rem;
            text-align: center;
            transition: all 0.3s;
            cursor: pointer;
            background: var(--bg-secondary);
        }

        .upload-zone:hover {
            border-color: var(--primary);
            background: var(--bg-tertiary);
        }

        .highlight-upload-zone {
            border-color: var(--primary);
            background: var(--bg-tertiary);
        }

        .upload-zone.active {
            border-color: var(--primary);
            background: rgba(37, 99, 235, 0.05);
        }

        .upload-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 1rem;
            color: var(--text-tertiary);
        }

        /* 术语表 */
        .glossary-container {
            margin-top: 2rem;
        }

        .glossary-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .glossary-table {
            width: 100%;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
        }

        .glossary-table th {
            background: var(--bg-tertiary);
            padding: 1rem;
            text-align: left;
            font-weight: 600;
            color: var(--text-secondary);
            font-size: 0.875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .glossary-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
        }

        .glossary-table tr:last-child td {
            border-bottom: none;
        }

        .glossary-table tr:hover {
            background: var(--bg-secondary);
        }

        .term-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: var(--border-radius);
            font-size: 0.875rem;
            transition: all var(--transition);
            background: var(--bg-primary);
            color: var(--text-primary);
        }

        .search-input:focus,
        .term-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
            transform: translateY(-1px);
        }

        .search-input:hover,
        .term-input:hover {
            border-color: var(--border-dark);
        }

        .term-badge {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            background: var(--bg-tertiary);
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 500;

            overflow-wrap: break-word;
            word-break: break-word;
            white-space: normal; /* 确保覆盖可能的 nowrap 设置 */
        }

        /* 翻译对比视图 */
        .translation-viewer {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin-top: 2rem;
        }

        .translation-panel {
            background: var(--bg-secondary);
            border-radius: 12px;
            padding: 1.5rem;
            height: auto;/*33rem;*/ /*600px;*/
        }

        .translation-panel h3 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-secondary);
        }

        .text-content{
            color: var(--text-primary);
            line-height: 1.8;
            resize: none; 
            caret-color: black;
            overflow-y: auto;
            width: 100%;
            height: 33rem;
            padding: 0.9rem;
            box-sizing: border-box;
            border: none;
            border: 0;
            background-color: transparent;
            font-size: 1rem;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            white-space: pre-line;
            word-break: break-all;
        }

        .text-content:focus {
            border: none;
            border: 0;
            outline: none; /* 可选：同时移除轮廓线 */
        }
        
        .highlighted-term {
            background: rgba(37, 99, 235, 0.1);
            color: var(--primary);
            padding: 0.125rem 0.375rem;
            border-radius: 4px;
            font-weight: 500;
        }

        /* 多通道翻译展示 */
        .multipass-container {
            margin-top: 2rem;
        }

        .pass-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            border-bottom: 2px solid var(--border);
        }

        .pass-tab {
            padding: 0.75rem 1.5rem;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            cursor: pointer;
            font-weight: 500;
            color: var(--text-tertiary);
            transition: all 0.2s;
            position: relative;
        }

        .pass-tab:hover {
            color: var(--text-secondary);
        }

        .pass-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .pass-quality {
            position: absolute;
            top: 0;
            right: 0;
            background: var(--success);
            color: white;
            font-size: 0.625rem;
            padding: 0.125rem 0.375rem;
            border-radius: 4px;
        }

        .progress-container {
            display: none;
            margin: 2rem;
        }

        .progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .progress-bar {
            height: 8px;
            background: var(--bg-tertiary);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
            border-radius: 4px;
            transition: width 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 255, 255, 0.3),
                transparent
            );
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }
            100% {
                transform: translateX(100%);
            }
        }

        /* 价格计算器 */
        .pricing-calculator {
            background: var(--bg-primary);
            border-radius: 16px;
            padding: 2rem;
            box-shadow: var(--shadow-md);
            margin-top: 2rem;
        }

        .calculator-inputs {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .input-group {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .input-group label {
            font-weight: 500;
            color: var(--text-secondary);
            font-size: 0.875rem;
        }

        .input-slider {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: var(--bg-tertiary);
            outline: none;
            -webkit-appearance: none;
            appearance: none;
        }

        .input-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            box-shadow: var(--shadow);
        }

        .input-value {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--primary);
        }

        .price-display {
            text-align: center;
            padding: 2rem;
            background: var(--bg-secondary);
            border-radius: 12px;
        }

        .price-amount {
            font-size: 3rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 0.5rem;
        }

        .price-desc {
            color: var(--text-secondary);
        }

        /* 统计卡片 */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            padding: 2rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
            position: relative;
            overflow: hidden;
            transition: all var(--transition);
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient-primary);
            opacity: 0;
            transition: opacity var(--transition);
        }

        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
            border-color: var(--border-dark);
        }

        .stat-card:hover::before {
            opacity: 1;
        }

        .stat-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
        }

        .stat-card-title {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .stat-card-icon {
            width: 40px;
            height: 40px;
            color: var(--primary);
            background: var(--gradient-subtle);
            border-radius: var(--border-radius);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem;
        }

        .stat-card-value {
            font-size: 2.5rem;
            font-weight: 800;
            color: transparent;
            margin-bottom: 0.75rem;
            background: var(--gradient-secondary);

            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;

        }

        .stat-card-change {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.875rem;
            font-weight: 600;
            padding: 0.25rem 0.75rem;
            border-radius: var(--border-radius);
            width: fit-content;
        }

        .stat-card-change.positive {
            color: var(--success);
            background: rgba(34, 197, 94, 0.1);
        }

        .stat-card-change.negative {
            color: var(--error);
            background: rgba(239, 68, 68, 0.1);
        }

        .stat-card-change.neutral {
            color: var(--text-secondary);
            background: var(--bg-tertiary);
        }

        /* 书籍网格 */
        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
            /*min-height: 33rem;*/
        }

        .book-card {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow);
            opacity: 0;
            transition: all var(--transition-slow);
            cursor: pointer;
            border: 1px solid var(--border);
            position: relative;
        }

        .book-card.show {
            opacity: 1;
        }

        .book-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--gradient-subtle);
            opacity: 0;
            transition: opacity var(--transition);
            z-index: 1;
        }

        .book-card:hover {
            transform: translateY(-6px) scale(1.02);
            box-shadow: var(--shadow-xl);
            border-color: var(--primary);
        }

        .book-card:hover::before {
            opacity: 0.05;
        }

        .book-cover {
            height: 160px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 3rem;
            font-weight: 700;
        }

        .book-info {
            padding: 1.5rem;
        }

        .book-title {
            font-size: 1.125rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }

        .book-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .book-progress {
            margin-top: 1rem;
        }

        .add-book-card {
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px dashed var(--border);
            background: var(--bg-secondary);
            min-height: 320px;
        }

        .add-book-card:hover {
            border-color: var(--primary);
            background: var(--bg-tertiary);
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
        }
/*
        .modal.active {
            display: flex;
        }
*/
        .modal-content {
            background: var(--bg-primary);
            border-radius: 16px;
            padding: 2rem;
            max-width: 500px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-lg);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--text-tertiary);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s;
        }

        .modal-close:hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        /* Forms */
        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: var(--text-secondary);
            font-size: 0.875rem;
        }

        .search-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-bottom-left-radius: var(--border-radius);
            border-top-left-radius:var(--border-radius);
            font-size: 0.875rem;
            transition: all var(--transition);
            background: var(--bg-primary);
            color: var(--text-primary);
        }
        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.2s;
            background: var(--bg-primary);
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .form-textarea {
            resize: vertical;
            min-height: 120px;
        }

        /* Toast Notifications */
        .toast-container {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 2000;
        }

        .toast {
            background: var(--bg-primary);
            border-radius: 12px;
            padding: 1rem 1.5rem;
            margin-bottom: 1rem;
            box-shadow: var(--shadow-lg);
            display: flex;
            align-items: center;
            gap: 0.75rem;
            transform: translateX(400px);
            transition: transform 0.3s ease;
            border-left: 4px solid var(--primary);
        }

        .toast.show {
            transform: translateX(0);
        }

        .toast.success {
            border-left-color: var(--success);
        }

        .toast.error {
            border-left-color: var(--error);
        }

        .toast-icon {
            width: 20px;
            height: 20px;
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .fade-in {
            animation: fadeIn 0.5s ease;
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.05);
            }
            100% {
                transform: scale(1);
            }
        }

        .pulse {
            animation: pulse 2s infinite;
        }

        /* AI引擎选择器 */
        .ai-engine-selector {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            padding: 1.5rem;
            margin-bottom: 2rem;
            border: 1px solid var(--border);
        }

        .engine-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
        }

        .engine-option {
            padding: 1rem;
            border: 2px solid var(--border);
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: all var(--transition);
            text-align: center;
            background: var(--bg-secondary);
        }

        .engine-option:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: var(--shadow-sm);
        }

        .engine-option.selected {
            border-color: var(--primary);
            background: var(--gradient-subtle);
        }

        .engine-name {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }

        .engine-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        /* 质量控制面板 */
        .quality-control {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            padding: 2rem;
            margin-bottom: 2rem;
            border: 1px solid var(--border);
        }

        .quality-metrics {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1.5rem;
            margin-top: 1.5rem;
        }

        .quality-metric {
            text-align: center;
            padding: 1rem;
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
        }

        .metric-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 0.5rem;
        }

        .metric-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        /* 协作功能 */
        .collaboration-panel {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            padding: 2rem;
            margin-bottom: 2rem;
            border: 1px solid var(--border);
        }

        .collaborator-list {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

        .collaborator {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
            border: 1px solid var(--border);
        }

        .collaborator-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--gradient-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-inverse);
            font-weight: 600;
            font-size: 0.8rem;
        }

        .collaborator-status {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--success);
        }

        .collaborator-status.offline {
            background: var(--text-tertiary);
        }

        /* 版本控制 */
        .version-control {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            padding: 2rem;
            margin-bottom: 2rem;
            border: 1px solid var(--border);
        }

        .version-timeline {
            margin-top: 1.5rem;
        }

        .version-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            border-left: 3px solid var(--border);
            margin-bottom: 1rem;
            background: var(--bg-secondary);
            border-radius: 0 var(--border-radius) var(--border-radius) 0;
            transition: all var(--transition);
        }

        .version-item:hover {
            border-left-color: var(--primary);
            transform: translateX(4px);
        }

        .version-item.current {
            border-left-color: var(--primary);
            background: var(--gradient-subtle);
        }

        .version-info {
            flex: 1;
        }

        .version-title {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }

        .version-meta {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        /* 高级设置面板 */
        .advanced-settings {
            background: var(--bg-primary);
            border-radius: var(--border-radius-lg);
            padding: 2rem;
            margin-bottom: 2rem;
            border: 1px solid var(--border);
        }

        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 1.5rem;
        }

        .setting-group {
            background: var(--bg-secondary);
            padding: 1.5rem;
            border-radius: var(--border-radius);
            border: 1px solid var(--border);
        }

        .setting-title {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .setting-option {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border);
        }

        .setting-option:last-child {
            border-bottom: none;
        }

        .toggle-switch {
            position: relative;
            width: 48px;
            height: 24px;
            background: var(--bg-tertiary);
            border-radius: 12px;
            cursor: pointer;
            transition: all var(--transition);
        }

        .toggle-switch.active {
            background: var(--primary);
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: all var(--transition);
            box-shadow: var(--shadow-xs);
        }

        .toggle-switch.active::after {
            transform: translateX(24px);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .nav-menu {
                display: none;
/*
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
*/
            }

            .hero h1 {
                font-size: 2rem;
            }

            .hero-stats {
                flex-direction: column;
                gap: 1.5rem;
            }

            .translation-viewer {
                grid-template-columns: 1fr;
            }

            .translation-panel {
                width: 100%;
            }

            .workflow-steps {
                flex-direction: column;
                gap: 2rem;
            }

            .workflow-steps::before {
                display: none;
            }

            .engine-grid {
                grid-template-columns: 1fr;
            }

            .quality-metrics {
                grid-template-columns: repeat(2, 1fr);
            }

            .settings-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Loading spinner */
        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--border);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 2rem auto;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* Comparison table */
        .comparison-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 2rem;
        }

        .comparison-table th,
        .comparison-table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid var(--border);
        }

        .comparison-table th {
            background: var(--bg-tertiary);
            font-weight: 600;
            color: var(--text-secondary);
        }

        .comparison-table tr:hover {
            background: var(--bg-secondary);
        }

        .comparison-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.75rem;
            background: var(--success);
            color: white;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
        }

.workspace-header-view {
    padding: 1.5rem 2rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
    gap: 1.7rem;
    align-items: center;
}

.blocklist {
    padding: 4rem 0;
}

.blocklist-grid {
    display: grid;
    grid-template-columns: 1fr;
    /*repeat(auto-fit, minmax(300px, 1fr));*/
    gap: 2rem;

    padding: 2rem;
}

.block-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
    cursor: pointer;
}

.block-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.block-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    pointer-events: none;
}

.block-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    pointer-events: none;
}

.block-item-foot {
    display: flex;
    justify-content: flex-end;
    color: var(--text-tertiary);
    gap: 0.7rem;
    pointer-events: none;
}


.pagination-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72px;
    transition: height var(--transition);
    margin: 5rem 0;
}

.pagination-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}

.pagination-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-full);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.pagination-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: left var(--transition-slow);
    z-index: -1;
    opacity: 0.1;
}

.pagination-link:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.pagination-link:hover::before {
    left: 0;
}

.pagination-link.active {
    color: var(--primary);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-xs);
}



.tbtoolbar {
    display: block;
    font-size: 1.4rem;
}

.inline {
    display: inline;
}

.retback {
    display: inline-block;
    margin: 0rem 1rem;
}

.tbcontainer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    min-height: 599px;
    gap: 3px;
}

.tbleft {
    flex: 1;
    align-self: flex-start;
    height: auto;
}

.tbright {
    flex: 1;
    align-self: flex-start;
    height: auto;
}
.tbtextcontainer {

    padding: 1rem;

    white-space: nowrap;
    word-break: normal;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    border-color: black;
}
.tbtranslationcontainer {
    padding: 1rem;

    white-space: nowrap;
    word-break: normal;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    border-color: black;
}

.tbterminologycontainer {
    padding: 1rem;

    white-space: nowrap;
    word-break: normal;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    border-color: black;
}

.aiengine {

}

.bottompadding {
    padding: 1rem 0;
}

.tbtext {
    min-height: 33rem;
}
.tbtranslation {
    min-height: 33rem;
}

.tbreview {
    flex: 1;

    width: auto;
    border-style: solid;
    border-color: black;
    border-width: 1px;
    white-space: nowrap;
    word-break:normal;
}


 table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    margin: 0;
    font-family: Arial, sans-serif;
  }
  
  th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }
  
  th {
    background-color: #f2f2f2;
    font-weight: bold;
  }

  table input {
     width: auto;
     font-size: 1rem;
     padding: 0.1rem 0.3rem;
  }  

  tr:nth-child(even) {
    background-color: #f9f9f9;
  }
  
  tr:hover {
    background-color: #f1f1f1;
  }
  
  caption {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: bold;
  }



.temipagi-content {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: height var(--transition);
    margin: 1.5rem;
    gap: 2rem;
}

.temipagi-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-full);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.temipagilink::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: left var(--transition-slow);
    z-index: -1;
    opacity: 0.1;
}

.temipagi-link:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.temipagi-link:hover::before {
    left: 0;
}

.temipagi-link.active {
    color: var(--primary);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-xs);
}


.tbdialogcontainer {
    padding: 1rem;

    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    border-color: black;
}

.tbdialog {
    height: 21rem;
    transition: all 0.5s;
    visibility: visible;

    overflow-x:hidden;
    overflow-y:scroll;
}

.tbcheckcontainer {
    transition: all 0.5s;
    visibility: visible;
}

.checkitem {
    margin: 0.3rem 1rem;
    border: dashed 1px gray;
    border-radius: 5px;
}

.tbdiscussion {

    transition: all 0.5s;
    visibility: visible;
}

.discussionemoji {
    display: inline-block;
    border: solid 1px black;
    border-radius: 50%;
}


#discussionemoji:hover {
    background-color: var(--secondary);
    color: var(--text-inverse);
    cursor: pointer;
}
#discussionsend:hover {
    background-color: var(--secondary);
    color: var(--text-inverse);
    cursor: pointer;
}

#emojicontainer {
    border: none;
    padding: 0.3rem;
    resize: none;
    overflow: hidden;
    min-height:5.9rem;
    overflow-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.disable {
    pointer-events: none;
    user-select: none;      /* 防止文本被选中 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}
/* 确保内部的表单元素也被禁用 */
.disabled input,
.disabled select,
.disabled textarea,
.disabled button {
    pointer-events: none;
}

.fade {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.3s ease;
}
.fade.show {
    opacity: 1;
    visibility: visible;
}

.nodisplay {
    display: none;
}
.nodisplay.visible {
    display: block;
}

.hidden {
    visibility: hidden;
}

.collapse {
    height: 0;
    overflow: hidden;
}



.context-menu {
    position: absolute;
    width: 180px;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    padding: 6px 0;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #f0f7ff;
}

.menu-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.red {
    color: red;
}

.menu-text {
    flex-grow: 1;
}

.separator {
    height: 1px;
    background-color: #eee;
    margin: 6px 0;
}

/* 禁用文本选择 */
.context-menu, .menu-item {
    user-select: none;
    -webkit-user-select: none;
}

.notes {
    vertical-align: super;
    font-size: 0.9rem;
    line-height: 1;
    margin-left: 2px;
    color: #0066cc;
    padding: 0 2px;
    cursor: default;
}
.dotes {
    vertical-align: super;
    font-size: 0.9rem;
    line-height: 1;
    margin-left: 2px;
    color: #0066cc;
    text-decoration: line-through;
    padding: 0 2px;
    cursor: default;
}

.notes:hover {
  background-color: #e6f2ff;
  border-radius: 2px;
}

.no-spellcheck::-webkit-spellcheck-highlight {
    display: none !important;
}

.no-spellcheck {
    -webkit-text-decoration-skip: objects;
    text-decoration-skip-ink: auto;
}
