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

body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  overflow-x: hidden;
  transition: background 1s ease;
  background: radial-gradient(circle at center, #0f172a, #1e293b, #334155);
  color: #fff;
}

header {
  text-align: center;
  font-size: 28px;
  padding: 20px;
  background: #0f172a;
  box-shadow: 0 2px 10px royalblue;
}

nav {
  text-align: center;
  margin: 20px 0;
}

nav button {
  margin: 0 8px;
  padding: 10px 18px;
  font-size: 16px;
  background: #00bfff;
  color: #000;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 10px #00bfff;
  font-weight: bold;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

/* Themes */
.theme-default {
  background: radial-gradient(circle at center, pink, powderblue, grey);
}

.theme-stars {
  background: #000022;
  background-image: radial-gradient(#0ff 1px, transparent 1px),
                    radial-gradient(#0ff 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  animation: starsMove 15s linear infinite;
}

@keyframes starsMove {
  from { background-position: 0 0, 20px 20px; }
  to { background-position: 1000px 1000px, 1020px 1020px; }
}

.theme-cyber {
  background: linear-gradient(-45deg, #1e3a8a, #2563eb, #0ea5e9, #38bdf8);
  background-size: 400% 400%;
  animation: cyberMove 10s ease infinite;
}

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

/* Stopwatch UI */
.task-entry,
.lap-config {
  text-align: center;
  margin: 20px 0;
}

.task-entry input,
.lap-config input {
  padding: 10px;
  font-size: 16px;
  width: 220px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 0 10px royalblue;
  background: #f0fcff;
  color: #000;
}

.flip-clock {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 30px 0;
}

.digit {
  background: #001f3f;
  color: #0ff;
  font-size: 48px;
  width: 70px;
  height: 100px;
  border-radius: 10px;
  box-shadow: 0 0 15px #0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s;
}

.digit.flip {
  animation: flipDigit 0.5s ease;
}

@keyframes flipDigit {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0deg); }
}

.colon {
  font-size: 50px;
  color: #0ff;
}

.controls {
  text-align: center;
}

.controls button {
  background: #00bfff;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  margin: 8px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 10px #00bfff;
  transition: transform 0.2s;
}

.controls button:hover {
  transform: scale(1.1);
}

.theme-switcher {
  position: absolute;
  top: 15px;
  left: 15px;
}

.theme-switcher button {
  margin: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-weight: bold;
}

.laps {
  max-width: 500px;
  margin: 20px auto;
  padding: 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  box-shadow: 0 0 10px #0ff;
}

.laps ul {
  list-style: none;
  padding: 0;
  color: #0ff;
}

.laps li {
  margin: 5px 0;
  padding: 6px;
  background: rgba(0,0,50,0.5);
  border-radius: 6px;
}

.dashboard {
  text-align: center;
  padding: 20px;
}

canvas {
  margin: 20px auto;
  display: block;
  background: #fff;
  border-radius: 10px;
}

table {
  margin: 20px auto;
  border-collapse: collapse;
  width: 90%;
  color: #fff;
}

table th, table td {
  padding: 10px;
  border: 1px solid #ccc;
}

.show-graph-btn {
  padding: 10px 18px;
  font-size: 16px;
  background: #38bdf8;
  color: #000;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 10px #0ff;
  cursor: pointer;
  font-weight: bold;
}
