@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

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

body {
  background-color: #346ba7;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  transition: background-color 0.3s ease;
}

main {
  width: 30rem;
  min-height: 90vh;
  border: 2px solid #fff;
  border-radius: 1rem 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin: auto;
  margin-top: 2rem;
  padding: 1rem 2rem 2rem 2rem;
  background-color: rgba(255 255 255 / 0.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Título com indicação visual */
h1 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

/* Estados do cronômetro no título */
body.running h1 {
  color: #4caf50; /* verde */
}

body.paused h1 {
  color: #ffc107; /* amarelo */
}

body.stopped h1 {
  color: #e53935; /* vermelho */
}

/* Remove setinhas dos inputs number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

input {
  outline: none;
  padding: 1rem;
  text-align: center;
  font-size: 18px;
  border-radius: 12px;
  border: none;
  width: 5rem;
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
  background-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.5);
}

.ipt-container {
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.btn-menu {
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

button {
  padding: 1.2rem 1.3rem;
  border-radius: 50%;
  border: none;
  background-color: #5d9b9b9c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.25);
}

button:hover {
  cursor: pointer;
  background-color: #72bdbd9c;
  transform: scale(1.1);
}

button:active {
  transform: scale(0.95);
}

button i {
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

button .fa-play {
  color: #08f108;
}
button .fa-pause {
  color: #584f4f;
}
button .fa-arrow-rotate-left {
  color: #e53935;
}
button .fa-expand {
  color: #222;
}
button .fa-flag-checkered {
  color: gold;
}

body.fullscreen-mode input {
  font-size: 32px;
}

body.fullscreen-mode h1 {
  font-size: 2.5rem;
}

/* Container das voltas */
.laps-container {
  width: 100%;
  max-width: 26rem;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  color: #f0f0f0;
  overflow-y: auto;
  max-height: 180px;
  box-shadow: inset 0 0 10px rgb(0 0 0 / 0.3);
}

.laps-container h2 {
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  text-align: center;
  border-bottom: 1px solid #ccc7;
  padding-bottom: 0.3rem;
}

#lapsList {
  list-style-type: decimal;
  padding-left: 1.25rem;
  font-size: 1rem;
}

#lapsList li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #ffffff33;
}

/* Responsividade */
@media (max-width: 768px) {
  main {
    width: 90%;
    min-height: auto;
    padding: 1rem;
    border-radius: 1rem;
  }

  .ipt-container {
    flex-direction: column;
    gap: 1rem;
  }

  input {
    width: 100%;
    max-width: 6rem;
    font-size: 1.5rem;
  }

  h1 {
    font-size: 2rem;
    text-align: center;
  }

  .btn-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  button {
    padding: 0.9rem 1rem;
  }

  button i {
    font-size: 1.25rem;
  }

  .laps-container {
    max-width: 100%;
    max-height: 150px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem;
  }

  .ipt-container input {
    font-size: 1.2rem;
    max-width: 5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  button {
    padding: 0.7rem 0.8rem;
  }

  button i {
    font-size: 1rem;
  }

  .laps-container {
    max-height: 130px;
  }
}
