@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

:root {
  --bg-color: #131239;
  --text-color: #ffffff;
  --primary-color: #02a8ef;
  --header-color: #0f0f159e;
  --second-color: #020323;
  --second-color-shadow: #0d0f34d0;
  --stop-color: red;
  --start-color: rgb(1, 155, 11);
  --pause-color: rgb(96, 95, 95);
  --button-color: #7011f79e;
  --hover-color: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  width: 100%;
  background: linear-gradient(45deg, #1a4e86, #0a2756, #044d84, #1d75d4);
  background-size: 400% 400%;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: degrademov 12s ease-in-out infinite;
}

@keyframes degrademov {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

header {
  background-color: var(--header-color);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
  height: 55px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.title i {
  font-size: 2rem;
  color: white;
  margin: 0 20px;
}

.title {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#title{
font-family: 'Rubik', sans-serif;  
  font-style: italic;
  font-size: 2rem;
}

main {
  height: calc(100vh - 55px);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container {
  border: 3px solid #fff;
  background-color: var(--second-color);
  text-align: center;
  max-width: 800px;
  padding: 10px 0;
}

.timer {

  display: inline-block;
  padding: 10px;
  width: 600px;
  box-sizing: border-box;
}

.timer-info {
  width: 25rem;
  height: 25rem;
  border-radius: 50%;
  text-align: center;
  margin: 0 auto;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  margin: 20px auto;
}

.button-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.icons {
  display: none;
  font-size: 2rem;
}

.pomodoro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  margin: 2.5rem 0;
  text-align: center;
  border-radius: 50%;
  background: var(--bg-color);
  box-shadow: 10px 10px 21px rgba(117, 117, 117, 0.272),
    -10px -10px 21px #8a8a8a0e;
}

.pomodoro::before {
  content: "";
  position: absolute;
  border: 10px solid #fff;
  border-radius: 50%;
  width: 22rem;
  height: 22rem;
}

.time {
  font-size: 5rem !important;
  margin: 20px auto;
}

.button-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.button {
  background-color: var(--button-color);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in;
}

.button.active,
.button:hover {
  background-color: var(--hover-color);
  color: #020323;
  transform: scale(1.1);
}

.buttons i {
  font-size: 1.6rem;
  color: white;
}

.hidden {
  display: block;
}

.timer-display {
  font-size: 5rem;
  font-weight: bold;
}

.buttons {
    display: flex;
  align-items: center;
  justify-content: center;
}

#start,
#stop,
#pause,
#apply-times {
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in;
}

#stop:hover {
  background-color: var(--stop-color);
}

#start:hover {
  background-color: var(--start-color);
}

#pause:hover {
  background-color: var(--pause-color);
}

#apply-times{
    background-color: rgb(71, 71, 71);
}

#timer-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 0, 0, 0.8); /* cor sobreposta com transparência */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 9999; /* garantir que fique acima de tudo */
  pointer-events: none; /* não bloqueia cliques */
  opacity: 0;
  transition: opacity 0.3s ease;
}


.button:disabled,
.button.disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* Responsiveness */

@media screen and (min-width: 776px) and (max-width: 1300px) {
  .button-container,
  .buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .main {
    padding: 0 3%;
  }

  .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
  }

  .timer-info {
    margin: auto 0;
    width: 20rem;
    height: 20rem;
  }

  .pomodoro {
    margin: 0;
  }

  .pomodoro::before {
    width: 18rem;
    height: 18rem;
  }

  .timer {
    gap: 2rem;
    display: flex;
    width: 900px;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
  }

  .button-container {
    transform: scale(0.9);
    margin: auto 0;
  }

  .button {
    width: 150px;
    height: 90px;
    font-size: 1.2rem;
  }

  #long-break {
    font-size: 0.8rem;
  }
}

@media screen and (min-width: 375px) and (max-width: 775px) {
  .container,
  .button-container {
    transform: scale(0.9);
  }

  .pomodoro {
    transform: scale(0.7);
    margin: 0 auto;
  }

  .timer-info {
    width: 22rem;
    height: 22rem;
  }

  .timer {
    width: 375px;
  }
}

@media screen and (max-width: 374px) {
  .container {
    transform: scale(0.725);
  }

  .pomodoro,
  header h1 {
    transform: scale(0.8);
    margin: 0 auto;
  }

  .title i {
    margin: 0 10px;
  }

  .timer-info {
    width: 20rem;
    height: 20rem;
    margin-top: 35px;
  }

  .timer {
    width: 400px;
  }
}
