:root {
  --cyan: #63d8ff;
  --purple: #8d7cff;
  --green: #63e6be;
  --text: #ffffff;
  --muted: #8f9ab8;
  --card: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.11);
}
div.container {
  padding: 0;
  width: 100%;
}

.countdown_box {
  min-height: 100vh;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(92, 76, 220, 0.45),
      transparent 32%
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(0, 180, 220, 0.25),
      transparent 32%
    ),
    linear-gradient(135deg, #070914, #0d1024 50%, #070b18);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
}

/* Decorative background */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  pointer-events: none;
}

body::before {
  background: var(--cyan);
  top: -150px;
  right: -100px;
}

body::after {
  background: var(--purple);
  bottom: -150px;
  left: -100px;
}

.container {
  position: relative;
  width: min(1000px, 100%);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;
  border-radius: 999px;

  color: #aab4d0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);

  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  margin-bottom: 20px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}

h1.cd_h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  font-weight: 850;

  background: linear-gradient(100deg, #ffffff 10%, #a7edff 45%, #9c8cff 90%);

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  margin-bottom: 18px;
}

.subtitle {
  max-width: 650px;
  margin: 0 auto 42px;

  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.card {
  padding: clamp(22px, 5vw, 44px);

  border-radius: 32px;
  border: 1px solid var(--border);

  background: var(--card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);

  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.target {
  color: #a5aec7;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.target strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  margin-top: 7px;
  font-weight: 600;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.unit {
  position: relative;
  padding: 28px 0 24px;

  border-radius: 22px;

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.075),
    rgba(255, 255, 255, 0.025)
  );

  border: 1px solid rgba(255, 255, 255, 0.07);

  overflow: hidden;
}

.unit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 216, 255, 0.5),
    transparent
  );
}

.number {
  font-variant-numeric: tabular-nums;

  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1;

  font-weight: 800;
  letter-spacing: -0.06em;

  text-shadow: 0 0 30px rgba(99, 216, 255, 0.16);
}

.unit-label {
  display: block;

  margin-top: 12px;

  color: #7f89a7;

  font-size: 10px;
  font-weight: 600;

  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.passed-section {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(99, 230, 190, 0.055);
  border: 1px solid rgba(99, 230, 190, 0.12);
  text-align: center;
}

.passed-title {
  color: #7f89a7;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.passed-time {
  color: var(--green);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.progress-section {
  margin-top: 34px;
  text-align: left;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 10px;

  color: #818ca8;
  font-size: 0.8rem;
}

.progress-percent {
  color: #b8c2dd;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 9px;
  width: 100%;

  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;

  overflow: hidden;
}

.bar {
  height: 100%;
  width: 0%;

  border-radius: inherit;

  background: linear-gradient(90deg, var(--cyan), var(--purple));

  box-shadow: 0 0 20px rgba(99, 216, 255, 0.45);

  transition: width 0.5s ease;
}

.status {
  margin-top: 25px;

  color: #8d97b2;
  font-size: 0.9rem;
}

.status.success {
  color: var(--green);
}

.status.error {
  color: #ff7d9c;
}

.error-box {
  display: none;

  margin-top: 25px;
  padding: 15px;

  border-radius: 14px;

  background: rgba(255, 80, 120, 0.08);
  border: 1px solid rgba(255, 80, 120, 0.18);

  color: #ff9ab2;
  font-size: 0.9rem;
}

.error-box.visible {
  display: block;
}

.url-hint {
  margin-top: 25px;
  color: #555f7a;
  font-size: 0.72rem;
  word-break: break-all;
}

.controls {
  margin-bottom: 30px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.controls label {
  display: block;
  margin-bottom: 10px;
  color: #aeb8d2;
  font-size: 0.82rem;
  font-weight: 600;
}

.control-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.controls input {
  /* flex: 1 1 240px; */
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font: inherit;
  outline: none;
}

.controls input:focus {
  border-color: rgba(99, 216, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 216, 255, 0.1);
}

.controls button {
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  color: #071018;
  background: linear-gradient(100deg, var(--cyan), var(--purple));
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
  white-space: nowrap;
}

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

.controls button:active {
  transform: translateY(0);
}

.controls button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border);
}

.generated-url {
  margin-top: 10px;
  color: #687390;
  font-size: 0.72rem;
  word-break: break-all;
  min-height: 1em;
}

@media (max-width: 650px) {
  .control-row {
    flex-direction: column;
    align-items: stretch;
  }

  .controls button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .countdown {
    gap: 8px;
  }

  .unit {
    padding: 22px 8px;
  }
}
