:root {
  --bg: #0b0f17;
  --bg2: #121826;
  --card: #151c2c;
  --line: #243049;
  --text: #e6ebf5;
  --muted: #93a0bd;
  --accent: #4f8cff;
  --accent2: #22d3a8;
  --danger: #ff5c7a;
  --warn: #ffb547;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1a2338 0%, var(--bg) 55%) fixed;
  color: var(--text);
  line-height: 1.55;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-weight: 800; font-size: 20px; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px;
}
.brand-title { font-weight: 700; font-size: 18px; }
.brand-sub { color: var(--muted); font-size: 13px; }

.timer {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg2); min-width: 150px;
}
.timer-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.timer-value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.timer.warning .timer-value { color: var(--warn); }
.timer.danger .timer-value { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

h1 { font-size: 26px; margin: 0 0 12px; line-height: 1.25; }
h3 { font-size: 16px; margin: 22px 0 10px; color: #c9d4ec; }
.lead { color: #c3cde3; font-size: 16px; }
.hint { color: var(--muted); font-size: 14px; }

.rules { background: rgba(79,140,255,.07); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 20px 0; }
.rules ol { margin: 8px 0 12px; padding-left: 20px; }
.rules li { margin: 6px 0; }

.form { margin-top: 22px; }
.form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  background: #0d1320; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 15px; font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,140,255,.18); }
textarea { resize: vertical; }

.btn { cursor: pointer; border: none; border-radius: 12px; font-weight: 700; font-size: 15px; transition: transform .05s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6aa0ff); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-xl { width: 100%; padding: 16px; font-size: 17px; margin-top: 6px; }

.error { margin-top: 12px; color: var(--danger); font-size: 14px; }

.work-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.badge-live { color: var(--accent2); background: rgba(34,211,168,.1); }
.badge-expired { color: var(--danger); background: rgba(255,92,122,.1); }

.task { margin-top: 10px; }
.task-list li { margin: 10px 0; }
code { background: #0d1320; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; color: #9ecbff; }
.code, pre.code {
  display: block; background: #0a0f1a; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin: 10px 0; overflow-x: auto; font-size: 13px; color: #b7c6e6;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; line-height: 1.5;
}
.callout { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--accent2); background: rgba(34,211,168,.07); border-radius: 0 10px 10px 0; font-size: 14px; }

.done-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  background: rgba(34,211,168,.14); color: var(--accent2); border: 2px solid var(--accent2);
}
.done-icon.expired { background: rgba(255,92,122,.12); color: var(--danger); border-color: var(--danger); }
#screen-done, #screen-expired { text-align: center; }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }

a { color: var(--accent); }
.hidden { display: none !important; }

@media (max-width: 620px) {
  .form .row { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .timer-value { font-size: 24px; }
}
