* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

.container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
  min-width: 250px;
  max-width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  color: #333;
}

.select-algorithm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.select-algorithm select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #888;
  background: #ffffffdd;
  color: #333;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

.generate-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #fff4;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
}

.generate-new input {
  padding: 6px;
  margin: 5px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  text-align: center;
}

.buttons {
  display: flex;
  justify-content: center;
  width: 100%;
}

button {
  background: #0077ff;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
}

button:hover {
  background: #005fcc;
}

.stage {
  position: relative;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 300px;
  max-width: 100%;
  flex: 1;
}

.bar {
  background: #0077ff;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: absolute;
  bottom: 20px;
}

.bar.activate {
  background: #32cd32;
  animation: upAndDownScale 1s ease-in-out;
}

@keyframes upAndDownScale {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(1.3); }
  100% { transform: scaleY(1); }
}

/* Responsive Media Queries */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 90%;
  }

  .stage {
    padding: 15px;
    min-height: 250px;
    justify-content: center;
  }

  .bar {
    width: 14px !important;
  }
}

@media screen and (max-width: 480px) {
  .sidebar {
    font-size: 14px;
  }

  .stage {
    min-height: 200px;
  }

  .bar {
    width: 10px !important;
  }
}
