:root {
    --bg: #fff5f7;
    --card: #ffffff;
    --pink: #ec4899;
    --pink-dark: #db2777;
    --pink-light: #fbcfe8;
    --text: #4a2b39;
    --muted: #9b7285;
    --border: #f7d9e3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* 顶部导航 */
.topbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
}
.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pink-dark);
    text-decoration: none;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
    padding: 7px 16px;
    border-radius: 20px;
    color: var(--text);
    text-decoration: none;
    font-size: .92rem;
    transition: all .2s;
}
.nav-links a:hover,
.nav-links a.active {
    background: var(--pink);
    color: #fff;
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 16px 60px;
    background: linear-gradient(180deg, #fff0f5 0%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
}
.hero-compact { padding: 60px 16px 40px; }
.hero-compact h1 { margin-bottom: 12px; }
.tag {
    display: inline-block;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--pink-dark);
    padding: 7px 18px;
    border-radius: 24px;
    font-size: .85rem;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.35;
    margin-bottom: 18px;
    color: #2d2d2d;
}
.gradient-text {
    background: linear-gradient(90deg, var(--pink), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero > p {
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 1.02rem;
}
.hero-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 26px;
    text-decoration: none;
    font-size: 1rem;
    transition: all .2s;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: var(--pink);
    color: #fff;
    box-shadow: 0 4px 16px rgba(236, 72, 153, .32);
}
.btn-primary:hover { background: var(--pink-dark); transform: translateY(-2px); }
.btn-outline {
    background: #fff;
    color: var(--pink-dark);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--pink); color: var(--pink); }

/* 漂浮爱心 */
.heart-float {
    position: absolute;
    color: var(--pink-light);
    font-size: 1.4rem;
    opacity: .55;
    animation: floatUp 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes floatUp {
    0%, 100% { transform: translateY(0) scale(1); opacity: .55; }
    50% { transform: translateY(-25px) scale(1.15); opacity: .85; }
}

/* 表单 */
.write-section { padding: 48px 16px; }
.form-card { max-width: 620px; margin: 0 auto; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(236, 72, 153, .08);
}
.card h2 { margin-bottom: 16px; font-size: 1.25rem; color: var(--pink-dark); }

form label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
form input, form textarea {
    width: 100%;
    margin-top: 6px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    color: var(--text);
    background: #fffafc;
}
form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, .12);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
form button {
    background: var(--pink);
    color: #fff;
    border: none;
    padding: 11px 26px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s;
}
form button:hover { background: var(--pink-dark); }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: .95rem;
}
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* 表白墙 */
.wall-section { padding: 40px 16px 60px; }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title h2 { font-size: 1.9rem; }
.section-title p { color: var(--muted); margin-top: 6px; }

.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    list-style: none;
}
.wall-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    box-shadow: 0 2px 10px rgba(236, 72, 153, .06);
    transition: transform .2s, box-shadow .2s;
}
.wall-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(236, 72, 153, .12);
}
.wall-card-header {
    color: var(--pink-dark);
    font-weight: 600;
    font-size: .96rem;
    margin-bottom: 10px;
}
.wall-card-content {
    color: var(--text);
    line-height: 1.75;
    flex: 1;
}
.wall-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: .8rem;
    color: var(--muted);
}
.wall-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.wall-actions span { display: flex; align-items: center; gap: 3px; }
.like-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .8rem;
    transition: color .2s;
}
.like-btn:hover { color: var(--pink-dark); }
.like-btn.liked { color: var(--pink); }

.empty { text-align: center; color: var(--muted); padding: 30px 0; }

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
    padding: 26px 0;
    border-top: 1px solid var(--border);
}

@media (max-width: 520px) {
    .topbar-flex { height: auto; flex-direction: column; gap: 8px; padding: 10px 0; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .hero-compact { padding: 40px 16px 30px; }
}
