body{
background:linear-gradient(135deg,#0f172a,#1e293b);
color:white;
font-family:Segoe UI,Arial,sans-serif;
text-align:center;
margin:0;
padding:0;
}

h1{
margin-top:20px;
letter-spacing:1px;
font-weight:600;
}

h2{
margin-top:40px;
font-weight:500;
color:#e2e8f0;
}

.controls{
margin:20px auto;
padding:20px;
width:70%;
border-radius:12px;
background:rgba(255,255,255,0.05);
backdrop-filter:blur(10px);
box-shadow:0 8px 20px rgba(0,0,0,0.4);
}

button{
padding:10px 16px;
margin:6px;
border:none;
background:linear-gradient(45deg,#3b82f6,#6366f1);
color:white;
border-radius:8px;
cursor:pointer;
font-weight:500;
transition:all 0.2s ease;
}

button:hover{
transform:scale(1.08);
box-shadow:0 0 12px rgba(99,102,241,0.7);
}

button:disabled{
background:#555;
cursor:not-allowed;
transform:none;
box-shadow:none;
}

#array{
display:flex;
align-items:flex-end;
justify-content:center;
height:450px;
margin-top:30px;
padding:10px;
}

.bar{
width:8px;
margin:2px;
border-radius:4px;
transition:all 0.2s ease;
box-shadow:0 0 6px rgba(0,0,0,0.4);
}

.sorted{
background:#22c55e;
box-shadow:0 0 15px #22c55e;
}

.compare{
background:#ef4444;
}

.swap{
background:#facc15;
}

input{
margin:10px;
cursor:pointer;
}

.info{
margin-top:15px;
font-size:18px;
font-weight:500;
}

/* Comparison Mode */

#comparisonContainer{
display:flex;
justify-content:space-around;
margin-top:40px;
gap:20px;
flex-wrap:wrap;
}

.compareBox{
width:45%;
background:rgba(255,255,255,0.05);
padding:15px;
border-radius:12px;
backdrop-filter:blur(8px);
box-shadow:0 6px 15px rgba(0,0,0,0.3);
}

.compareBox h3{
margin-bottom:10px;
}

#arrayA,#arrayB{
display:flex;
align-items:flex-end;
justify-content:center;
height:300px;
}

/* Graph Section */

.chartContainer{
width:80%;
margin:40px auto;
background:rgba(255,255,255,0.05);
padding:20px;
border-radius:12px;
backdrop-filter:blur(8px);
box-shadow:0 6px 15px rgba(0,0,0,0.3);
}

/* Responsive */

@media(max-width:900px){

.controls{
width:90%;
}

#comparisonContainer{
flex-direction:column;
align-items:center;
}

.compareBox{
width:90%;
}

.chartContainer{
width:90%;
}

}