/* hash-comparison.css */
.hash-comparison-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.quick-nav {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    border: 1px solid #e2e8f0;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.nav-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.comparison-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box input {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    max-width: 100%;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.table-responsive {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table th {
    background: #f8fafc;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
}

.comparison-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sort-icon {
    margin-left: 5px;
    font-size: 0.8em;
}

.algorithm-year {
    font-size: 0.8em;
    color: #64748b;
    margin-top: 4px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fecaca; color: #dc2626; }
.badge-info { background: #cffafe; color: #0e7490; }

.security-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.security-badge.excellent { background: #dcfce7; color: #166534; }
.security-badge.good { background: #fef3c7; color: #92400e; }
.security-badge.weak { background: #fed7aa; color: #c2410c; }
.security-badge.broken { background: #fecaca; color: #dc2626; }

.security-note {
    font-size: 0.8em;
    color: #64748b;
    margin-top: 4px;
}

.performance-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-bottom: 5px;
}

.performance-bar.fast { background: #10b981; }
.performance-bar.medium { background: #f59e0b; }
.performance-bar.slow { background: #ef4444; }

.performance-text {
    font-size: 0.8em;
    color: #64748b;
}

.uses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.use-tag {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #475569;
}

.use-tag.deprecated {
    background: #fecaca;
    color: #dc2626;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8em;
    transition: background 0.3s ease;
}

.tool-link:hover {
    background: #2563eb;
}

/* Recommendations */
.recommendations-section {
    margin: 50px 0;
}

.recommendation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rec-card {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid;
}

.rec-excellent { border-color: #bbf7d0; background: #f0fdf4; }
.rec-good { border-color: #fde68a; background: #fffbeb; }
.rec-deprecated { border-color: #fecaca; background: #fef2f2; }

.rec-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.alg-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.alg-list span {
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    border: 1px solid;
}

.rec-excellent .alg-list span { border-color: #bbf7d0; }
.rec-good .alg-list span { border-color: #fde68a; }
.rec-deprecated .alg-list span { border-color: #fecaca; }

/* Use Case Guide */
.use-case-guide {
    margin: 50px 0;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.use-case-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.use-case-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.use-case-card h3 {
    margin: 0 0 15px 0;
    color: var(--dark);
}

.recommended-algs, .avoid-algs, .acceptable-algs {
    margin-bottom: 15px;
}

.recommended-algs ul, .avoid-algs ul, .acceptable-algs ul {
    margin: 5px 0;
    padding-left: 20px;
}

.recommended-algs li { color: #166534; }
.avoid-algs li { color: #dc2626; }
.acceptable-algs li { color: #d97706; }

.use-case-note {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 10px;
    font-style: italic;
}

/* Technical Details */
.technical-details {
    margin: 50px 0;
}

.detail-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.tab-content {
    display: none;
}

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

.tab-content ul {
    padding-left: 20px;
}

.tab-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin: 50px 0;
}

.faq-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.faq-item h3 {
    margin: 0 0 10px 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.faq-item p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hash-comparison-container {
        padding: 10px;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .recommendation-cards,
    .use-case-grid {
        grid-template-columns: 1fr;
    }
}