* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f8fafc;
    /* Soft background */
    font-family: 'Inter', sans-serif;
    color: #475569;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.visualizer-section {
    width: 100%;
}

.pastel-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(100, 116, 139, 0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.pastel-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #64748b;
    text-align: center;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.pastel-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.vis-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    align-items: center;
}

.control-group,
.button-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pastel-input,
.pastel-select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.pastel-input:focus,
.pastel-select:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.pastel-input.hide {
    display: none;
}

.pastel-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.btn-primary {
    background: #a78bfa;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3);
}

/* Lavender */
.btn-primary:hover {
    background: #8b5cf6;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #93c5fd;
    box-shadow: 0 4px 15px rgba(147, 197, 253, 0.3);
}

/* Powder Blue */
.btn-secondary:hover {
    background: #60a5fa;
    transform: translateY(-2px);
}

.btn-warning {
    background: #fde047;
    color: #854d0e;
    box-shadow: 0 4px 15px rgba(253, 224, 71, 0.3);
}

/* Yellow */
.btn-warning:hover {
    background: #facc15;
    transform: translateY(-2px);
}

.btn-danger {
    background: #fda4af;
    box-shadow: 0 4px 15px rgba(253, 164, 175, 0.3);
}

/* Baby Pink */
.btn-danger:hover {
    background: #fb7185;
    transform: translateY(-2px);
}

.vis-canvas {
    height: 400px;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    gap: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.vis-bar {
    background: #a78bfa;
    /* Default lavender */
    width: 30px;
    border-radius: 6px 6px 0 0;
    transition: height 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 0.5rem;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.vis-bar.active {
    background: #fda4af;
    transform: scale(1.05);
    z-index: 2;
}

/* Baby pink */
.vis-bar.comparing {
    background: #fde047;
    color: #854d0e;
    transform: scale(1.05);
    z-index: 2;
}

.vis-bar.sorted {
    background: #a7f3d0;
    color: #065f46;
}

/* Mint green */
.vis-bar.swapped {
    background: #93c5fd;
}

/* Powder blue */