:root {
    --bg-color: #0b0f19;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --primary-accent: #3b82f6;
    --primary-accent-hover: #2563eb;
    --secondary-accent: #8b5cf6;
    --bar-color: #3b82f6;
    --bar-active: #ef4444;
    --bar-sorted: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 15, 25, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(50px);
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem 2rem;
    border-radius: 100px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo .highlight {
    color: var(--primary-accent);
}

.controls {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Main Layout */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Visualizer */
.visualizer-container {
    width: 100%;
    height: 500px;
    padding: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.array-container {
    display: flex;
    align-items: flex-end;
    height: 100%;
    width: 100%;
    gap: 4px;
}

.array-bar {
    background-color: var(--bar-color);
    flex: 1;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s, height 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 5px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
