/* ===== 文件哈希验证工具专用样式 ===== */

/* ===== 文件上传区域样式 ===== */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 20px;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #4285f4;
    background: #eff6ff;
}

.file-input {
    display: none;
}

.upload-tip {
    color: #6b7280;
}

.upload-tip i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.upload-tip p {
    margin: 10px 0 5px;
    font-size: 16px;
}

.upload-tip .file-size-tip {
    font-size: 14px;
    color: #9ca3af;
}

.file-info {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    margin-bottom: 20px;
}

.file-info i {
    color: #22c55e;
    font-size: 20px;
}

.file-info #fileName {
    font-weight: 500;
    color: #166534;
}

.file-info #fileSize {
    color: #6b7280;
    margin-left: 10px;
}

/* ===== 算法选择样式 ===== */
.algorithm-options {
    margin: 20px 0;
}

.option-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.checkbox-label .recommended {
    color: #22c55e;
    font-weight: 500;
    margin-left: 5px;
}

/* ===== 进度条样式 ===== */
#progressContainer {
    display: none;
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.progress-bar-wrapper {
    margin-bottom: 15px;
}

.progress-bar-wrapper:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4285f4, #34a853);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-fill.completed {
    background: #22c55e;
}

/* ===== 操作按钮样式 ===== */
.action-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    flex: 1;
    min-width: 150px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #4285f4;
    color: white;
}

.btn-primary:hover {
    background: #3367d6;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* ===== 结果展示区域样式 ===== */
.result-container {
    display: none;
    margin: 30px 0;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.result-header i {
    color: #22c55e;
    font-size: 24px;
}

.result-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

#hashResults {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hash-result-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hash-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hash-algorithm {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.hash-bits {
    font-size: 14px;
    color: #6b7280;
}

.hash-value-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.hash-value {
    flex: 1;
    word-break: break-all;
    background: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.copy-btn {
    padding: 8px 16px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #3367d6;
}

.hash-timestamp {
    margin-top: 10px;
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== 历史记录控制样式 ===== */
.history-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.history-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.history-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.history-checkbox span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
}

.btn-outline {
    padding: 10px 20px;
    background: white;
    color: #4285f4;
    border: 1px solid #4285f4;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: #eff6ff;
}

.privacy-note {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.privacy-note i {
    color: #22c55e;
    margin-top: 2px;
}

/* ===== 历史记录模态框样式 ===== */
.md5-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.modal-header i {
    color: #4a90e2;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #6c757d;
}

.modal-close:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

#historyList {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.btn-danger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
    font-size: 15px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }

    .history-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        max-width: 95%;
        max-height: 90vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
}
