/* Стили секретной открытки 00:00 (без backdrop-filter для плавной работы на iOS Safari) */
:root {
  --bg-deep: #0b0914;
  --card-bg: rgba(18, 14, 32, 0.8);
  --card-border: rgba(255, 214, 153, 0.28);
  --gold: #ffd485;
  --gold-bright: #ffe6b3;
  --rose: #ff7eb3;
  --text-main: #fffaf2;
  --text-muted: #cfc6dc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* Фоновое фото и затемнение */
.bg-photo {
  position: fixed;
  inset: 0;
  background-image: url("photo.jpeg");
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.5;
  transition: opacity 1.4s ease;
  z-index: 0;
}

body.is-unlocked .bg-photo {
  opacity: 0.8;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(28, 19, 48, 0.3) 0%, rgba(10, 8, 18, 0.7) 100%);
  z-index: 1;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Основной контейнер */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-shell {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.is-hidden {
  display: none;
}

/* Статус-плашка */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 212, 133, 0.12);
  border: 1px solid rgba(255, 212, 133, 0.3);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text-main);
}

.subtitle {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Интерактивная печать */
.seal-button {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid rgba(255, 212, 133, 0.45);
  background: radial-gradient(circle at 35% 30%, #3b2654, #1b122b);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.seal-button:active {
  transform: scale(0.94);
}

.seal-button.shake {
  animation: shakeSeal 0.45s ease;
}

@keyframes shakeSeal {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-7px) rotate(-6deg); }
  40% { transform: translateX(7px) rotate(6deg); }
  60% { transform: translateX(-5px) rotate(-4deg); }
  80% { transform: translateX(5px) rotate(4deg); }
}

.seal-icon {
  font-size: 2rem;
  line-height: 1;
}

.seal-caption {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
}

.tease-message {
  min-height: 2.6em;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--gold-bright);
  margin-bottom: 22px;
  padding: 0 8px;
}

/* Таймер */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.time-box {
  min-width: 78px;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-val {
  font-size: 1.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.time-unit {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}

.time-sep {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: -12px;
}

/* Полоса прогресса */
.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  border-radius: 999px;
  transition: width 0.5s linear;
}

/* Открытая открытка */
.birthday-card {
  animation: cardReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 126, 179, 0.18);
  border: 1px solid rgba(255, 126, 179, 0.4);
  color: #ffc2dc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.card-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 18px;
}

.card-message {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 212, 133, 0.22);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 22px;
  white-space: pre-line;
}

.action-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 212, 133, 0.45);
  background: linear-gradient(135deg, rgba(255, 126, 179, 0.28), rgba(255, 212, 133, 0.25));
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.action-btn:active {
  transform: scale(0.97);
}

@media (max-width: 380px) {
  .card-shell {
    padding: 24px 16px;
  }
  .time-box {
    min-width: 66px;
  }
  .time-val {
    font-size: 1.55rem;
  }
}
