@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b1220;
  --bg-accent: #0f1b33;
  --card: rgba(255, 255, 255, 0.10);
  --card-strong: rgba(255, 255, 255, 0.18);
  --text: #e6edf6;
  --muted: #b3c0d6;
  --border: rgba(255, 255, 255, 0.18);
  --accent: #8bd3ff;
  --shadow: 0 12px 40px rgba(3, 8, 20, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  body { scroll-behavior: smooth; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(6, 12, 24, 0.55) 0%, rgba(10, 20, 40, 0.45) 55%, rgba(12, 30, 44, 0.5) 100%),
    url("../assets/bg.png") center / cover no-repeat;
  filter: blur(2px) saturate(0.85) brightness(0.9);
  transform: scale(1.03);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(139, 211, 255, 0.08), transparent 60%),
    radial-gradient(45% 40% at 90% 20%, rgba(142, 248, 209, 0.07), transparent 65%),
    radial-gradient(50% 50% at 30% 80%, rgba(142, 166, 255, 0.08), transparent 60%);
  z-index: -1;
  animation: breathe 16s ease-in-out infinite;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 36px;
}

.appTitle {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #f2f7ff;
  margin-bottom: 14px;
  text-align: center;
  text-shadow:
    0 10px 24px rgba(6, 12, 24, 0.45),
    0 0 18px rgba(139, 211, 255, 0.35),
    0 0 40px rgba(139, 211, 255, 0.18);
}

.top {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.date {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
  text-shadow: 0 6px 18px rgba(7, 12, 24, 0.45);
}

.sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: rise 500ms ease both;
}

.label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.chip input { accent-color: var(--accent); }

.cards {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  animation: rise 520ms ease both;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(139, 211, 255, 0.35), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}

.cardHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.meta {
  font-size: 13px;
  color: var(--muted);
}

.rows {
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.row:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 211, 255, 0.35);
  background: rgba(6, 12, 24, 0.7);
}

.row b { font-size: 14px; }

.time {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--accent);
}

.hint {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #f3d36c;
  line-height: 1.5;
}

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

.err { color: #ffb4b4; }

.btnbar {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

@media (min-width: 720px) {
  .wrap { padding: 28px 22px 40px; }
  .top { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .appTitle { font-size: 32px; margin-bottom: 16px; }
  .date { font-size: 26px; }
  .card { padding: 18px; }
  .time { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .chip, button, .row { transition: none; }
  body::after { animation: none; }
  .panel, .card { animation: none; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

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