* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
}

:root {
    --tower-width: 20px;
    --tower-height: 200px;
    --disc-height: 22px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

h1 {
  color: var(--primary-color);
  font-size: 1.25em;
  margin-bottom: 5px;
  margin-top: 0;
}

.controls {
  margin-bottom: 20px;
}

#game-board {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 220px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.tower {
    width: var(--tower-width);
    height: var(--tower-height);
    background-color: #666;
    position: absolute;
    bottom: 0;
}

.tower::before {
    bottom: 0;
}

.disc {
  width: 100%;
  max-width: 200px;
  height: 30px;
  margin: 2px 0;
  border-radius: 15px;
  background-color: var(--tile-color);
  position: absolute;
}

#moveCounter, #timer {
  font-size: 18px;
  margin: 10px 0;
}

#message {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-top: 20px;
}

button {
  font-size: 16px;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--highlight-color);
}

select {
  font-size: 16px;
  margin-right: 10px;
  padding: 5px;
}

@media (max-width: 600px) {
  #game-board {
      max-width: 100%;
  }

  .tower {
      width: 15px;
  }

  .disc {
      max-width: 120px;
  }
}

@media (max-width: 430px) {
    :root {
        --tower-width: 12px;
        --tower-height: 180px;
        --disc-height: 20px;
        --max-disc-width: 120px
    }

    #discCount option[value="5"],
    #discCount option[value="6"] {
        display: none;
    }

    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.1em;
    }

    #game-board {
        height: 200px;
    }

    .tower {
        width: var(--tower-width);
    }

    .disc {
        max-width: 100px;
        height: var(--disc-height);
    }

    button {
        font-size: 14px;
        padding: 8px 16px;
    }

    select {
        font-size: 14px;
    }

    #moveCounter, #timer {
        font-size: 16px;
    }

    #message {
        font-size: 20px;
    }
}