*,
*:before,
*:after {
  box-sizing: inherit;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  height: 100%; /* Ensure html covers full height */
}

body {
  align-items: center;
  background: #f2f2f2; /* Slight grey tint */
  color: #212121;
  display: flex;
  flex-direction: column; /* Changed to column for better alignment */
  font-family: "Roboto", sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh; /* Ensure body covers full viewport height */
}

.container {
  display: flex;
  flex: 1; /* Ensure the container takes up the remaining space */
  height: 100%; /* Ensure container covers full height */
  width: 100%;
}

.sidebar {
  background: #222; /* Darker shade */
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;
  width: 250px;
  gap: 20px;
}

.divider {
  height: 1px;
  background: #555;
  margin: 10px 0;
}

.menu-header {
  font-size: 16px;
  font-weight: 500;
  color: #bbb;
  margin-bottom: 0px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
}

.menu-item {
  background: #444;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  padding: 15px;
  text-align: center;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.menu-item:hover {
  background: #555;
  transform: scale(1.05);
}

.menu-item:active {
  background: #222;
  transition: background 0.1s ease;
}

.menu-item.active-model {
  background: #3498db;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
  animation: pulseOnce 0.5s ease-out;
}

.main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.title {
  font-size: 32px;
  font-weight: 600;
  color: #3b3b3b;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Slight drop shadow */
}

.content {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.left-side,
.right-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.elevation {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.canvas {
  border-radius: 12px;
  margin-bottom: 20px;
  max-width: 100%;
  height: auto;
}

.button {
  background: #e74c3c;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 40px;
  text-align: center;
  transition: all 0.3s ease;
  user-select: none;
  width: 100%;
}

.button:hover {
  background: #c0392b;
  transform: scale(1.05);
}

.button:active {
  background: #a93226;
  transition: all 0.1s ease;
}

.github-button {
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center; /* Center the text and icon */
  font-size: 18px;
  font-weight: 500;
  padding: 15px;
  text-align: center;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: #000;
}

.github-button:hover {
  background: #eee;
  transform: scale(1.05);
}

.github-button:active {
  background: #ddd;
  transition: background 0.1s ease;
}

.github-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.github-button:hover .github-icon {
  transform: rotate(360deg);
}

.predictions-wrapper {
  width: 100%;
}

.predictions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.prediction-col {
  padding: 0 5px;
}

.prediction-bar-container {
  background: #e0e0e0;
  height: calc(100vh - 320px); /* Dynamic height calculation */
  max-height: 420px; /* Max height */
  width: 20px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.prediction-bar {
  background: #bdbdbd;
  bottom: 0;
  position: absolute;
  width: 100%;
  transition: height 0.3s ease;
}

.prediction-number {
  color: #616161;
  font-size: 16px;
  text-align: center;
  margin-top: 8px;
}

.top-prediction .prediction-bar {
  background: #66bb6a;
}

.top-prediction .prediction-number {
  color: #66bb6a;
  font-weight: bold;
}

@keyframes pulseOnce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .title {
    font-size: 28px;
  }

  .sidebar {
    width: 200px;
    padding: 15px;
  }

  .menu-item {
    font-size: 16px;
    padding: 12px;
  }

  .button {
    font-size: 14px;
    width: 100%;
  }
}

@media (max-width: 1089px) {
  .title {
    font-size: 24px;
  }

  .sidebar {
    width: 180px;
    padding: 10px;
  }

  .menu-item {
    font-size: 14px;
    padding: 10px;
  }

  .button {
    font-size: 12px;
    width: 100%;
  }

  .content {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .predictions-wrapper {
    width: 100%;
  }

  .predictions {
    width: 100%;
    justify-content: space-between;
  }

  .prediction-bar-container {
    width: calc(100% / 10 - 10px);
    min-width: 15px;
    height: calc(
      50vh - 320px
    ); /* Dynamic height calculation for smaller screens */
    max-height: 420px; /* Max height */
  }
}

@keyframes flash {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}
