:root {
  --card: rgba(255, 255, 255, 0.08);
  --cardBorder: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Fredoka", ui-sans-serif, system-ui, sans-serif;
  overflow: hidden;
  background: linear-gradient(165deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
}

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

.card {
  width: min(480px, 100%);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--cardBorder);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.birthday-message {
  margin: 0;
  padding: 1.5rem 1.5rem 0;
  font-family: "Caveat", cursive;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
}

.domain-message {
  margin: 0;
  padding: 1.5rem 1.5rem 1.5rem;
  font-family: "Caveat", cursive;
  font-size: 1.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.media {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.media img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(165deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  cursor: pointer;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cover.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-text {
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
}

.cover-hint {
  margin: 0;
  font-size: 3rem;
  opacity: 0.9;
}

.countdown {
  text-align: center;
}

.countdown.hidden {
  display: none;
}

.open-prompt.hidden {
  display: none;
}

.countdown-label {
  margin: 0 0 16px;
  font-family: "Caveat", cursive;
  font-size: 1.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 20px;
  max-width: 320px;
  margin: 0 auto;
}

.countdown-value {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.98);
  min-width: 2ch;
}

.countdown-unit {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: lowercase;
}

.bear-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 998;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.bear-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.dev-console {
  position: fixed;
  bottom: 64px;
  right: 16px;
  z-index: 999;
  width: min(420px, calc(100vw - 32px));
  max-height: 400px;
  display: flex;
  flex-direction: column;
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  font-family: "Consolas", "Monaco", monospace;
  font-size: 13px;
}

.dev-console.hidden {
  display: none;
}

.dev-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.dev-console-header span {
  font-size: 12px;
}

#console-close {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 4px;
}

#console-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dev-console-input {
  flex: 1;
  min-height: 80px;
  margin: 12px;
  padding: 10px;
  background: #0d0d14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #e2e2e2;
  font-family: inherit;
  font-size: 12px;
  resize: vertical;
}

.dev-console-input:focus {
  outline: none;
  border-color: rgba(100, 150, 255, 0.5);
}

.dev-console-actions {
  padding: 0 12px 8px;
}

#console-run {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: #3b82f6;
  color: #fff;
  cursor: pointer;
}

#console-run:hover {
  background: #2563eb;
}

.dev-console-output {
  margin: 0 12px 12px;
  padding: 10px;
  max-height: 120px;
  overflow: auto;
  background: #0d0d14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #a5d6a7;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

