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

html {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: #7a6ea0;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Blurred background ── */
.bg-blur {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-blur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(40px) brightness(0.55) saturate(1.2);
  transform: scale(1.08);
}

/* ── Page ── */
.page {
  width: 100%;
  max-width: 480px;
  background: transparent;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

/* ── Hero ── */
.hero {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 300px;
  max-height: 420px;
  flex-shrink: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(90, 75, 130, 0.55) 70%,
    rgba(90, 75, 130, 0.85) 100%
  );
}

.hero-text {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
}

.username {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.handle {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.01em;
}

/* ── Social icons ── */
.social-icons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.social-icon:hover {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.ig-icon-btn {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}

.ig-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* ── Content section ── */
.content {
  flex: 1;
  padding: 16px 14px max(24px, env(safe-area-inset-bottom, 24px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Photo card ── */
@keyframes card-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 0 rgba(255,100,100,0.5); }
  50%       { box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 10px rgba(255,100,100,0); }
}

.photo-card {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  cursor: pointer;
  animation: card-pulse 2s ease-in-out infinite;
}

.photo-card:hover {
  transform: scale(1.01);
}

.photo-card:active {
  transform: scale(0.98);
}

.card-link-icon {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.card-link-icon svg {
  width: 16px;
  height: 16px;
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

/* ── Charity button ── */
.btn-charity {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-charity:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

.charity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  padding: 16px 18px;
  font-size: 20px;
  flex-shrink: 0;
}

.charity-text {
  flex: 1;
  background: linear-gradient(90deg, #1e1b4b, #2d1b69);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 16px 18px;
  text-align: center;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(60, 40, 80, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 100%;
  max-width: 360px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 24px;
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  width: 52px;
  height: 52px;
  color: rgba(255,255,255,0.85);
}

.modal-icon svg {
  width: 100%;
  height: 100%;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.modal-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.modal-btn {
  margin-top: 8px;
  display: block;
  width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  background: #fff;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.modal-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

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

/* ── Mobile ── */
@media (max-width: 480px) {
  body {
    background: #8b7db8;
  }
}
