/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    overflow-x: hidden;
}

/* ===== NAVIGATION STYLES ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #2563eb;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2563eb;
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== SECTION STYLES ===== */
.section {
    min-height: 100vh;
    padding: 100px 0 50px;
    display: none;
}

.section.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tech-tag {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-block {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: auto;
}

.code-block pre {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-block code {
    color: #60a5fa;
}

/* ===== ALGORITHMS SECTION ===== */
.algorithms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.algorithm-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.algorithm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.algorithm-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.algorithm-visual {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

/* Consistent Hashing Visualization */
.hash-ring {
    width: 200px;
    height: 200px;
    border: 3px solid #2563eb;
    border-radius: 50%;
    position: relative;
    margin: 1rem;
}

.node {
    position: absolute;
    width: 60px;
    height: 30px;
    background: #3b82f6;
    color: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(var(--angle)) translateX(100px) rotate(calc(-1 * var(--angle)));
}

.key {
    position: absolute;
    width: 40px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    transform: rotate(var(--angle)) translateX(80px) rotate(calc(-1 * var(--angle)));
}

/* Hash Table Visualization */
.hash-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-width: 300px;
}

.table-cell {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #64748b;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-cell.filled {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.algorithm-card ul {
    list-style: none;
    margin-top: 1rem;
}

.algorithm-card li {
    padding: 0.5rem 0;
    color: #64748b;
    position: relative;
    padding-left: 1.5rem;
}

.algorithm-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* ===== DEMO SECTION ===== */
.demo-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.demo-controls {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.control-group {
    margin-bottom: 2rem;
}

.control-group h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.demo-display {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.storage-visualization,
.hash-table-display {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.storage-visualization h3,
.hash-table-display h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.storage-nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.storage-node {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.storage-node.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.storage-node h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.storage-node .product-count {
    font-size: 0.875rem;
    color: #64748b;
}

/* Warehouse Summary Styles */
.warehouse-stats {
    margin-bottom: 1.5rem;
}

.warehouse-summary h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.summary-item h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.summary-item .count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'JetBrains Mono', monospace;
}

.summary-item .percentage {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Enhanced Storage Node Styles */
.storage-node {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.storage-node.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.storage-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.storage-node.active::before {
    opacity: 1;
}

.storage-node h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.storage-node .product-count {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.storage-node .capacity-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.storage-node .capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.storage-node .capacity-text {
    font-size: 0.625rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Warehouse Chart Styles */
.warehouse-chart-container {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.warehouse-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.warehouse-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.warehouse-item h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.warehouse-item .warehouse-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

/* Warehouse Bar Chart Styles */
.warehouse-bar-chart {
    display: flex;
    align-items: end;
    justify-content: space-around;
    height: 150px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.warehouse-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.warehouse-bar {
    width: 50px;
    background: linear-gradient(to top, #10b981, #34d399);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    min-height: 10px;
    cursor: pointer;
}

.warehouse-bar:hover {
    background: linear-gradient(to top, #059669, #10b981);
    transform: scale(1.05);
}

.warehouse-bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

.warehouse-bar-value {
    font-size: 0.625rem;
    font-weight: 700;
    color: #10b981;
    font-family: 'JetBrains Mono', monospace;
}

/* Global Locations Styles */
.global-locations {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.global-locations h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.world-map-container {
    width: 100%;
    height: 300px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.world-map {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #e0f2fe, #b3e5fc);
    border-radius: 12px;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.location-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.location-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.location-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.location-item .location-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'JetBrains Mono', monospace;
}

.location-item .location-percentage {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.location-item .location-region {
    font-size: 0.625rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    font-style: italic;
}

/* World Map Visualization */
.world-map::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50"><path d="M20,25 Q30,20 40,25 Q50,30 60,25 Q70,20 80,25" stroke="%2364748b" stroke-width="0.5" fill="none"/><circle cx="25" cy="20" r="2" fill="%232563eb"/><circle cx="45" cy="30" r="2" fill="%2310b981"/><circle cx="65" cy="25" r="2" fill="%23ef4444"/><circle cx="35" cy="35" r="2" fill="%23f59e0b"/><circle cx="55" cy="15" r="2" fill="%238b5cf6"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.3;
}

.location-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #2563eb;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.location-marker.active {
    background: #10b981;
    animation: pulse-green 2s infinite;
}

.location-marker::after {
    content: attr(data-count);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes pulse-green {
    0%, 100% { transform: scale(1); background: #10b981; }
    50% { transform: scale(1.2); background: #34d399; }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.explanation-section {
    margin-bottom: 2rem;
}

.explanation-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.explanation-section p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.explanation-section ul {
    list-style: none;
    padding: 0;
}

.explanation-section li {
    padding: 0.5rem 0;
    color: #64748b;
    position: relative;
    padding-left: 1.5rem;
}

.explanation-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hash-table-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    max-width: 100%;
}

.hash-cell {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hash-cell.filled {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.hash-cell.collision {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.hash-cell .product-code {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hash-cell .product-info {
    font-size: 0.625rem;
    opacity: 0.8;
}

.demo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.stat-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card span {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== ANALYTICS SECTION ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.analytics-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.analytics-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart-container {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.timeline-container {
    max-height: 300px;
    overflow-y: auto;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3b82f6;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #3b82f6;
}

.timeline-item.added {
    border-left-color: #10b981;
}

.timeline-item.added::before {
    background: #10b981;
    box-shadow: 0 0 0 3px #10b981;
}

.timeline-item.deleted {
    border-left-color: #ef4444;
}

.timeline-item.deleted::before {
    background: #ef4444;
    box-shadow: 0 0 0 3px #ef4444;
}

.timeline-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.timeline-item p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.timeline-item .timestamp {
    font-size: 0.625rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'JetBrains Mono', monospace;
}

/* Bar Chart Styles */
.bar-chart {
    display: flex;
    align-items: end;
    justify-content: space-around;
    height: 150px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bar {
    width: 40px;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    min-height: 10px;
}

.bar:hover {
    background: linear-gradient(to top, #2563eb, #3b82f6);
    transform: scale(1.05);
}

.bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

.bar-value {
    font-size: 0.625rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== FEATURES SECTION ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.feature-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.developer-info {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.developer-avatar {
    margin-bottom: 1.5rem;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto;
    color: white;
}

.developer-details h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.developer-role {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.developer-info-list {
    text-align: left;
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 0.5rem 0;
    color: #64748b;
}

.developer-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: #f1f5f9;
    color: #2563eb;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.project-description {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-description h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.project-description p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-info {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    color: #64748b;
}

.contact-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .algorithms-grid {
        grid-template-columns: 1fr;
    }

    .demo-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hash-table-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .tech-tag {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .hash-table-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hash-cell {
        font-size: 0.625rem;
        padding: 0.5rem 0.25rem;
        min-height: 50px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none;
}

.visible {
    display: block;
}
