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

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

#contenu {
  width: 100vw;
}

body {
  font-family: "Orbitron", monospace;
  background: #000;
  color: #00ff00;
  min-height: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

header{
  display: flex;
  align-items: center;
  height: 10vh;
  justify-content: space-between;
  padding: 24px;
  box-sizing: border-box;
  border-bottom: 1px solid #00ff00;

  > h1{
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    top: 25%;
  }

  > nav{
    display: flex;
    align-items: center;
    gap: calc(24px * 2);

    > a{
      text-decoration: none;
      color:#00ff00;
  
    }
  }
}

main{
  height: 100%;
  width: 100%;
  min-height: 0;
  display: flex;
  box-sizing: border-box;
}

#savedChrono{
  overflow: auto;
  height: 100%;
  width: 30%;
  padding: 24px;
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#contenu{
  height: 100%;
  width: 100%;
  display: flex;
}

.play-button{
  background-color: #00ff005b;
  border-color: #00ff00;
  color: #fff;
  border-radius: 4px;
  width: 70px;
}

#shooter{
  position: absolute;
  bottom: 7vh;
  left: 5vh;
  font-size: 100px;
}

#shooter.second{
  color: #0080ff;
}

#info{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.container {
  text-align: center;
  background: #111;
  border: 2px solid #00ff00;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 0 20px #00ff00, inset 0 0 20px rgba(0, 255, 0, 0.1);
  position: relative;
  transition: all 0.5s ease;
  width: 100%;

  > .time-display{
    width: 100%;
    height: 50vh !important;

    > .digital-grid{
      font-size: 220% !important;
    }
  }

  > section{
    width: 100%;
  }
}

.container.running {
  padding: 10px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  flex: 1;
}

.container.warning {
  border-color: #ff0000;
  box-shadow: 0 0 20px #ff0000, inset 0 0 20px rgba(255, 0, 0, 0.1);
  animation: pulse 0.5s infinite;
}

.container.preparation {
  border-color: #ff6600;
  box-shadow: 0 0 20px #ff6600, inset 0 0 20px rgba(255, 0, 0, 0.1);
  animation: pulse 0.5s infinite;
}

.container::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00ff00, #0080ff, #00ff00);
  border-radius: 15px;
  z-index: -1;
  animation: borderGlow 2s linear infinite;
  transition: all 0.5s ease;
}

.container.running::before {
  border-radius: 0;
}

.container.warning::before {
  background: linear-gradient(45deg, #ff0000, #ff6600, #ff0000);
}

.container.preparation::before {
  background: linear-gradient(45deg, #ff6600, #ff0000, #ff6600);
}

@keyframes borderGlow {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(180deg);
  }
}

h1 {
  color: #00ff00;
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  text-shadow: 0 0 10px #00ff00;
  letter-spacing: 3px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.container.running h1 {
  opacity: 0;
  transform: translateY(-20px);
  margin-bottom: 0;
  height: 0;
}

.display {
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 900;
  margin: 30px 0;
  text-shadow: 0 0 20px currentColor;
  letter-spacing: 5px;
  font-family: "Orbitron", monospace;
  min-height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.container.running .display {
  font-size: clamp(4rem, 15vw, 12rem);
  margin: 20px 0;
  letter-spacing: clamp(2px, 1vw, 10px);
}

.time-display {
  color: #00ff00;
  transition: color 0.3s ease;
}

.time-display.warning {
  color: #ff0000;
  /* animation: pulse 0.5s infinite; */
}

.time-display.preparation {
  color: #ff6600;
  /* animation: pulse 0.5s infinite; */
}

.pause-display {
  color: #ff6600;
  /* animation: pulse 1s infinite; */
}

.finished {
  color: #ff0066;
  animation: flash 0.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes flash {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.controls {
  margin: 30px 0;
  transition: all 0.5s ease;
}

.container.running .controls {
  margin: 10px 0;
}

.config-controls {
  display: block;
}

.running-controls {
  display: none;
}

.controls.running .config-controls {
  display: none;
}

.controls.running .running-controls {
  display: block;
}

.btn {
  background: linear-gradient(145deg, #1a1a1a, #000);
  border: 2px solid #00ff00;
  color: #00ff00;
  padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 25px);
  margin: 8px;
  border-radius: 8px;
  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: clamp(0.8rem, 2vw, 1rem);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 100px;
}

.container.running .btn {
  font-size: clamp(1rem, 3vw, 1.5rem);
  padding: clamp(15px, 3vw, 20px) clamp(30px, 5vw, 40px);
  min-width: clamp(120px, 20vw, 150px);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 0, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  box-shadow: 0 0 15px #00ff00;
  transform: translateY(-2px);
}

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

.btn.start {
  border-color: #00ff00;
  color: #00ff00;
}

.btn.pause {
  border-color: #ff6600;
  color: #ff6600;
}

.btn.stop {
  border-color: #ff0066;
  color: #ff0066;
}

.status {
  margin: 15px 0;
  text-transform: lowercase;
  letter-spacing: 2px;
  transition: all 0.5s ease;
}

.container.running .status {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin: 10px 0;
}

.status.active {
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
}

.status.waited,
.status.paused {
  color: #ff6600;
  text-shadow: 0 0 10px #ff6600;
}

.status.finished {
  color: #ff0066;
  text-shadow: 0 0 10px #ff0066;
}

.progress-info {
  margin: 15px 0;
  color: #00ffff;
  font-weight: 700;
  transition: all 0.5s ease;
}

.container.running .progress-info {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin: 10px 0;
}

.progress-bar {
  width: 100%;
  height: clamp(6px, 1.5vw, 8px);
  background: #333;
  border-radius: 4px;
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid #00ff00;
}

.container.running .progress-bar {
  height: clamp(8px, 2vw, 12px);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff00, #00ffff);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px #00ff00;
}

.digital-grid {
  display: inline-block;
  position: relative;
}

.digit {
  display: inline-block;
  width: 1ch;
  text-align: center;
}

.separator {
  color: #00ff00;
  animation: blink 1s infinite;
}

#insert-form{
  height: auto;
  display: flex;
  gap: 20vw;
  padding: 16px;

  > :first-child{
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
}

.input-group {
 position: relative;
}

.input {
  min-width: 27vw;
 border: solid 1.5px #00ff00;
 border-radius: 8px;
 background: none;
 padding: 8px;
 font-size: 1rem;
 color: #00ff00;
 transition: border 150ms cubic-bezier(0.4,0,0.2,1);
}

.user-label {
 position: absolute;
 left: 15px;
 color: #00ff005b;
 pointer-events: none;
 transform: translateY(8px);
 transition: 150ms cubic-bezier(0.4,0,0.2,1);
}

.input:focus, input:valid {
 outline: none;
 border: 1.5px solid #00ff00;
}

.input:focus ~ label, input:valid ~ label {
 transform: translateY(-50%) scale(0.8);
 background-color: #212121;
 padding: 0 .2em;
 color: #00ff00;
}

.radio-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: 8px;
}

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

.radio-input label {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0px 20px;
  width: 220px;
  cursor: pointer;
  height: 50px;
  position: relative;
}

.radio-input label::before {
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 45px;
  z-index: -1;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 10px;
  border: 2px solid transparent;
}
.radio-input label:hover::before {
  transition: all 0.2s ease;
  background-color: #2a2e3c;
}

.radio-input .label:has(input:checked)::before {
  background-color: #00ff005b;
  border-color: #00ff00;
  height: 50px;
}
.radio-input .label .text {
  color: #fff;
}

.radio-input .label input[type="radio"] {
  background-color: #202030;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.radio-input .label input[type="radio"]:checked {
  background-color: #00ff00;
}

.radio-input .label input[type="radio"]:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: all 0.1s cubic-bezier(0.165, 0.84, 0.44, 1);
  background-color: #fff;
  transform: scale(0);
}

.radio-input .label input[type="radio"]:checked::before {
  transform: scale(1);
}

.form-button {
  border: 1px solid #00ff00;
  color: #00ff00;
  background-color: black;
  width: 120px;
  height: 40px;
  border-radius: 8px;
}

.form-button:hover{
  background-color: #00ff005b;
}






@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.3;
  }
}

/* Media queries pour une meilleure responsivité */
@media (max-width: 768px) {
  .input-row {
    gap: 10px;
  }

  .input-group {
    min-width: 70px;
  }

  .container.running {
    padding: 5px;
  }
}

@media (max-width: 480px) {
  .input-row {
    flex-direction: column;
    align-items: center;
  }

  .input-group {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    max-width: 200px;
  }

  .input-group label {
    min-width: 80px;
    text-align: left;
  }
}

@media (orientation: landscape) and (max-height: 768px) {
  .container.running {
    padding: 5px;
  }

  .container.running .display {
    font-size: clamp(3rem, 12vh, 8rem);
  }

  .btn{
    min-width: 0px !important;
    width: 100px !important;
    height: 40px;
    font-size: 16px !important;
    padding: 0px !important;
  }

  h1{
    position: relative;
    top: 8px !important;
  }
}
