/* Hash Calculator Tool Styles */

.hash-calculator {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Algorithm Selection */
.algorithm-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.algorithm-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.algorithm-option {
    position: relative;
}

.algorithm-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.algorithm-option label {
    display: block;
    padding: 12px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    user-select: none;
}

.algorithm-option label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.algorithm-option input[type="checkbox"]:checked + label {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Input Section */
.input-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.input-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.input-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #374151;
}

.tab-button.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Text Input */
.text-input-container {
    margin-bottom: 20px;
}

.text-input-container label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

#textInput {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#textInput:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* File Input */
.file-input-container {
    margin-bottom: 20px;
}

.file-input-container label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.file-drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-drop-zone.dragover {
    border-style: solid;
}

.file-drop-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.file-drop-text {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 10px;
}

.file-drop-hint {
    color: #9ca3af;
    font-size: 14px;
}

#fileInput {
    display: none;
}

.file-info {
    display: none;
    margin-top: 15px;
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #166534;
}

.file-info.show {
    display: block;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: none;
}

.results-section.show {
    display: block;
}

.results-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.hash-result {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.hash-result:last-child {
    margin-bottom: 0;
}

.hash-algorithm {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.hash-value-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hash-value {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #1f2937;
    background: white;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    word-break: break-all;
    line-height: 1.4;
}

.copy-btn {
    padding: 8px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.copy-btn:active {
    background: #d1d5db;
}

.copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Hash Comparison */
.comparison-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.comparison-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.comparison-input {
    margin-bottom: 15px;
}

.comparison-input label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

#compareHash {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    transition: border-color 0.2s ease;
}

#compareHash:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comparison-result {
    display: none;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 500;
}

.comparison-result.show {
    display: block;
}

.comparison-result.match {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.comparison-result.no-match {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Progress Indicator */
.progress-container {
    display: none;
    margin: 20px 0;
}

.progress-container.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    border: 1px solid;
}

.message.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.message.info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hash-calculator {
        padding: 15px;
    }
    
    .algorithm-section,
    .input-section,
    .results-section,
    .comparison-section {
        padding: 20px;
    }
    
    .algorithm-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .algorithm-option label {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .input-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        padding: 10px 16px;
        border-bottom: 1px solid #e5e7eb;
        border-right: 2px solid transparent;
    }
    
    .tab-button.active {
        border-bottom-color: #e5e7eb;
        border-right-color: #3b82f6;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hash-value-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hash-calculator {
        padding: 10px;
    }
    
    .algorithm-section,
    .input-section,
    .results-section,
    .comparison-section {
        padding: 15px;
    }
    
    .file-drop-zone {
        padding: 30px 15px;
    }
    
    .file-drop-icon {
        font-size: 36px;
    }
    
    .algorithm-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}
