@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nata+Sans:wght@100..900&display=swap');

body {
  font-family: 'Share Tech Mono', monospace; 
  background-image: url("playground-kids.jpg"), radial-gradient(circle at center, #1A2A80, skyblue);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-attachment: fixed;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  margin: 0; 
  overflow-x: hidden;
  position: relative;
}

.bckhome {
  background-color: rgba(0,0,0,.7); 
  border: 1px solid white; 
  border-top: none; 
  width: 110px; 
  height: 28px; 
  display: block; 
  position: absolute; 
  top: 0; 
  margin-left: auto; 
  margin-right: auto; 
  left: 0; 
  right: 0; 
  z-index: 33; 
  text-align: center; 
  padding-top: 0;
}

@media(max-width:992px) {
  body {
    font-family: 'Share Tech Mono', monospace; 
    background-image: url("playground-kids.jpg"), radial-gradient(circle at center, #1A2A80, skyblue);
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover, 100%; 
    background-attachment: fixed;   
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    margin: 0; 
    overflow-x: hidden;
    position: relative;
  }

  .controls {
    text-align: center;
    margin-bottom: 60px;
    display: none;
    margin-top: 475px !important;
  }

  .controlsNew {
    text-align: center;
    margin-bottom: 60px;
    display: none;
    margin-top: 490px !important;
  }

  .bckhome {
    background-color: rgba(0,0,0,.7); 
    border: 1px solid white; 
    border-top: none; 
    width: 110px; 
    height: 28px; 
    display: block; 
    position: absolute; 
    top: 0; 
    margin-left: auto; 
    margin-right: auto; 
    left: 0; 
    right: 0; 
    z-index: 33; 
    text-align: center; 
    padding-top: 0;
    margin-bottom: 60px;
  }

  #uputstvo {
    display: none;
  }

  .clock {
    position: absolute;
    margin-top: -20px;
    width: 400px;
    height: 400px;
    border: 6px solid #444;
    border-radius: 50%;
    background: radial-gradient(circle at center, #2a2a2a, #111);
    box-shadow: inset 0 0 20px #000;
    margin-bottom: 30px;
    background-image: url("kids-tell-time-mobile.png") !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  #digitalTime {
    margin-top: 20px !important;    
  }

  #score {
    position: fixed;
    left: 0;
    top: 23px !important;
    text-align: center;
    display: inline;
  }
}

.clock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock {
  position: absolute;
  top: 55px;
  width: 400px;
  height: 400px;
  border: 6px solid #444;
  border-radius: 50%;
  background: radial-gradient(circle at center, #2a2a2a, #111);
  box-shadow: inset 0 0 20px #000;
  margin-bottom: 30px;
  background-image: url("kids-tell-time.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.center-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  background: #000;
  border-radius: 50%;
  border: 2px dashed #7A7A73;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.number {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 500;
  color: #ccc;
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
}

.hand {
  position: absolute;  
  top: 50%;
  left: 50%;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 2px;
}

.hour-hand {
  height: 90px;
  background: #FFC900;
  z-index: 2;
  width: 9px;
}

.minute-hand {
  height: 140px;
  background: #BB6653;  
  z-index: 1;
  width: 5px;
}

.hand:hover {
  background: #ccc;
}

.digital-time {
  font-size: 32px;
  margin-bottom: 15px;
  color: #15062d;
  font-weight: 500;
  position: relative;
  top: -20px;
  background-color: #f6f6f6;
  border-radius: 6px;
  border: 1px solid #15062d;
  padding: 3px;
}

.controls {
  text-align: center;
  margin-top: 10px;
  display: none;
  margin-top: 460px;
}

.controlsNew {
  text-align: center;
  margin-top: 10px;
  display: none;
  margin-top: 460px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  background: #222;
  color: #3399ff;
  border: 2px solid #3399ff;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 10px #3399ff;
  transition: background 0.3s, transform 0.2s;
}

#generateTimeNew {  
  margin-top: 115px;
}

input:focus {
  outline: none;
  border: none;
  box-shadow: 0 0 10px #3399ff;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: #3399ff;
  color: #000;
  transform: scale(1.05);
}

#feedback {
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 18px;
  font-family: "Nata Sans", sans-serif;
  font-weight: normal;
  color: #D6D85D;
  text-shadow: 0 0 5px #D6D85D;
  animation: fadeIn 0.5s ease;  
  width: 300px;
  height: 26px;
  padding: 4px;
}

#feedbackNew {
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 18px;
  font-family: "Nata Sans", sans-serif;
  font-weight: normal;
  color: #D6D85D;
  text-shadow: 0 0 5px #D6D85D;
  animation: fadeIn 0.5s ease;  
  width: 390px;
  height: 26px;
  padding: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.minute-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #666;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.minute-dot:nth-child(5n) {
  width: 6px;
  height: 6px;
  background: #999;
}

.hand-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform-origin: bottom center;
  z-index: 4;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.hour-dot {
  background: radial-gradient(circle, #666, #222);
}

.minute-dot {
  background: radial-gradient(circle, #999, #333);
}

/* Optional: dotted line effect using pseudo-elements */
.hand-dot::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background-image: linear-gradient(to top, #aaa 20%, transparent 20%);
  background-size: 2px 6px;
  background-repeat: repeat-y;
  opacity: 0.6;
}

#uputstvo {
  position: absolute;
  right: 0;
  top: 0;
  width: 34%;
  height: 170px;
  background: rgba(255,180,180,0.5);
  border-radius: 12px;
  border: 3px solid #BA487F;
  color: white;
  padding: 9px 9px 9px 12px;
  font-size: 16px;
  overflow: auto;
}

.fade-in-right {
	-webkit-animation: fade-in-right 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) 1s both;
	        animation: fade-in-right 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) 1s both;
}

@-webkit-keyframes fade-in-right {
  0% {
    -webkit-transform: translateX(50px);
            transform: translateX(50px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fade-in-right {
  0% {
    -webkit-transform: translateX(50px);
            transform: translateX(50px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
    opacity: 1;
  }
}

#score {
  position: fixed;
  left: 0;
  top: 170px;
  text-align: center;
  display: inline;
}

#score img {
  width: 82px;
  height: auto;
}

#score p {
  color: white;
  font-size: 22px;
  font-family: "Nata Sans", sans-serif;
  position: relative;
  top: -122px;
}

#scoretacno {
  margin-left: 16px;
}

.fade-in-left {
  -webkit-animation: fade-in-left 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) 0.1s both;
  animation: fade-in-left 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) 0.1s both;
}

@-webkit-keyframes fade-in-left {
  0% {
    -webkit-transform: translateX(-50px);
    transform: translateX(-50px);
    opacity: 0;
  }

  100% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1;
  }

}

@keyframes fade-in-left {
  0% {
    -webkit-transform: translateX(-50px);
    transform: translateX(-50px);
    opacity: 0;
  }

  100% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1;
  }

}

.container {
  display: flex;
  gap: 20px;
  margin-top: 470px;
}

.box {
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  border: 2px solid #333;
  border-radius: 10px;
}

#box1 {
  background-color: #FFCC00;
}

#box2 {
  background-color: #B13BFF;
}

.box:hover {
  cursor: pointer;
  background-color: #000 !important;
}

#box1 {
  transition: transform 0.2s ease;
}

#box2 {
  transition: transform 0.2s ease;
}





















