:root {
  --bg: #f6f7fb;
  --ink: #2b2b33;
  --muted: #7a7d8a;
  --line: #e6e8f0;
  --pink: #ff6b8a;
  --blue: #4aa3ff;
  --purple: #8b7cff;
  --orange: #ff8a4c;
  --card: #ffffff;
  --shadow: 0 14px 40px rgba(40, 45, 80, 0.08);
  --radius: 20px;
  --font: "DM Sans", "PingFang SC", sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
body.home-page { background: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border-radius: 14px; }

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  font-family: var(--display);
  font-size: 1.35rem;
}
.slogan {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  font-size: 0.92rem;
  margin-left: auto;
}
.who {
  color: var(--muted);
  padding-left: 0.5rem;
  border-left: 1px solid var(--line);
}
.logout { color: var(--pink); }

.wrap {
  width: min(980px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}
.wrap-cards {
  width: min(980px, calc(100% - 2rem));
  margin: -2.2rem auto 1.5rem;
  position: relative;
  z-index: 5;
}

.page-head { margin-bottom: 1.25rem; }
.eyebrow {
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--pink);
  margin: 0 0 0.45rem;
}
h1, h2, h3 { font-family: var(--display); margin: 0 0 0.55rem; font-weight: 700; }
.sub, .muted, .hint { color: var(--muted); }
.sub { margin: 0 0 1rem; line-height: 1.6; }
.text-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--blue);
  font-weight: 600;
}

.btn, button {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #ff7b9c, #ff5d7a);
  color: white;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.danger {
  background: transparent;
  color: #c44;
  border: 1px solid var(--line);
}

.panel, .login-card, .log-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.panel.soft { box-shadow: none; }

.login-hero {
  min-height: 80vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(700px 320px at 20% 0%, #ffe2ea 0%, transparent 60%),
    radial-gradient(700px 320px at 90% 10%, #dde9ff 0%, transparent 55%),
    var(--bg);
}
.login-card { width: min(420px, 100%); text-align: center; }
.login-card h1 { font-size: 2.2rem; }
.login-card .stack { text-align: left; }

.stack { display: grid; gap: 0.9rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
}

/* ===== Like_Girl style home ===== */
.couple-hero {
  position: relative;
  min-height: 58vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.couple-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20,18,30,0.25), rgba(20,18,30,0.45)),
    url("https://images.unsplash.com/photo-1473951574080-01fe45ecff8a?auto=format&fit=crop&w=1600&q=80")
      center/cover no-repeat;
  transform: scale(1.02);
}
.couple-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.4rem 1.8rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.person { text-align: center; }
.avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.8rem;
  color: #fff;
  border: 4px solid rgba(255,255,255,0.9);
  margin: 0 auto 0.55rem;
}
.avatar-boy { background: linear-gradient(145deg, #6eb6ff, #3c86f0); }
.avatar-girl { background: linear-gradient(145deg, #ff9bb3, #ff6b8a); }
.name {
  font-family: var(--display);
  font-size: 1.25rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.heart {
  color: #ff4d6d;
  font-size: 1.6rem;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.timer-section {
  text-align: center;
  padding: 2.2rem 1rem 2.8rem;
  background:
    linear-gradient(#ffffff, #ffffff),
    repeating-linear-gradient(0deg, transparent, transparent 23px, #eef0f6 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, #eef0f6 24px);
  background-blend-mode: normal;
  border-bottom: 1px solid var(--line);
}
.timer-label {
  margin: 0 0 0.6rem;
  color: var(--orange);
  font-weight: 600;
}
.timer-value {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.nav-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.2rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(40, 45, 80, 0.12);
}
.nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
}
.nav-card--blue .nav-icon { background: #e8f3ff; }
.nav-card--pink .nav-icon { background: #ffe8ef; }
.nav-card--purple .nav-icon { background: #eee8ff; }
.nav-card strong { font-size: 1.05rem; }
.nav-card span { color: var(--muted); font-size: 0.88rem; }

.home-more { margin-top: 0.5rem; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.list, .card-list, .flash-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li, .card-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.home-flash {
  width: min(980px, calc(100% - 2rem));
  margin: 1rem auto 0;
}
.flash {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.flash.ok { background: #e7f8ef; }
.flash.error { background: #ffe8e8; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.photo-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.photo-grid figcaption, .log-meta {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.log-list { display: grid; gap: 1rem; margin-top: 1.25rem; }
.log-card img { margin-top: 0.75rem; }

@media (max-width: 800px) {
  .nav-cards, .grid-2 { grid-template-columns: 1fr; }
  .couple-panel { gap: 0.9rem; padding: 1rem 1.1rem; }
  .avatar { width: 72px; height: 72px; }
  .topbar { align-items: flex-start; }
  .topbar nav { margin-left: 0; }
}
