:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #1f232c;
  --text: #e7eaf0;
  --muted: #9aa3b2;
  --accent: #6ea8ff;
  --early: #4ade80;
  --normal: #6ea8ff;
  --close: #f59e0b;
  --error: #f87171;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius);
}

form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

form > label > span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

input[type="text"],
input[list],
input[type="datetime-local"] {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #2a2f3a;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 120ms;
}

input:focus {
  border-color: var(--accent);
}

.flight-type .radios {
  display: flex;
  gap: 14px;
}
.flight-type .radios label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
}

button {
  margin-top: 4px;
  padding: 13px 18px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  background: var(--accent);
  color: #0c1220;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 120ms;
}
button:hover { opacity: 0.92; }
button:disabled { opacity: 0.6; cursor: progress; }

#status {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
#status.error { color: var(--error); }

#results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  border-left: 4px solid var(--muted);
}
.card.early  { border-left-color: var(--early); }
.card.normal { border-left-color: var(--normal); }
.card.close  { border-left-color: var(--close); }

.card .label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 6px;
}

.card .time {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card .meta {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}
.card .hint {
  display: inline-block;
  margin-top: 2px;
  font-size: 13px;
}

footer {
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: #444;
}
