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

body {
  margin: 0;
  padding: 0;
  background: #0a0a0f;
  min-height: 100vh;
}

/* ── 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;
  }
}

/* ── CALCULATOR CONTAINER ────────────────────── */
.calculator-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 110px 24px 100px;
  animation: fadeIn 0.6s ease;
}

/* ── RESULTS DISPLAY ─────────────────────────── */
.results-display {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.result-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.result-value {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  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;
}

.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

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

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

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

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

.calc-input {
  width: 120px;
  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 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;
}

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

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

.calc-input-affixed-left {
  padding-left: 30px;
}

.calc-input-affixed-right {
  padding-right: 34px;
}

.calc-input-group-bill .calc-input {
  width: 150px;
}

.input-affix {
  position: absolute;
  top: 18px;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.input-prefix {
  left: 14px;
}

.input-suffix {
  right: 34px;
}

/* custom spin controls placed beside inputs */
.calc-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;
}

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

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

.tip-presets {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tip-preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.12s;
}

.tip-preset-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
}

.tip-preset-btn.active {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.6);
  color: white;
}

.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.reset {
  background: #374151;
  border-color: #374151;
  color: white;
}

.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;
  }

  .calculator-container {
    padding: 96px 20px 90px;
    gap: 36px;
  }

  .results-display {
    gap: 28px;
  }

  .result-value {
    font-size: 2.6rem;
  }

  .calc-input {
    width: 100px;
    height: 54px;
  }

  .spin-controls {
    height: 54px;
  }

  .calc-input-group-bill .calc-input {
    width: 130px;
  }

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

@media (max-width: 480px) {
  .calculator-container {
    padding: 88px 16px 84px;
    gap: 28px;
  }

  .results-display {
    gap: 10px 24px;
  }

  .result-value {
    font-size: 2.1rem;
  }

  .result-label {
    font-size: 0.62rem;
  }

  .calc-inputs {
    gap: 10px;
  }

  .calc-input {
    width: 90px;
    height: 50px;
    font-size: 1.05rem;
  }

  .calc-input-group-bill .calc-input {
    width: 110px;
  }

  .calc-input-affixed-right {
    padding-right: 30px;
  }

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

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

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

  .tip-preset-btn {
    padding: 5px 12px;
    font-size: 0.75rem;
  }
}
