* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  background: #ffe66d;
  min-height: 100vh;
  max-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

.container {
  background: #ffffff;
  border: 8px solid #000000;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 40px);
  box-shadow: 12px 12px 0px 0px #000000;
  transform: rotate(-1deg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.title {
  font-size: 48px;
  color: #000000;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 4px;
  text-transform: uppercase;
  transform: rotate(1deg);
  flex-shrink: 0;
}

.beat-display {
  text-align: center;
  margin-bottom: 50px;
  flex-shrink: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.beat-number {
  font-size: 120px;
  font-weight: 900;
  color: #000000;
  margin-bottom: 20px;
  transition: transform 0.1s ease, color 0.1s ease;
  text-shadow: 4px 4px 0px #ff6b6b;
  line-height: 1;
}

.beat-number.active {
  transform: scale(1.2) rotate(5deg);
  color: #ff6b6b;
}

.beat-indicator {
  width: 40px;
  height: 40px;
  border: 6px solid #000000;
  border-radius: 50%;
  margin: 0 auto;
  background: #ffffff;
  transition: all 0.1s ease;
  position: relative;
}

.beat-indicator.active {
  background: #ff6b6b;
  transform: scale(1.1);
  box-shadow: 0 0 0 20px rgba(255, 107, 107, 0.3);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex-shrink: 0;
}

.bpm-control {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.label {
  font-size: 24px;
  color: #000000;
  text-align: center;
  font-weight: bold;
}

#bpmValue {
  color: #ff6b6b;
  font-size: 32px;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: #ffffff;
  border: 4px solid #000000;
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  background: #ff6b6b;
  border: 4px solid #000000;
  cursor: pointer;
  box-shadow: 4px 4px 0px 0px #000000;
  transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 40px;
  height: 40px;
  background: #ff6b6b;
  border: 4px solid #000000;
  cursor: pointer;
  box-shadow: 4px 4px 0px 0px #000000;
  transition: transform 0.1s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.bpm-labels {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: bold;
  color: #000000;
}

.btn {
  padding: 20px 40px;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  border: 6px solid #000000;
  cursor: pointer;
  transition: all 0.1s ease;
  font-family: inherit;
  letter-spacing: 2px;
  transform: rotate(-1deg);
}

.btn:hover {
  transform: rotate(1deg) scale(1.05);
}

.btn:active {
  transform: rotate(0deg) scale(0.95);
  box-shadow: 4px 4px 0px 0px #000000;
}

.btn-primary {
  background: #4ecdc4;
  color: #000000;
  box-shadow: 8px 8px 0px 0px #000000;
}

.btn-primary.playing {
  background: #ff6b6b;
  box-shadow: 4px 4px 0px 0px #000000;
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .container {
    padding: 25px 20px;
    max-height: calc(100vh - 30px);
  }

  .title {
    font-size: 32px;
    margin-bottom: 25px;
    letter-spacing: 2px;
  }

  .beat-display {
    margin-bottom: 30px;
  }

  .beat-number {
    font-size: 90px;
    margin-bottom: 15px;
  }

  .controls {
    gap: 20px;
  }

  .label {
    font-size: 20px;
  }

  #bpmValue {
    font-size: 28px;
  }

  .btn {
    padding: 16px 32px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px 15px;
    max-height: calc(100vh - 20px);
    border-width: 6px;
    box-shadow: 8px 8px 0px 0px #000000;
  }

  .title {
    font-size: 24px;
    margin-bottom: 20px;
    letter-spacing: 1px;
  }

  .beat-display {
    margin-bottom: 25px;
  }

  .beat-number {
    font-size: 70px;
    margin-bottom: 12px;
  }

  .beat-indicator {
    border-width: 4px;
  }

  .beat-indicator.active {
    box-shadow: 0 0 0 15px rgba(255, 107, 107, 0.3);
  }

  .controls {
    gap: 18px;
  }

  .bpm-control {
    gap: 12px;
  }

  .label {
    font-size: 18px;
  }

  #bpmValue {
    font-size: 24px;
  }

  .slider {
    height: 16px;
    border-width: 3px;
  }

  .slider::-webkit-slider-thumb {
    width: 32px;
    height: 32px;
    border-width: 3px;
    box-shadow: 3px 3px 0px 0px #000000;
  }

  .slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-width: 3px;
    box-shadow: 3px 3px 0px 0px #000000;
  }

  .bpm-labels {
    font-size: 16px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 18px;
    border-width: 5px;
    letter-spacing: 1px;
  }

  .btn-primary {
    box-shadow: 6px 6px 0px 0px #000000;
  }
}

@media (max-height: 700px) {
  .container {
    padding: 25px 30px;
  }

  .title {
    font-size: 36px;
    margin-bottom: 25px;
  }

  .beat-display {
    margin-bottom: 30px;
  }

  .beat-number {
    font-size: 90px;
    margin-bottom: 15px;
  }

  .controls {
    gap: 20px;
  }
}
