/* Hash Generator Styles */

.hash-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

.mode-btn {
    background-color: #f5f7f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mode-btn:hover {
    background-color: #e9ecef;
}

.mode-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Mode Panels */
.mode-panel {
    display: none;
}

.mode-panel.active {
    display: block;
}

/* Text Input Mode */
.input-container {
    margin-bottom: 1.5rem;
}

.input-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
}

.input-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

/* Algorithm Selector */
.algorithm-selector {
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.algorithm-selector h3 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    color: #343541;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.algorithm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.algorithm-checkbox:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.algorithm-checkbox label {
    cursor: pointer;
    font-weight: 600;
    color: #343541;
    font-size: 1.05rem;
}

/* Hash Actions */
.hash-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.case-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

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

.case-option label {
    cursor: pointer;
    font-weight: 600;
    color: #343541;
}

/* Hash Results */
.hash-results {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #f8f9fa;
    min-height: 100px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hash-results .placeholder {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    font-size: 1rem;
    margin-top: 2rem;
}

.hash-result {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.hash-algorithm {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(16, 163, 127, 0.2);
}

.hash-value-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hash-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1.05rem;
    word-break: break-all;
    color: #343541;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

/* File Upload Mode */
.file-upload-container {
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.file-upload-box {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.file-upload-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(58, 134, 255, 0.05);
}

.upload-icon {
    color: #888;
    margin-bottom: 1rem;
}

.upload-text {
    color: #555;
    margin-bottom: 0.5rem;
}

.file-name {
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-info {
    background-color: #f5f7f9;
    border-radius: 6px;
    padding: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
}

/* Compare Mode */
.comparison-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
}

.input-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: monospace;
}

.comparison-result {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 500;
}

.comparison-result .match {
    color: #28a745;
}

.comparison-result .no-match {
    color: #dc3545;
}

.comparison-result .placeholder {
    color: #999;
    font-style: italic;
    font-weight: normal;
    font-size: 1rem;
}

/* Info Panel */
.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
}

.info-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
}

.info-item h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.info-item p, .info-item ul {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.info-item ul {
    padding-left: 1.5rem;
}

/* Button Styles */
.btn-small {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(58, 134, 255, 0.1);
}

.btn-copy {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 75px;
    text-align: center;
}

.btn-copy:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Related Tools Section */
.related-tools {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.related-tools h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #343541;
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.related-tools h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-tool-card {
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.related-tool-card h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.related-tool-card p {
    flex-grow: 1;
    margin-bottom: 1.25rem;
    color: #4b5563;
    line-height: 1.5;
}

.btn-related {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
}

.btn-related:hover {
    background-color: var(--secondary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mode-selector {
        flex-direction: column;
    }
    
    .comparison-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .file-upload-container {
        grid-template-columns: 1fr;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}