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

body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: radial-gradient(circle, #0a0a0a, #000);
  overflow: hidden;
  position: relative;
}

/* Particle background */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url(image/sp.gif) no-repeat center/cover;
  opacity: 0.1;
  z-index: -2;
  filter: blur(3px);
}

.particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  pointer-events: none;
}

/* Stopwatch container */
.stopwatch-container {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1c1c1c, #0e0e0e);
  border: 18px solid transparent;
  background-clip: padding-box;
  box-shadow: 
    0 0 60px rgba(0, 255, 255, 0.4),
    inset 0 0 35px rgba(0, 255, 255, 0.25),
    0 25px 50px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 35px;
  position: relative;
  animation: pulse 4s infinite alternate;
}

/* Glowing bezel with markers */
.stopwatch-container::before {
  content: '';
  position: absolute;
  top: -18px; left: -18px; right: -18px; bottom: -18px;
  border-radius: 50%;
  background: conic-gradient(
    #00faff 0deg 50deg,
    transparent 50deg 100deg,
    #0f0 100deg 150deg,
    transparent 150deg 200deg,
    #00faff 200deg 250deg,
    transparent 250deg 300deg,
    #0f0 300deg 360deg
  );
  filter: blur(10px);
  animation: rotate 8s linear infinite;
  z-index: -1;
}

/* Bezel markers */
.bezel-markers {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
}
.marker {
  position: absolute;
  width: 8px;
  height: 20px;
  background: #00faff;
  border-radius: 4px;
  box-shadow: 0 0 15px #00faff;
  transform-origin: center 190px;
}
.marker:nth-child(1) { transform: rotate(0deg) translateY(-190px); }
.marker:nth-child(2) { transform: rotate(30deg) translateY(-190px); }
.marker:nth-child(3) { transform: rotate(60deg) translateY(-190px); }
.marker:nth-child(4) { transform: rotate(90deg) translateY(-190px); }
.marker:nth-child(5) { transform: rotate(120deg) translateY(-190px); }
.marker:nth-child(6) { transform: rotate(150deg) translateY(-190px); }
.marker:nth-child(7) { transform: rotate(180deg) translateY(-190px); }
.marker:nth-child(8) { transform: rotate(210deg) translateY(-190px); }
.marker:nth-child(9) { transform: rotate(240deg) translateY(-190px); }
.marker:nth-child(10) { transform: rotate(270deg) translateY(-190px); }
.marker:nth-child(11) { transform: rotate(300deg) translateY(-190px); }
.marker:nth-child(12) { transform: rotate(330deg) translateY(-190px); }

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  from { box-shadow: 0 0 40px rgba(0, 255, 255, 0.6), inset 0 0 30px rgba(0, 255, 255, 0.3); }
  to { box-shadow: 0 0 80px rgba(0, 255, 255, 0.9), inset 0 0 50px rgba(0, 255, 255, 0.5); }
}

/* Holographic LCD Display */
.display {
  width: 90%;
  padding: 25px;
  border-radius: 22px;
  background: linear-gradient(145deg, #0a0a0a, #000);
  color: #8be2e3;
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 6px;
  text-align: center;
  box-shadow: 
    inset 0 0 30px rgba(0, 255, 255, 0.4),
    0 0 50px rgba(0, 255, 255, 0.25);
  position: relative;
  text-shadow: 
    0 0 10px #54d4d6,
    0 0 20px #60d3d5,
    0 0 30px #29d9dc;
  transition: all 0.3s ease;
  z-index: 1;
}

/* Holographic effect */
.display::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.15), transparent 70%);
  opacity: 0.8;
  pointer-events: none;
  animation: hologram 5s infinite;
}

@keyframes hologram {
  0%, 18%, 22%, 24%, 52%, 54%, 100% { opacity: 0.8; }
  19%, 23%, 53% { opacity: 0.4; }
}

/* Label */
.label {
  position: absolute;
  top: -15px;
  font-size: 2rem;
  font-weight: 900;
  color: transparent;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow: 
    0 0 10px #00faff,
    0 0 20px #00faff,
    0 0 30px #00faff;
  background: linear-gradient(45deg, #00faff, #0f0);
  -webkit-background-clip: text;
  background-clip: text;
  transform: perspective(500px) rotateX(25deg);
}

/* Buttons */
.buttons {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-top: 25px;
  gap: 12px;
}

.btn {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  border: 3px solid #00faff;
  background: linear-gradient(145deg, #1c1c1c, #0e0e0e);
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.7),
    inset 0 0 20px rgba(0, 255, 255, 0.4);
  color: #00faff;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.5), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::after { opacity: 1; }
.btn:hover {
  background: #00faff;
  color: #0a0a0a;
  box-shadow: 
    0 0 40px #00faff,
    inset 0 0 20px #00faff;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 
    0 5px 12px rgba(0, 0, 0, 0.7),
    inset 0 0 25px #00faff;
}

/* Laps */
.laps {
  margin-top: 25px;
  width: 100%;
  max-height: 130px;
  overflow-y: auto;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.3);
}

.lap {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #00faff;
  padding: 8px 0;
  transition: all 0.3s ease;
}

.lap.fastest { color: #0f0; font-weight: 700; text-shadow: 0 0 12px #0f0; }
.lap.slowest { color: #ff4040; font-weight: 700; text-shadow: 0 0 12px #ff4040; }

/* Scrollbar styling */
.laps::-webkit-scrollbar {
  width: 10px;
}
.laps::-webkit-scrollbar-track {
  background: #0a0a0a;
  border-radius: 12px;
}
.laps::-webkit-scrollbar-thumb {
  background: #00faff;
  border-radius: 12px;
  box-shadow: 0 0 12px #00faff;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: #00faff;
  text-shadow: 0 0 8px #00faff;
  letter-spacing: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
  padding: 10px 0;
  z-index: 10;
}
.footer a {
  color: #0f0;
  text-decoration: none;
  font-weight: 700;
}
.footer a:hover {
  text-shadow: 0 0 12px #0f0;
}

/* Mobile Responsive Styles */
@media (max-width: 500px) {
  .stopwatch-container {
    width: 80vw;
    height: 80vw;
    padding: 20px;
    border-width: 12px;
  }

  .display {
    font-size: 2.8rem;
    padding: 18px;
  }

  .label {
    font-size: 1.5rem;
    top: -10px;
  }

  .buttons {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .btn {
    width: 65px;
    height: 65px;
    font-size: 1rem;
  }

  .laps {
    max-height: 100px;
    font-size: 0.9rem;
  }

  .footer {
    font-size: 0.8rem;
    padding: 8px 0;
  }
}
