* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #0f1115;
  color: #ffffff;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.wrap {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 20px;
  width: min(1000px, 100%);
}

.unit {
  background: #171b22;
  border: 1px solid #2b3240;
  border-radius: 24px;
  padding: 32px 16px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.unit span {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
}

.unit small {
  display: block;
  margin-top: 12px;
  color: #aeb8c7;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.expired {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  text-align: center;
}

.hidden {
  display: none !important;
}

.dst-note {
  position: fixed;
  left: 72px;
  bottom: 28px;
  margin: 0;
  color: #9ea9bc;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  z-index: 1999;
  user-select: none;
}

.info-button {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 2000;
  width: 42px;
  height: 42px;
  border: 1px solid #5a2d34;
  border-radius: 50%;
  background: #2a171b;
  color: #ffb3bd;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

.info-button:hover {
  background: #341d22;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.modal-card {
  position: fixed;
  left: 18px;
  bottom: 70px;
  z-index: 1001;
  width: min(360px, calc(100% - 36px));
  background: #171b22;
  border: 1px solid #3a4456;
  border-radius: 20px;
  padding: 24px 22px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.modal-card p {
  margin: 0;
  color: #d8deea;
  line-height: 1.5;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.close-button:hover {
  background: rgba(255,255,255,0.08);
}

@media (max-width: 800px) {
  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-card {
    width: min(320px, calc(100% - 24px));
    left: 12px;
    bottom: 64px;
  }

  .info-button {
    left: 12px;
    bottom: 12px;
  }

  .dst-note {
    left: 62px;
    bottom: 22px;
    font-size: 0.74rem;
    max-width: calc(100% - 74px);
  }
}
