* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #1e1e2f;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 85vh;
  overflow: hidden;
}
.container {
  background-color: #2b2b3d;
  padding: 2rem;
  border-radius: 15px;
  width: 95%;
  max-width: 500px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  text-align: center;
  opacity: 0.8;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.top-bar button,
.top-bar label {
  background-color: #3c3c4f;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
}
.top-bar button.active {
  background-color: #4267e8;
}
.spacer {
  flex: 1;
}
.time-display {
  font-size: 4rem;
  font-weight: bold;
  padding: 1rem 0;
  cursor: text;
  border-bottom: 2px solid #555;
}
.adjustments,
#cronometroExtras {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.adjustments button {
  background-color: #3c3c4f;
  border: none;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 15px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s;
}
.adjustments button:hover {
  background-color: #505073;
}
.big-button {
  width: 100%;
  font-size: 1.5rem;
  padding: 0.8rem;
  background-color: #7ca3ff;
  color: white;
  border: none;
  border-radius: 20px;
  margin: 1rem 0;
  cursor: pointer;
}
.config {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.config label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
input[type="color"] {
  cursor: pointer;
}
.hidden {
  display: none !important;
}

.adjustments {
  flex-direction: column;
}

.adjustments .row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#countdownTime {
  width: 30px;
  padding: 0.3rem;
  font-size: 1rem;
  text-align: center;
}

.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background-color: #4CAF50;
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

#buttonGroup {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

#buttonGroup .big-button {
  flex: 1;
}

#restartTimer {
  background-color: #ff9800 !important;
}
.history-container {
  text-align: center;
  margin-bottom: 10px;
  margin-top: 10px;
}
.history-btn {
  background-color: #3c3c4f;
  border: none;
  color: white;
  padding: 0.4rem 0.5rem;
  margin: 0.1rem;
  border-radius: 15px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.3s;
}
.history-btn:hover {
  background-color: #505073;
}

.history-label {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
}

.save-toggle-container span {
  text-align: center;
  font-size: 14px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-icon {
  display: inline-block;
  animation: spin 1s linear infinite;
  height: 20px;
}

.preencher {
  height: 90px;
}
