/* MD5 加密工具样式 */

/* 主容器布局 */
.md5-container {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

/* 左侧输入区域 */
.md5-input-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    overflow: hidden;
}

/* 右侧输出区域 */
.md5-output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 编辑器容器 */
.md5-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 结果查看器 */
.md5-result {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    overflow-wrap: break-word;
}

.result-viewer {
    overflow: auto;
    padding: 0;
    margin: 0;
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

#resultOutput {
    background-color: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 16px;
    font-family: var(--font-family-mono);
    font-size: 14px;
    line-height: 1.4;
    overflow-x: auto;
    min-height: 200px;
}


.resize-handle {
    width: 12px;
    background-color: var(--bg-primary);
    cursor: col-resize;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    min-width: 8px;
    flex-shrink: 0;
}

.resize-line {
    width: 2px;
    height: 60px;
    background-color: var(--border-color);
    border-radius: 1px;
    transition: background-color 0.2s ease;
}

.resize-handle:hover .resize-line {
    background-color: var(--text-primary);
}

.resize-handle:active .resize-line {
    background-color: var(--text-primary);
}




/* 结果占位符 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}

.placeholder-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.4;
    color: var(--text-muted);
}

.placeholder-text {
    font-size: 14px;
    max-width: 280px;
    line-height: 1.4;
    color: var(--text-muted);
    font-weight: 400;
}

/* 错误信息样式 */
.md5-error {
    background-color: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.md5-error h4 {
    color: var(--error-color);
    font-size: 14px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #3c1b1a;
}

.md5-error h4::before {
    font-size: 18px;
}

.md5-error .error-message {
    display: block;
    margin-top: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    border-left: none;
    padding: 15px 0px;
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.5;
}

/* 结果内容样式 */
.result-content {
    font-family: var(--font-family-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 16px;
    margin: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    width: 100%;
    min-height: 120px;
}

/* 成功状态样式 */
.result-success {
    border-left: 3px solid var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

/* 加密结果样式 */
.encrypted-result {
    color: var(--accent-light);
    background: rgba(16, 185, 129, 0.05);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--success-color);
    margin-bottom: 8px;
}

/* 结果区域整体样式 */
.result-section {
    padding: 12px;
}

/* 结果标题 */
.result-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

/* 统计区域整体样式 */
.stats-section {
    margin-top: 16px;
    padding: 12px;

}

/* 统计标题 */
.stats-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 结果统计信息 */
.result-stats {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    flex-wrap: nowrap;
    justify-content: space-between;
}

.stat-item {
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    text-align: left;
}

.stat-label {
    font-weight: 500;
    font-size: 11px;
    white-space: nowrap;
}

.stat-value {
    font-weight: 600;
    font-family: var(--font-family-mono);
    font-size: 11px;
    white-space: nowrap;
}

/* 加密结果样式 */
.encrypted-result {
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 文件信息容器 */
.file-info-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.file-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.file-info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.info-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.info-label {
    font-weight: 500;
    color: var(--text-muted);
    min-width: 60px;
    font-size: 12px;
}

.info-value {
    color: var(--text-primary);
    font-family: var(--font-family-mono);
    font-size: 12px;
}

/* MD5哈希显示 */
.md5-hash-container {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.md5-hash-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.md5-hash-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 40px;
    flex-shrink: 0;
}

.md5-hash {
    font-family: var(--font-family-mono);
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-all;
    flex: 1;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

.copy-hash-btn {
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--accent-color);
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: 500;
}

.copy-hash-btn:hover {
    background: var(--accent-light);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.copy-hash-btn:active {
    transform: translateY(0);
}

/* 动画效果 */
.result-fade-in {
    animation: fadeInResult 0.3s ease-in-out;
}

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

/* 处理状态指示器 */
.processing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 14px;
}

.processing-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    border-top-color: var(--accent-light);
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* 进度条 */
.progress-container {
    margin: 12px 0;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

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

.progress-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

/* 文档区域样式 */
.character-set {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}

.charset-item {
    margin-bottom: 16px;
}

.charset-item:last-child {
    margin-bottom: 0;
}

.charset-item h4 {
    color: var(--accent-light);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.charset-item code {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.charset-item p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 8px 0 0 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .md5-container {
        flex-direction: column;
        height: auto;
    }
    
    .md5-input-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .resize-handle {
        display: none;
    }
    
    .result-title {
        font-size: 12px;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .encrypted-result {
        font-size: 12px;
        padding: 10px;
    }
    
    .stats-section {
        padding: 8px;
        margin-top: 12px;
    }
    
    .stats-title {
        font-size: 12px;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-item {
        justify-content: space-between;
        flex: none;
    }
    
    .file-info {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .md5-hash {
        font-size: 12px;
    }
}

/* MD5优势展示 */
.image-base64-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.benefit-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.benefit-item h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefit-item p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* 高对比度模式适配 */
@media (prefers-contrast: high) {
    .result-viewer {
        border: 2px solid var(--border-color);
    }
    
    .encrypted-result {
        border-width: 2px;
    }
    
    .md5-error {
        border-width: 2px;
    }
    
    .benefit-item {
        border: 2px solid var(--border-color);
    }
}

/* 减少动画模式适配 */
@media (prefers-reduced-motion: reduce) {
    .result-fade-in,
    .processing-spinner {
        animation: none;
    }
}
