:root {
  color-scheme: light;
  --bg-start: #fff1f7;
  --bg-end: #ffe3ef;
  --glass: rgba(255, 255, 255, 0.52);
  --glass-border: rgba(255, 255, 255, 0.7);
  --text-main: #5d2040;
  --text-sub: #8e5372;
  --accent: #ff5ca8;
  --accent-dark: #de317f;
  --danger: #de476e;
  --shadow: 0 20px 60px rgba(220, 84, 137, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #fff7fb 0%, #ffeef6 36%, #ffe2ee 100%);
}

input,
textarea,
button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 24px;
}

.ambient,
.particle-field,
.heart-aura,
.heart-rays,
.spark {
  pointer-events: none;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.6;
}

.ambient-a {
  width: 260px;
  height: 260px;
  left: -40px;
  top: -50px;
  background: rgba(255, 151, 201, 0.52);
}

.ambient-b {
  width: 320px;
  height: 320px;
  right: -80px;
  top: 110px;
  background: rgba(255, 199, 225, 0.58);
}

.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 18px rgba(255, 145, 196, 0.82);
  animation: float-up linear infinite;
}

@keyframes float-up {
  from {
    transform: translateY(0) scale(0.7);
    opacity: 0;
  }

  10%,
  80% {
    opacity: 0.9;
  }

  to {
    transform: translateY(-120vh) scale(1.15);
    opacity: 0;
  }
}

.login-panel,
.site-main {
  position: relative;
  z-index: 2;
}

.login-panel {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.glass-card {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.login-card {
  width: min(100%, 420px);
  padding: 30px 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text-sub);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-card h1,
.hero-copy h2,
.feature-card h3 {
  margin: 0;
}

.login-copy,
.section-note,
.hero-copy p {
  color: var(--text-sub);
  line-height: 1.7;
}

.field-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 14px;
}

.field-input,
.message-title,
.message-body {
  width: 100%;
  border: 1px solid rgba(221, 130, 174, 0.35);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-main);
}

.field-input:focus,
.message-title:focus,
.message-body:focus {
  outline: 2px solid rgba(255, 92, 168, 0.25);
  border-color: rgba(255, 92, 168, 0.5);
}

.primary-btn,
.secondary-btn,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn,
.secondary-btn {
  border-radius: 999px;
  padding: 12px 18px;
}

.primary-btn {
  width: 100%;
  margin-top: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 18px 35px rgba(255, 92, 168, 0.28);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-dark);
  border: 1px solid rgba(255, 92, 168, 0.18);
}

.secondary-btn input,
.cover-upload input {
  display: none;
}

.mini-btn {
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  border: 1px solid rgba(255, 92, 168, 0.16);
}

.danger-btn {
  color: #fff;
  background: var(--danger);
  border-color: transparent;
}

.save-btn {
  background: linear-gradient(135deg, #ff73b8, #e94693);
  color: #fff;
  border-color: transparent;
}

.primary-btn:hover,
.secondary-btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
}

.error-text {
  min-height: 22px;
  color: #cc245c;
}

.status-line {
  font-weight: 600;
}

.site-main {
  display: grid;
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1fr;
  gap: 20px;
  padding: 22px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.cover-frame {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 225, 239, 0.95), rgba(255, 242, 248, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  text-align: center;
  color: var(--text-sub);
}

.cover-placeholder span {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-dark);
}

.cover-upload {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-dark);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 92, 168, 0.14);
}

.heart-stage {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.heart-aura {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 101, 176, 0.5) 0%, rgba(255, 101, 176, 0) 70%);
  animation: aura-pulse 3.2s ease-in-out infinite;
}

.heart-rays {
  position: absolute;
  width: 320px;
  height: 320px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    linear-gradient(transparent 49%, rgba(255, 255, 255, 0.6) 50%, transparent 51%);
  opacity: 0.5;
  transform: rotate(18deg);
  animation: ray-spin 14s linear infinite;
}

.heart-wrap {
  position: relative;
  width: 180px;
  height: 165px;
  animation: heart-bounce 1.8s ease-in-out infinite;
}

.heart-shape {
  position: absolute;
  inset: 0;
  transform: rotate(-45deg);
  border-radius: 28px;
  background: linear-gradient(145deg, #ff81c2 0%, #ff4f9b 70%, #ef2d85 100%);
  box-shadow:
    0 28px 50px rgba(255, 86, 161, 0.28),
    0 0 60px rgba(255, 126, 193, 0.35);
}

.heart-shape::before,
.heart-shape::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: inherit;
}

.heart-shape::before {
  top: -90px;
  left: 0;
}

.heart-shape::after {
  left: 90px;
  top: 0;
}

.spark {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 18px rgba(255, 170, 212, 0.95);
}

.spark-a {
  width: 14px;
  height: 14px;
  left: 24%;
  top: 18%;
  animation: sparkle 2.8s ease-in-out infinite;
}

.spark-b {
  width: 10px;
  height: 10px;
  right: 18%;
  top: 24%;
  animation: sparkle 2.4s ease-in-out infinite 0.4s;
}

.spark-c {
  width: 16px;
  height: 16px;
  right: 28%;
  bottom: 16%;
  animation: sparkle 2.6s ease-in-out infinite 0.8s;
}

@keyframes heart-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-10px) scale(1.05); }
  60% { transform: translateY(0) scale(0.98); }
}

@keyframes aura-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.55; }
  50% { transform: scale(1.12); opacity: 0.78; }
}

@keyframes ray-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sparkle {
  0%, 100% { transform: scale(0.7); opacity: 0.2; }
  50% { transform: scale(1.15); opacity: 1; }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.feature-card {
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.photo-card,
.message-card {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
}

.photo-actions,
.message-actions {
  display: flex;
  gap: 10px;
}

.message-list {
  display: grid;
  gap: 14px;
}

.message-title {
  margin-bottom: 10px;
  font-weight: 600;
}

.message-body {
  resize: vertical;
  min-height: 110px;
}

@media (max-width: 980px) {
  .hero-card,
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px;
  }

  .card-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
