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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a2332 0%, #2d3a4e 50%, #1e2835 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #e0e4e8;
  padding: 20px;
}

.container {
  background: #2a3441;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 900px;
  width: 100%;
  border: 1px solid rgba(100, 120, 150, 0.2);
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5em;
  color: #6b9bd1;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.signal-display {
  margin-bottom: 40px;
}

.signal-label {
  text-align: center;
  font-size: 1.2em;
  color: #a0b4c8;
  margin-bottom: 20px;
  font-weight: 500;
}

.signal-bars {
  margin-bottom: 30px;
  padding: 20px;
  background: #1e2835;
  border-radius: 10px;
  position: relative;
  border: 1px solid rgba(100, 120, 150, 0.3);
}

.signal-bar-container {
  width: 100%;
  height: 60px;
  background: #151a24;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(100, 120, 150, 0.2);
}

.signal-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  opacity: 1;
}

.signal-bar.weak {
  background: linear-gradient(to right, #ffffffd2, #ffffffd2);
  box-shadow: 0 0 12px rgba(74, 155, 110, 0.6);
}

.signal-bar.medium {
  background: linear-gradient(to right, #6b9bd1, #5a87b8);
  box-shadow: 0 0 12px rgba(107, 155, 209, 0.6);
}

.signal-bar.strong {
  background: linear-gradient(to right, #d17a7a, #b86565);
  box-shadow: 0 0 12px rgba(209, 122, 122, 0.6);
}

.controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.control-btn {
  width: 200px;
  height: 50px;
  padding: 0;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4a6fa5 0%, #3d5a8a 100%);
  color: #e0e4e8;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(100, 120, 150, 0.3);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 111, 165, 0.4);
  background: linear-gradient(135deg, #5a7fb5 0%, #4d6a9a 100%);
}

.control-btn:active {
  transform: translateY(0);
}

.calibration-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(74, 111, 165, 0.85);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.calibration-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.calibration-text {
  color: #e0e4e8;
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: 2px;
}

.additional-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.control-group {
  background: #1e2835;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(100, 120, 150, 0.2);
}

.control-group label {
  display: block;
  color: #a0b4c8;
  font-size: 0.9em;
  margin-bottom: 15px;
  font-weight: 500;
}

.knob-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.knob {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #151a24;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.knob::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6b9bd1;
  cursor: pointer;
  border: 2px solid #4a6fa5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.knob::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6b9bd1;
  cursor: pointer;
  border: 2px solid #4a6fa5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.knob-value {
  color: #6b9bd1;
  font-size: 1.2em;
  font-weight: 600;
}

.input-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  color: #a0b4c8;
  font-size: 0.9em;
  font-weight: 500;
}

.number-input {
  padding: 12px;
  background: #1e2835;
  border: 1px solid rgba(100, 120, 150, 0.3);
  border-radius: 6px;
  color: #e0e4e8;
  font-size: 1em;
  outline: none;
  transition: border-color 0.2s;
}

.number-input:focus {
  border-color: #6b9bd1;
  box-shadow: 0 0 8px rgba(107, 155, 209, 0.3);
}

.number-input::placeholder {
  color: #5a6a7a;
}

.button-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.misc-btn {
  padding: 12px 20px;
  background: #1e2835;
  border: 1px solid rgba(100, 120, 150, 0.3);
  border-radius: 6px;
  color: #a0b4c8;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.misc-btn:hover {
  background: #2a3441;
  border-color: #6b9bd1;
  color: #6b9bd1;
  transform: translateY(-1px);
}

.misc-btn:active {
  transform: translateY(0);
}
