/* reset & base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

:root {
  --sky-start: #0f172a;
  --sky-end: #1e3a5f;
  --sun-glow: #fef3c7;
}

body {
  background: linear-gradient(180deg, var(--sky-start) 0%, var(--sky-end) 50%, var(--sun-glow) 100%);
  color: #fff;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.container {
  max-width: 36rem;
  width: 100%;
  text-align: center;
}

/* home link */
.home-link-wrap {
  margin-bottom: 1.5rem;
  text-align: left;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.home-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.home-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
}

/* swift block */
.swift-block {
  position: relative;
  width: 100%;
  min-height: 7rem;
  margin-bottom: 2rem;
}

.swift-track {
  position: absolute;
  left: 10%;
  right: 20%;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.swift-bird {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translate(-50%, -50%);
  transition: left 1s ease-out;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.swift-img {
  width: 80px;
  height: auto;
  display: block;
  transform: scaleX(-1); /* смотреть в сторону солнца */
  animation: swift-fly 2s ease-in-out infinite;
}

@keyframes swift-fly {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-2deg); }
  50% { transform: scaleX(-1) translateY(-3px) rotate(1deg); }
}

.swift-sun {
  position: absolute;
  right: 15%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  opacity: 0.8;
}

/* card (Hero UI–style) */
.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.card-header {
  padding: 1rem 1.25rem 0;
}

.card-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.card-body {
  padding: 0.5rem 1.25rem 1.25rem;
}

.timer-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .timer-row { gap: 1.5rem; }
}

.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-value {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  min-width: 2ch;
}

.timer-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.progress-wrap {
  max-width: 28rem;
  margin: 1rem auto 0;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #22c55e;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-caption {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.5rem 0 0;
}

/* telegram link */
.tg-block {
  padding-top: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
}

.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fcd34d;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tg-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.tg-link:hover {
  color: #fde68a;
}

.tg-note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0.5rem 0 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* share block (для персональных таймеров) */
.share-block {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.share-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

.share-link-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.share-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
}

.share-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(15, 23, 42, 0.8);
}

.share-btn {
  padding: 0.5rem 1rem;
  background: #fcd34d;
  color: #1e3a5f;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.share-btn:hover {
  background: #fde68a;
}

.share-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* create timer block */
.create-timer-block {
  margin-bottom: 1.5rem;
}

.create-timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.create-timer-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}

.create-timer-form {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
}

.form-label {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-input {
  flex: 1;
  min-width: 200px;
  padding: 0.625rem 0.875rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.9375rem;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(15, 23, 42, 0.8);
}

.form-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.form-submit {
  padding: 0.625rem 1.5rem;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: #16a34a;
}

/* form improvements */
.form-group {
  margin-bottom: 1rem;
}

.form-field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.375rem;
}

.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
}

.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(15, 23, 42, 0.8);
}

.form-row {
  display: block;
}

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}
