﻿:root {
  --bg-1: #fff7f5;
  --bg-2: #ffe7e5;
  --bg-3: #ffd6d8;
  --text: #3b2530;
  --muted: #876571;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(206, 124, 146, 0.28);
  --accent: #e84f83;
  --accent-2: #ff8f6b;
  --accent-3: #ffbfd3;
  --ok: #2f8a57;
  --err: #b94242;
  --shadow: 0 22px 50px rgba(178, 75, 115, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Manrope', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(55rem 32rem at -10% -5%, #ffcdd7 10%, transparent 60%),
    radial-gradient(44rem 28rem at 108% 10%, #ffd6be 8%, transparent 65%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}

body::before {
  left: 8%;
  top: 18%;
  animation: drift 14s ease-in-out infinite;
}

body::after {
  right: 5%;
  bottom: 10%;
  animation: drift 16s ease-in-out infinite reverse;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

.orb-a { width: 260px; height: 260px; left: -70px; top: 8%; background: #ffc6d6; }
.orb-b { width: 320px; height: 320px; right: -110px; top: 26%; background: #ffd7c8; animation-delay: -3s; }
.orb-c { width: 230px; height: 230px; left: 42%; bottom: -90px; background: #ffbfd1; animation-delay: -6s; }

.container {
  width: min(1120px, 92vw);
  margin: 26px auto 44px;
  display: grid;
  gap: 18px;
}

.card {
  backdrop-filter: blur(10px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 174, 204, 0.45), transparent 65%);
  pointer-events: none;
}

.hero h1 {
  margin: 8px 0;
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  letter-spacing: 0.04em;
  color: #8f2c5d;
  text-shadow: 0 8px 24px rgba(209, 92, 139, 0.18);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.subtitle { color: var(--muted); }

.days-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.days-grid article {
  border: 1px solid rgba(229, 138, 165, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(255, 237, 243, 0.7));
}

.label { display: block; color: var(--muted); font-size: 0.85rem; }
.days-grid strong { font-size: clamp(1.3rem, 3vw, 2rem); color: var(--accent); display: block; margin-top: 4px; }
.days-grid small { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

h2 {
  margin-top: 0;
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 1.65rem;
  color: #9d315f;
}

.form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

input, textarea, button { font: inherit; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

input:focus, textarea:focus {
  outline: none;
  border-color: rgba(232, 79, 131, 0.52);
  box-shadow: 0 0 0 4px rgba(232, 79, 131, 0.12);
}

textarea { resize: vertical; min-height: 120px; }

button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-size: 180% 180%;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, background-position 0.3s ease;
  box-shadow: 0 14px 30px rgba(232, 79, 131, 0.28);
}

button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.05);
  background-position: 100% 50%;
}

button:active { transform: translateY(0); }

.file-input-wrap {
  position: relative;
}

.file-input-wrap input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-input-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(232, 79, 131, 0.35);
  background: linear-gradient(145deg, #fff6fa, #ffe7ef);
  color: #b53d6a;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.file-input-btn::before {
  content: "❤";
  margin-right: 8px;
  font-size: 0.95rem;
}

.file-input-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 79, 131, 0.55);
  box-shadow: 0 10px 24px rgba(232, 79, 131, 0.2);
}

.flash { border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.flash.ok { background: rgba(47, 138, 87, 0.12); color: var(--ok); border: 1px solid rgba(47, 138, 87, 0.26); }
.flash.error { background: rgba(185, 66, 66, 0.12); color: var(--err); border: 1px solid rgba(185, 66, 66, 0.3); }

.photo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
}

.photo-item {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(229, 138, 165, 0.28);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(170, 77, 118, 0.2);
}

.photo-item img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  display: block;
}

.photo-item figcaption {
  padding: 8px 10px 10px;
  display: grid;
  gap: 4px;
}

.photo-item time, .msg-head time { color: var(--muted); font-size: 0.8rem; }

.timeline { display: grid; gap: 10px; }

.msg-item {
  border: 1px solid rgba(229, 138, 165, 0.3);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 240, 246, 0.6));
}

.msg-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.msg-item p { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.empty { color: var(--muted); }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 0.7s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -14px); }
}

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .days-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 18px; }
}

.qr-wrap {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.qrcode-box {
  width: 236px;
  min-height: 236px;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(150deg, #fffafd, #ffeef4);
  border: 1px solid rgba(232, 79, 131, 0.28);
  box-shadow: 0 12px 26px rgba(201, 82, 132, 0.18);
}

.qrcode-box img,
.qrcode-box canvas {
  display: block;
  border-radius: 12px;
}

.site-link {
  color: #a03664;
  word-break: break-all;
  text-decoration: none;
  border-bottom: 1px dashed rgba(160, 54, 100, 0.4);
  padding-bottom: 2px;
}

.site-link:hover {
  color: #c5376d;
  border-bottom-color: rgba(197, 55, 109, 0.7);
}
