:root {
  --navy: #0f2f61;
  --navy-deep: #071a39;
  --orange: #f47a20;
  --cream: #f6f3ec;
  --ink: #12161d;
  --muted: #5a6778;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(15, 47, 97, 0.12);
  --glow: rgba(244, 122, 32, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 122, 32, 0.22), transparent 28%),
    radial-gradient(circle at bottom right, rgba(61, 120, 255, 0.18), transparent 24%),
    linear-gradient(160deg, #eef4ff 0%, #dce8fb 38%, #f7f4ee 100%);
}

.app-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero-card,
.lookup-card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(8, 25, 56, 0.12);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  margin-bottom: 18px;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(244, 122, 32, 0.26), rgba(15, 47, 97, 0.08));
  filter: blur(8px);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.time-panel {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  margin-top: 16px;
}

.time-block {
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(15, 47, 97, 0.06);
}

.install-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.install-row-bottom {
  margin: 14px 4px 0;
}

.install-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--navy) 0%, #2459a6 100%);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 47, 97, 0.22);
}

.install-button:hover {
  transform: translateY(-1px);
}

.install-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.time-label {
  font-size: 0.92rem;
  color: var(--muted);
}

#current-time {
  font-size: 1.5rem;
  color: var(--navy);
}

.lookup-card {
  padding: 24px;
}

.field-label,
.result-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.station-select {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(15, 47, 97, 0.18);
  border-radius: 18px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.station-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 5px rgba(15, 47, 97, 0.08);
  transform: translateY(-1px);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.result-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  border-radius: 24px;
  color: white;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.result-card-harjamukti {
  background: linear-gradient(160deg, #12386e 0%, #0a2348 100%);
}

.result-card-dukuh {
  background: linear-gradient(160deg, #f47a20 0%, #d85d12 100%);
  box-shadow: 0 16px 40px var(--glow);
}

.result-timeline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1.8fr) repeat(2, minmax(72px, auto));
  gap: 2px;
  align-items: center;
  margin-top: 12px;
}

.result-time {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.15);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.timeline-chip {
  position: relative;
  z-index: 1;
  margin: 0;
  min-width: 0;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.timeline-chip-previous {
  color: rgba(255, 255, 255, 0.68);
  background: rgba(8, 18, 35, 0.18);
}

.result-meta {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.footnote {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.is-hidden {
  display: none;
}

@media (max-width: 740px) {
  .app-shell {
    width: min(100% - 20px, 1040px);
    padding-top: 20px;
  }

  .hero-card,
  .lookup-card {
    border-radius: 22px;
  }

  .hero-card,
  .lookup-card {
    padding: 20px;
  }

  .result-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .result-time {
    grid-column: 1 / -1;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    min-height: 180px;
  }

  .install-row {
    align-items: flex-start;
  }
}
