* {
  font-family: "Segoe UI", sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #0a0a0f;
  height: 100vh;
  overflow: hidden;
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  background: rgba(10, 10, 20, 0.65);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  padding: 12px 28px;
  animation: fadeSlideDown 0.8s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
}

.navbar-brand span {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ── TIMER CONTAINER ─────────────────────────── */
.timer-container {
  position: fixed;
  top: 74px;
  bottom: 56px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  animation: fadeIn 0.6s ease;
}

/* ── TIME DISPLAY ────────────────────────────── */
.time-display {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0;
}

.time-unit:hover {
  transform: none;
}

.time-unit-ms {
  min-width: 0;
}

.time-value {
  font-size: 8.5rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  padding-right: 0.05em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #ffffff 55%, rgba(168, 85, 247, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.ms-value {
  font-size: 4.6rem;
  letter-spacing: -0.03em;
  padding-right: 0.03em;
}

.time-separator {
  font-size: 5.8rem;
  font-weight: 800;
  color: rgba(168, 85, 247, 0.45);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ── INPUT ROW ───────────────────────────────── */
.timer-input-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.timer-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.time-inputs {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.time-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.time-input {
  width: 88px;
  height: 58px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: white;
  padding: 0 34px 0 14px;
  font-size: 1.35rem;
  font-weight: 700;
  font-family: "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.time-input::-webkit-inner-spin-button,
.time-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.time-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.time-input-group-ms .time-input {
  width: 104px;
}

/* custom spin controls placed beside inputs */
.time-input-group {
  position: relative;
}

.spin-controls {
  position: absolute;
  right: 8px;
  top: 0;
  height: 58px; /* matches .time-input height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.spin-btn {
  width: 20px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.04)
  );
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.15s,
    transform 0.12s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.spin-btn:hover {
  background: linear-gradient(
    180deg,
    rgba(168, 85, 247, 0.34),
    rgba(168, 85, 247, 0.18)
  );
  transform: scale(1.05);
}

.spin-btn svg {
  width: 8px;
  height: 8px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.time-input:focus,
.time-input:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.08);
}

.time-input-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.input-sep {
  font-size: 1.65rem;
  font-weight: 800;
  color: rgba(168, 85, 247, 0.45);
  margin-top: 14px;
  line-height: 1;
}

.action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 26px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.12s;
}

.action-btn:hover {
  transform: translateY(-2px);
}

/* solid style modifier for more prominent buttons */
.action-btn.solid.primary {
  background: #8b5cf6;
  border-color: #7c3aed;
  color: white;
}

.action-btn.solid.reset {
  background: #374151;
  border-color: #374151;
  color: white;
}

.action-btn.solid.primary:hover {
  background: #7c3aed;
}

.action-btn.solid.reset:hover {
  background: #2d3748;
}

/* ── FOOTER ──────────────────────────────────── */
.player-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  border-radius: 20px 20px 0 0;
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeSlideUp 0.8s ease;
}

.footer-credit {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.5px;
}

.footer-name {
  font-weight: 700;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    padding: 8px 16px;
  }

  .navbar-brand span {
    font-size: 1rem;
  }

  .time-unit {
    padding: 0;
    min-width: 0;
  }

  .time-value {
    font-size: 5rem;
  }

  .ms-value {
    font-size: 3.2rem;
  }

  .time-separator {
    font-size: 4rem;
  }

  .time-input {
    width: 82px;
    height: 54px;
  }

  .spin-controls {
    height: 54px;
  }

  .time-input-group-ms .time-input {
    width: 96px;
  }

  .timer-input-row {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .time-unit {
    padding: 0;
    min-width: 0;
  }

  .time-value {
    font-size: 4rem;
  }

  .ms-value {
    font-size: 2.5rem;
  }

  .time-separator {
    font-size: 3rem;
    margin-bottom: 0.3rem;
  }

  .time-display {
    gap: 6px;
  }

  .time-inputs {
    gap: 8px;
  }

  .time-input {
    width: 72px;
    height: 50px;
    padding-right: 30px;
    font-size: 1.1rem;
  }

  .time-input-group-ms .time-input {
    width: 86px;
  }

  .spin-controls {
    right: 6px;
    height: 50px;
    gap: 3px;
  }

  .spin-btn {
    width: 18px;
    height: 15px;
  }

  .input-sep {
    margin-top: 12px;
  }

  .action-btn {
    padding: 9px 18px;
    font-size: 0.82rem;
  }
}
