/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
}

/* Visualizer Bar Styles */
.bar {
    transition: height 0.2s ease-in-out, background-color 0.2s ease-in-out;
    flex-grow: 1; /* Allow bars to grow and fill space */
    width: 0; /* Base width for flex-grow calculation */
}
.bar.active {
    background-color: #3b82f6 !important; /* Blue for active */
}
.bar.swap {
    background-color: #f97316 !important; /* Orange for swap */
}
.bar.sorted {
    background-color: #22c55e !important; /* Green for sorted */
}
.bar.bucket-active {
    background-color: #6366f1 !important; /* Indigo color for bucket sort */
}
.bar.radix-pass {
    background-color: #a855f7 !important; /* Purple for radix pass */
}

/* Visualizer Container Height */
#visualizer-1, #visualizer-2, #visualizer-compare-1, #visualizer-compare-2 {
    height: 350px;
}

/* 'Fanfare' Animation for Completion */
@keyframes fanfare {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.fanfare {
    animation: fanfare 0.5s ease-in-out;
}

/* Custom Scrollbar for Visualizer */
.visualizer-container {
    position: relative;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #f97316 #2c3e50;
}

.visualizer-container::-webkit-scrollbar {
    height: 8px;
}
.visualizer-container::-webkit-scrollbar-track {
    background: #2c3e50;
}
.visualizer-container::-webkit-scrollbar-thumb {
    background-color: #f97316;
    border-radius: 4px;
    border: 2px solid #2c3e50;
}



/* Custom Alert Modal Styles */
.alert-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}
.alert-content {
    background-color: #171717;
    color: #f5f5f5;
    margin: 15% auto;
    padding: 20px;
    border: 2px solid #f97316;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
}
.alert-content button {
    background-color: #f97316;
    color: #171717;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 5px;
    margin-top: 15px;
}
.alert-content button:hover {
    background-color: #e2610d;
}

/* Code Block Styles */
.code-block {
    background-color: #1a1a1a;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    border: 1px solid #333;
}
.code-block pre {
    margin: 0;
}
/* Internal Link Style */
.internal-link {
    color: #2dd4bf; /* Teal color */
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}
.internal-link:hover {
    color: #5eead4;
}


/* Custom Responsive Navigation */
@media (min-width: 451px) {
    #hamburger-container {
        display: none;
    }
    #nav-links {
        /* This overrides the 'hidden' class on larger screens */
        display: flex !important; 
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem; /* 16px, Tailwind's gap-4 */
        margin-top: 0;
    }
    #nav-links button {
        width: auto;
    }
}

@media (max-width: 450px) {
    #hamburger-container {
        display: flex;
    }
    /* JS handles toggling 'hidden' class for visibility */
}

