html, body {
  overscroll-behavior-y: none;
  touch-action: manipulation;
}

.clock-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 2rem auto;
}

.clock-frame {
  width: 100%;
  height: auto;
  display: block;
}

.time-input::placeholder {
  font-size: 0.7rem;
  font-style: italic;
  color: #d6d2d2; /* optional: helleres Grau für bessere Lesbarkeit */
}


.clock-display {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Courier New', monospace;
  font-size: 4rem;
  color: #00ff00;
  padding: 0.4rem 1rem;
  text-shadow: 0 0 6px #0f0;
}

#arrows {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  margin: 1.5rem auto;
}

#arrows > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.arrow-button {
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.arrow-button:hover {
  background-color: #005fa3;
}

.target-time-container {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.target-time-instruction {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.spanish-time-button {
  font-size: 1.2rem;
  padding: 0.6rem 1.2rem;
  background-color: #f9f871;
  border: 2px solid #ccc;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}
/* Für Button */
.success, .clock-success {
  background-color: #c8f7c5 !important; /* Pastellgrün */
  color: #1e4620;
  border: 2px solid #3ebd58;
  animation: fadeFeedback 1.2s ease-out;
}

.error, .clock-error {
  background-color: #f8c8c8 !important; /* Pastellrot */
  color: #702020;
  border: 2px solid #e07070;
  animation: shakeFeedback 0.5s ease-in-out;
}

.clock-error {
  animation: shakeInside 0.4s ease-in-out;
}
/* Uhr-Anzeige einfärben */
#clock.clock-success {
  box-shadow: 0 0 12px #a8e6a1;
}

#clock.clock-error {
  box-shadow: 0 0 12px #f3a8a8;
}

/* Animationen */
@keyframes fadeFeedback {
  0% { opacity: 1; }
  100% { opacity: 1; } /* Sichtbar bleiben */
}

@keyframes shakeFeedback {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  animation: fadeIn 0.4s ease;
}

.time-input {
  width: 80%;
  max-width: 320px;
  padding: 10px;
  font-size: 1.1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  text-align: center;
}

.ok-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  margin-top: 10px;
  width: 220px;
  max-width: 90%;
  border-radius: 15px;
  color: #292929;
  background-color: transparent;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  border: 1px solid #22753a;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.ok-button:hover {
  background-color: #4acb73c0;
  transform: translateY(-3px);
}

.ok-button:active {
  transform: translateY(0);
  background-color: #40b868c0;
}



.feedback-message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #2e7d32; /* grünlich – für Erfolg */
  margin-top: 10px;
  min-height: 1.5em;
  transition: opacity 0.3s ease-in-out;
}


.time-input.success {
  border-color: #48bb78; /* Grün */
  background-color: #f0fff4;
}

.time-input.error {
  border-color: #f56565; /* Rot */
  background-color: #fff5f5;
}

.time-input.tolerance {
  background-color: #ffe07a; /* sanftes Gelb */
  border: 1px solid #ffeeba;
  color: #856404;
  transition: all 0.3s ease;
}



@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.wheel-picker-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.wheel {
  position: relative;
  width: 60px;
  height: 150px; /* Höhe für 3 sichtbare Elemente à 50px */
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(to bottom, #f0f0f0, #ffffff);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
  touch-action: none;
  overscroll-behavior: contain;
}

.wheel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  transition: transform 0.3s ease-out;
}

.wheel-item {
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 1.4rem;
  opacity: 0.4;
  transition: opacity 0.2s, font-weight 0.2s;
}

.wheel-item.selected {
  font-weight: bold;
  opacity: 1;
}


.highlight {
  position: absolute;
  top: 50px; /* mittleres von 3 */
  height: 50px;
  width: 100%;
  background: rgba(180, 200, 255, 0.3); /* Blauer iOS-Effekt */
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  pointer-events: none;
}

.wheel::before,
.wheel::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 25%;
  z-index: 1;
  pointer-events: none;
}

.wheel::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.wheel::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.countdown {
  display: none;
  text-align: center;
  font-size: 1.4rem;
  margin-top: 1.5rem;
  font-weight: bold;
  color: #333;
}


/* Bereits bestehende Klasse (ab Sekunde 5 aktiviert) */
.countdown-intense {
  color: #d80032; /* dunkleres Rot für Spannung */
  font-weight: bold;
  animation: pulse-countdown 1s infinite;
}

/* Neue Animation */
@keyframes pulse-countdown {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .clock-display {
    font-size: 3.4rem;
  }
}

@media (max-width: 480px) {
  
    .clock-display {
    font-size: 2.8rem;
    padding: 0.2rem 0.8rem;
  }
}
    #arrows {
    gap: 1.2rem;
  }

  .arrow-button {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

@media (prefers-color-scheme: dark) {
  body:not(.lightMode) {
    background-color: #1b1b1b;
    color: #e0e0e0;
  }

  body:not(.lightMode) .clock-display {
    color: #00ff99;
    text-shadow: 0 0 8px #0f0;
  }

  body:not(.lightMode) .arrow-button {
    background-color: #0077cc;
    color: white;
  }

  body:not(.lightMode) .arrow-button:hover {
    background-color: #3399ff;
  }

  body:not(.lightMode) .target-time-instruction {
    color: #ddd;
  }

  body:not(.lightMode) .spanish-time-button {
    background-color: #333;
    color: #fffecb;
    border-color: #555;
  }

  body:not(.lightMode) .success, 
  body:not(.lightMode) .clock-success {
    background-color: #2e7d32 !important;
    color: #c8f7c5;
    border-color: #60d56b;
  }

  body:not(.lightMode) .error, 
  body:not(.lightMode) .clock-error {
    background-color: #8e2d2d !important;
    color: #fbcaca;
    border-color: #e07070;
  }

  body:not(.lightMode) .feedback-message {
    color: #90ee90;
  }

  body:not(.lightMode) .time-input {
    background-color: #2b2b2b;
    color: #eee;
    border-color: #555;
  }

  body:not(.lightMode) .time-input::placeholder {
    color: #999;
  }

  body:not(.lightMode) .time-input.success {
    background-color: #1d3f1d;
    border-color: #60d56b;
    color: #b5f7c5;
  }

  body:not(.lightMode) .time-input.error {
    background-color: #3f1d1d;
    border-color: #e07070;
    color: #fbcaca;
  }

  body:not(.lightMode) .time-input.tolerance {
    background-color: #665500;
    border-color: #ddc85a;
    color: #f5e99b;
  }

  body:not(.lightMode) .ok-button {
    background-color: #2a2a2a;
    color: #d2f8d2;
    border-color: #4caf50;
  }

  body:not(.lightMode) .ok-button:hover {
    background-color: #4acb73c0;
  }

  body:not(.lightMode) .highlight {
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
  }

  body:not(.lightMode) .wheel {
    background: linear-gradient(to bottom, #2a2a2a, #1c1c1c);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
  }

  body:not(.lightMode) .wheel-item {
    color: #eee;
  }

  body:not(.lightMode) .countdown {
    color: #cccccc;
  }

  body:not(.lightMode) .countdown-intense {
    color: #ff5f5f;
  }
}
