@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@400;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #1e2230;
  --bg-card: #252b3b;
  --orange: #f05a1a;
  --orange-hover: #d94d10;
  --white: #ffffff;
  --light-gray: #c8cfe0;
  --separator: #f05a1a;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  --digit-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1f2e 0%, #252b3b 50%, #1a1f2e 100%);
  font-family: 'Poppins', sans-serif;
  padding: 16px;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
}

.card {
  background: linear-gradient(160deg, #2a3145 0%, #1e2230 100%);
  border-radius: 24px;
  padding: 48px 40px 44px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  text-align: center;
}

/* ─── Title ─── */
.flash-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 10vw, 4.5rem);
  color: var(--orange);
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(240, 90, 26, 0.4);
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 40px rgba(240, 90, 26, 0.4); }
  50%       { text-shadow: 0 0 70px rgba(240, 90, 26, 0.7); }
}

.subtitle {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--light-gray);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: 36px;
}

/* ─── Timer row ─── */
.timer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  flex-wrap: nowrap;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.digit-box {
  background: #ffffff;
  border-radius: 14px;
  width: clamp(68px, 16vw, 96px);
  height: clamp(72px, 17vw, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--digit-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease;
}

/* Flip line */
.digit-box::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.08);
  z-index: 2;
}

.digit {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: #1e2230;
  letter-spacing: 1px;
  line-height: 1;
  position: relative;
  z-index: 3;
  transition: opacity 0.15s ease;
}

/* Flip animation */
.digit-box.flip {
  animation: flipBox 0.35s cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes flipBox {
  0%   { transform: scaleY(1); }
  40%  { transform: scaleY(0.05); }
  60%  { transform: scaleY(0.05); }
  100% { transform: scaleY(1); }
}

.label {
  font-size: clamp(0.65rem, 2vw, 0.78rem);
  color: var(--light-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ─── Separator ─── */
.sep {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--orange);
  padding: 0 clamp(4px, 2vw, 12px);
  margin-top: clamp(12px, 3vw, 20px);
  opacity: 0.9;
  animation: blink 1s step-start infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 0.3; }
}

/* ─── CTA Button ─── */
.cta-btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: clamp(14px, 3vw, 18px) clamp(32px, 8vw, 52px);
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(240, 90, 26, 0.45);
}

.cta-btn:hover {
  background: var(--orange-hover);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(240, 90, 26, 0.55);
}

.cta-btn:active {
  transform: translateY(0) scale(0.99);
}

/* ─── Expired state ─── */
.expired-msg {
  display: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  color: var(--orange);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

/* ─── Responsive tweaks ─── */
@media (max-width: 400px) {
  .card {
    padding: 36px 20px 32px;
    border-radius: 18px;
  }
  .digit-box {
    border-radius: 10px;
  }
  .sep {
    padding: 0 3px;
  }
}

@media (min-width: 768px) {
  .card {
    padding: 56px 52px 52px;
  }
}
