:root {
  --bg: #000000;
  --text: #ffffff;
  --light-green: #86efac;
  --light-blue: #7dd3fc;
  --danger: #ef4444;
  --warn: #facc15;
  --card-border: rgba(255, 255, 255, 0.75);
  --field-border: rgba(255, 255, 255, 0.18);
  --field-bg: rgba(0, 0, 0, 0.24);
  --field-font-size: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Segoe UI", sans-serif;
}

body {
  overflow-y: auto;
}

.page-root {
  position: relative;
  min-height: 100dvh;
}

.background-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.blur-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(7px);
  background: rgba(0, 0, 0, 0.12);
  z-index: 1;
  pointer-events: none;
}

.page-content {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.content-block {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.title-link {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  padding: 4px;
}

.title-row {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
}

.title-cash {
  color: var(--light-green);
}

.title-time {
  color: var(--text);
}

.subtitle {
  margin: 0;
  text-align: center;
  font-weight: 800;
  line-height: 0.9;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
}

.subtitle span {
  color: var(--light-green);
}

.calculator-card {
  width: 350px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 20px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.top-input-row {
  width: 300px;
  display: flex;
  gap: 10px;
}

.field-slot {
  width: 145px;
}

.input-pill {
  height: 46px;
  border: 2px solid var(--field-border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: var(--field-font-size);
  font-family: Roboto, "Segoe UI", sans-serif;
  outline: none;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.input-pill::placeholder {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: var(--field-font-size);
  font-family: Roboto, "Segoe UI", sans-serif;
}

.input-small {
  width: 145px;
  padding: 0 16px;
}

.input-wide {
  width: 300px;
}

.saved-pill {
  width: 145px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--text);
  font-size: var(--field-font-size);
  font-weight: 700;
  font-family: Roboto, "Segoe UI", sans-serif;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: left;
  padding: 0 16px;
}

.price-wrapper {
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.item-wrapper {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.item-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-right: 8px;
}

.item-prefix svg {
  width: 24px;
  height: 24px;
}

.price-prefix {
  margin-right: 6px;
  color: var(--text);
  font-weight: 700;
}

.item-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--field-font-size);
  font-weight: 700;
  font-family: Roboto, "Segoe UI", sans-serif;
  outline: none;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.item-input::placeholder {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: var(--field-font-size);
  font-family: Roboto, "Segoe UI", sans-serif;
}

.price-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--field-font-size);
  font-weight: 700;
  font-family: Roboto, "Segoe UI", sans-serif;
  outline: none;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.price-input::placeholder {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: var(--field-font-size);
  font-family: Roboto, "Segoe UI", sans-serif;
}

.input-pill:focus,
.saved-pill:focus,
.item-input:focus,
.price-input:focus {
  outline: none;
}

.item-wrapper:focus-within,
.price-wrapper:focus-within {
  border-color: var(--field-border);
}

.result-slot {
  width: 300px;
  height: 0;
  overflow: hidden;
  transition: height 320ms ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.result-text {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.total-time-row {
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.total-time-text {
  font-size: 18px;
  font-weight: 700;
}

.share-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--light-green);
  cursor: pointer;
  transform: translateX(24px);
  opacity: 0;
  transition: transform 260ms ease-out, opacity 220ms ease-out;
}

.share-button svg {
  width: 24px;
  height: 24px;
}

.share-button line,
.share-button circle {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.share-button.visible {
  transform: translateX(4px);
  opacity: 1;
}

.metric-row {
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}

.progress-track {
  width: 300px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
}

.progress-total-day {
  background: var(--light-green);
}

.progress-workday {
  background: var(--light-blue);
}

.calculate-button {
  width: 300px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.calc-cash {
  color: var(--light-green);
}

.calc-time {
  color: var(--text);
}

.hidden {
  display: none !important;
}

@media (max-width: 420px) {
  .page-content {
    padding: 16px;
  }

  .calculator-card {
    width: 100%;
    max-width: 350px;
  }

  .subtitle {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }
}
