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

body {
  min-height: 100vh;
  position: relative;
  font-family: sans-serif;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

/* Blurred background layer */
.bg-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('background.webp');
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  transform: scale(1.1); /* avoids blurry edges showing gaps */
  z-index: -1;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Big square made of 4 smaller squares */
#grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 15px;
  width: min(90vw, 700px);
  aspect-ratio: 1 / 1;
}

.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.card-info {
  background: rgba(0, 0, 0, 0.55);
  padding: 10px;
}

.card-info h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.status {
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.status.together {
  background-color: #2ecc71; /* green */
  color: #063d1e;
}

.status.apart {
  background-color: #e74c3c; /* red */
  color: #4a0d05;
}

.status.deleted {
  background-color: #95a5a6; /* grey - account is gone, not a follow signal */
  color: #22282a;
}

.status.unknown {
  background-color: #f39c12; /* amber - the check itself failed, not a real signal */
  color: #4a3105;
}

.timestamp {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* Info button */
#info-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
  z-index: 10;
}

#info-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Info modal (fades/scales in via .visible) */
#info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#info-modal.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #1e1e2e;
  color: white;
  max-width: 500px;
  width: 90%;
  padding: 25px 30px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);

  transform: scale(0.92);
  transition: transform 0.5s ease;
}

#info-modal.visible .modal-content {
  transform: scale(1);
}

.modal-content h2 {
  margin-bottom: 12px;
}

.modal-content h3 {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 1rem;
}

.modal-content p {
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 0.95rem;
}

#close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.8;
}

#close-modal:hover {
  opacity: 1;
}


/* Welcome / Donation modal (visible by default, fades out via .hidden) */
#welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;

  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#welcome-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-content {
  background: rgba(30, 30, 46, 0.85);
  color: white;
  max-width: 480px;
  width: 90%;
  padding: 30px 32px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);

  transform: scale(1);
  transition: transform 0.6s ease;
}

#welcome-modal.hidden .welcome-content {
  transform: scale(0.92);
}

.welcome-content h2 {
  margin-bottom: 14px;
}

.welcome-content > p {
  line-height: 1.5;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 20px;
}

.wallets {
  text-align: left;
  margin-bottom: 22px;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  border-radius: 8px;
}

.wallet-label {
  font-weight: bold;
  min-width: 68px;
  font-size: 0.85rem;
}

.wallet-address {
  flex: 1;
  font-size: 0.75rem;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

#continue-btn {
  background: #2ecc71;
  color: #063d1e;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#continue-btn:hover {
  background: #27ae60;
}
