/* ========================================
   在线文本比对工具 - 010duibi.css
   Apple风格 + 网站紫色主题融合版
   ======================================== */

/* 全局重置 */
body, html {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ========================================
   工具页面通用顶部底部样式
   所有工具页面共用
   ======================================== */

/* 顶部导航 */
.tool-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tool-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tool-logo {
    display: flex;
    align-items: center;
}

.tool-logo-img {
    height: 32px;
    width: auto;
}

.tool-page-title-link {
    flex: 1;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.tool-page-title-link:hover {
    opacity: 0.8;
}

.tool-page-title {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tool-page-title::before {
    content: '✦';
    font-size: 14px;
    color: #6d55fe;
    opacity: 0.6;
}

.tool-page-title::after {
    content: '✦';
    font-size: 14px;
    color: #6d55fe;
    opacity: 0.6;
}

.tool-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(109, 85, 254, 0.08);
    color: #6d55fe;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-back-btn:hover {
    background: rgba(109, 85, 254, 0.15);
    transform: scale(0.98);
}

/* 底部 */
.tool-footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    padding: 0;
    margin-top: auto;
}

.tool-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
    text-align: center;
}

.tool-copyright {
    font-size: 13px;
    color: #8E8E93;
    margin: 0;
}

.tool-copyright a {
    color: #6d55fe;
    text-decoration: none;
    margin: 0 8px;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-copyright a:hover {
    opacity: 0.7;
}

/* 响应式 - 顶部底部 */
@media (max-width: 768px) {
    .tool-header-inner {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .tool-logo-img {
        height: 28px;
    }
    
    .tool-page-title {
        font-size: 16px;
        gap: 6px;
    }
    
    .tool-page-title::before,
    .tool-page-title::after {
        font-size: 12px;
    }
    
    .tool-back-btn {
        padding: 6px 12px;
    }
    
    .tool-back-btn span {
        display: none;
    }
    
    .tool-footer-inner {
        padding: 20px 16px;
    }
}

/* ========================================
   文本比对工具专用样式
   ======================================== */

:root {
    --brand-purple: #6d55fe;
    --brand-purple-light: #8572ff;
    --brand-purple-dark: #5a45d8;
    --apple-gray: #8E8E93;
    --apple-light-gray: #F2F2F7;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-shadow: rgba(109, 85, 254, 0.08);
    /* 更柔和的差异颜色 */
    --diff-added: #e8f5e9;
    --diff-added-dark: #4caf50;
    --diff-added-border: #81c784;
    --diff-deleted: #ffebee;
    --diff-deleted-dark: #f44336;
    --diff-deleted-border: #e57373;
    --diff-modified: #fff3e0;
    --diff-modified-dark: #ff9800;
}

/* 主内容区 */
.duibi-main {
    min-height: calc(100vh - 120px);
}

.duibi-section {
    padding: 24px 0 40px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
}

.duibi-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* 工具栏 */
.duibi-toolbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 0.5px solid var(--apple-border);
    box-shadow: 0 4px 16px var(--apple-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

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

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.toolbar-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 100px;
}

.toolbar-select:hover {
    border-color: var(--brand-purple);
}

.toolbar-select:focus {
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(109, 85, 254, 0.1);
}

.toolbar-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.toolbar-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand-purple);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.toolbar-btn:hover {
    border-color: var(--brand-purple);
    color: var(--brand-purple);
    background: rgba(109, 85, 254, 0.05);
}

.toolbar-btn.primary {
    background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-purple-light) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 85, 254, 0.3);
}

.toolbar-btn.primary:hover {
    background: linear-gradient(135deg, var(--brand-purple-light) 0%, #9d8dff 100%);
    box-shadow: 0 6px 16px rgba(109, 85, 254, 0.4);
    transform: translateY(-2px);
}

.toolbar-btn svg {
    flex-shrink: 0;
}

/* 输入区域 */
.duibi-input-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.input-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 16px;
    padding: 20px;
    border: 0.5px solid var(--apple-border);
    box-shadow: 0 4px 16px var(--apple-shadow);
    display: flex;
    flex-direction: column;
}

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

.input-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.022em;
}

.input-actions {
    display: flex;
    gap: 6px;
}

.input-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(109, 85, 254, 0.08);
    border: 1px solid rgba(109, 85, 254, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--brand-purple);
}

.input-action-btn:hover {
    background: rgba(109, 85, 254, 0.15);
    border-color: rgba(109, 85, 254, 0.3);
    transform: scale(1.05);
}

.input-textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: 2px solid #e8e8ed;
    border-radius: 12px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #1d1d1f;
    background: #fafafa;
    resize: vertical;
    transition: all 0.3s ease;
    outline: none;
}

.input-textarea:focus {
    border-color: var(--brand-purple);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 85, 254, 0.1);
}

.input-textarea::placeholder {
    color: #8e8e93;
}

.input-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #8e8e93;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-item {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
}

.stat-item span {
    color: var(--brand-purple);
    font-weight: 600;
}

/* 比对结果区域 */
.duibi-result {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 0.5px solid var(--apple-border);
    box-shadow: 0 4px 16px var(--apple-shadow);
    animation: fadeInUp 0.5s ease;
}

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

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
    gap: 12px;
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.022em;
}

.result-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.stat-badge.added {
    background: linear-gradient(135deg, var(--diff-added-dark) 0%, #66bb6a 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.stat-badge.deleted {
    background: linear-gradient(135deg, var(--diff-deleted-dark) 0%, #ef5350 100%);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.stat-badge.modified {
    background: linear-gradient(135deg, var(--diff-modified-dark) 0%, #ffa726 100%);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.stat-badge svg {
    flex-shrink: 0;
}

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

.result-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(109, 85, 254, 0.08);
    border: 1px solid rgba(109, 85, 254, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: var(--brand-purple);
    font-weight: 500;
}

.result-action-btn:hover {
    background: rgba(109, 85, 254, 0.15);
    border-color: rgba(109, 85, 254, 0.3);
    transform: translateY(-2px);
}

.result-action-btn svg {
    flex-shrink: 0;
}

/* 差异导航侧边栏 */
.diff-navigator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 252, 0.95) 100%);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border-radius: 20px;
    border: 1.5px solid rgba(109, 85, 254, 0.15);
    box-shadow: 
        0 10px 40px rgba(109, 85, 254, 0.12),
        0 2px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 50;
    max-height: 520px;
    min-width: 72px;
    animation: slideInRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

.diff-navigator-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--brand-purple);
    text-align: center;
    padding: 16px 14px 14px;
    border-bottom: 1px solid rgba(109, 85, 254, 0.1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    background: linear-gradient(180deg, rgba(109, 85, 254, 0.04) 0%, transparent 100%);
    flex-shrink: 0;
}

.diff-navigator-title::before {
    content: '◆';
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    font-size: 6px;
    color: var(--brand-purple);
    opacity: 0.4;
}

.diff-navigator-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--brand-purple) 50%, transparent 100%);
    border-radius: 2px;
}

.diff-nav-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 10px;
}

.diff-nav-list::-webkit-scrollbar {
    width: 3px;
}

.diff-nav-list::-webkit-scrollbar-track {
    background: rgba(109, 85, 254, 0.05);
    border-radius: 2px;
    margin: 6px 0;
}

.diff-nav-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand-purple) 0%, var(--brand-purple-light) 100%);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.diff-nav-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--brand-purple-light) 0%, var(--brand-purple) 100%);
}

.diff-nav-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    position: relative;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
}

.diff-nav-item:hover {
    transform: scale(1.12) translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.diff-nav-item.active {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 
        0 0 0 3px rgba(109, 85, 254, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {
    0%, 100% {
        box-shadow: 
            0 0 0 3px rgba(109, 85, 254, 0.25),
            0 8px 20px rgba(0, 0, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 0 0 5px rgba(109, 85, 254, 0.15),
            0 8px 20px rgba(0, 0, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

.diff-nav-item.added {
    background: linear-gradient(135deg, var(--diff-added-dark) 0%, #66bb6a 100%);
}

.diff-nav-item.added:hover {
    background: linear-gradient(135deg, #66bb6a 0%, #81c784 100%);
}

.diff-nav-item.added::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 4px;
    font-size: 10px;
    font-weight: 900;
    opacity: 0.5;
}

.diff-nav-item.deleted {
    background: linear-gradient(135deg, var(--diff-deleted-dark) 0%, #ef5350 100%);
}

.diff-nav-item.deleted:hover {
    background: linear-gradient(135deg, #ef5350 0%, #e57373 100%);
}

.diff-nav-item.deleted::after {
    content: '−';
    position: absolute;
    right: 4px;
    top: 4px;
    font-size: 10px;
    font-weight: 900;
    opacity: 0.5;
}

.diff-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0.8;
    pointer-events: none;
}

/* 自定义 diff 样式 */
.diff-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    position: relative;
}

.diff-panel {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8ed;
}

.diff-panel-header {
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    padding: 10px 16px;
    font-weight: 600;
    color: #1d1d1f;
    /* border-bottom: 2px solid var(--brand-purple); */
}

.diff-panel-body {
    max-height: 500px;
    overflow-y: auto;
}

.diff-line {
    display: flex;
    padding: 4px 0;
    border-left: 3px solid transparent;
    transition: background 0.2s ease;
}

.diff-line:hover {
    background: rgba(109, 85, 254, 0.05) !important;
}

.diff-line.added {
    background: var(--diff-added);
    border-left-color: var(--diff-added-border);
}

.diff-line.deleted {
    background: var(--diff-deleted);
    border-left-color: var(--diff-deleted-border);
}

.diff-line.unchanged {
    background: #fff;
}

.diff-line.empty {
    background: #f8f9fa;
    opacity: 0.6;
}

.line-num.empty-num {
    color: #ccc;
}

.line-content.empty-content {
    position: relative;
}

.line-content.empty-content::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #ddd 0px,
        #ddd 4px,
        transparent 4px,
        transparent 8px
    );
}

.line-num {
    display: inline-block;
    width: 50px;
    text-align: right;
    padding: 0 12px;
    color: #8e8e93;
    font-weight: 500;
    user-select: none;
    flex-shrink: 0;
    background: #fafafa;
    border-right: 1px solid #e8e8ed;
}

.line-marker {
    display: inline-block;
    width: 30px;
    text-align: center;
    font-weight: bold;
    flex-shrink: 0;
    color: #666;
}

.diff-line.added .line-marker {
    color: var(--diff-added-dark);
}

.diff-line.deleted .line-marker {
    color: var(--diff-deleted-dark);
}

.line-content {
    flex: 1;
    padding: 0 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

@media (max-width: 768px) {
    .diff-side-by-side {
        grid-template-columns: 1fr;
    }
    
    .diff-navigator {
        right: 12px;
        max-height: 420px;
        min-width: 64px;
        border-radius: 18px;
    }
    
    .diff-navigator-title {
        font-size: 9px;
        padding: 14px 12px 12px;
        letter-spacing: 1.2px;
    }
    
    .diff-nav-list {
        padding: 12px 8px;
    }
    
    .diff-nav-item {
        width: 42px;
        height: 42px;
        font-size: 13px;
        margin: 7px auto;
    }
}

/* 功能说明 */
.duibi-tips {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 16px;
    padding: 24px;
    border: 0.5px solid var(--apple-border);
    box-shadow: 0 4px 16px var(--apple-shadow);
}

.tips-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
    letter-spacing: -0.022em;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    position: relative;
    margin-block-start: 0;
}

.tips-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--brand-purple) 0%, var(--brand-purple-light) 100%);
    border-radius: 2px;
}

.tips-title::after {
    content: '💡';
    font-size: 18px;
    margin-left: auto;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.tips-list li {
    position: relative;
    padding: 12px 12px 12px 38px;
    font-size: 13px;
    line-height: 1.5;
    color: #1d1d1f;
    background: rgba(109, 85, 254, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(109, 85, 254, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tips-list li:hover {
    background: rgba(109, 85, 254, 0.05);
    border-color: rgba(109, 85, 254, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(109, 85, 254, 0.08);
}

.tips-list li::before {
    content: '✓';
    position: absolute;
    left: 10px;
    top: 12px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-purple-light) 100%);
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(109, 85, 254, 0.3);
}

.tips-list li strong {
    color: var(--brand-purple);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .duibi-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-right {
        justify-content: stretch;
    }
    
    .toolbar-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .duibi-section {
        padding: 16px 0 32px;
    }
    
    .duibi-container {
        padding: 0 16px;
    }
    
    .duibi-toolbar,
    .input-panel,
    .duibi-result,
    .duibi-tips {
        padding: 16px;
        border-radius: 14px;
    }
    
    .duibi-input-area {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .input-textarea {
        min-height: 200px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-stats {
        width: 100%;
    }
    
    .stat-badge {
        flex: 1;
        justify-content: center;
    }
    
    .result-actions {
        width: 100%;
    }
    
    .result-action-btn {
        flex: 1;
        justify-content: center;
    }
    
    .tips-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .toolbar-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-select {
        width: 100%;
    }
    
    .toolbar-btn span {
        display: none;
    }
    
    .result-action-btn span {
        display: none;
    }
    
    .input-action-btn {
        width: 28px;
        height: 28px;
    }
    
    .input-action-btn svg {
        width: 14px;
        height: 14px;
    }
}
