/* ===== 全局样式 ===== */
:root {
    --primary: #e94560;
    --primary-light: #ff6b81;
    --primary-dark: #c73651;
    --pink: #ff9a9e;
    --peach: #fecfef;
    --bg: #faf5f7;
    --card-bg: #ffffff;
    --text: #2d2d2d;
    --text-light: #888;
    --text-lighter: #bbb;
    --border: #f0e0e5;
    --shadow: 0 2px 16px rgba(233,69,96,0.08);
    --shadow-hover: 0 8px 32px rgba(233,69,96,0.15);
    --radius: 14px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* ===== 背景装饰 ===== */
.bg-decor {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.bg-circle.c1 {
    width: 400px; height: 400px;
    background: var(--pink);
    top: -100px; right: -100px;
    animation: float1 20s ease-in-out infinite;
}

.bg-circle.c2 {
    width: 300px; height: 300px;
    background: var(--peach);
    bottom: -50px; left: -80px;
    animation: float2 25s ease-in-out infinite;
}

.bg-circle.c3 {
    width: 200px; height: 200px;
    background: #ffd1dc;
    top: 50%; left: 50%;
    animation: float3 18s ease-in-out infinite;
}

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px,60px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px,-40px); } }
@keyframes float3 { 0%,100% { transform: translate(-50%,-50%); } 50% { transform: translate(-40%,-60%); } }

/* ===== 头部导航 ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
}

.logo-icon { font-size: 24px; }

.nav { display: flex; gap: 12px; align-items: center; }

.nav-link {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
}

.nav-link:hover { color: var(--primary); background: rgba(233,69,96,0.06); }
.nav-link.active { color: var(--primary); }

.nav-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff !important;
    padding: 8px 20px;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}

/* ===== 主内容容器 ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    flex: 1;
    width: 100%;
    will-change: opacity, transform;
}

/* ===== 表白墙卡片 ===== */
.wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card:hover::before { opacity: 1; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.avatar-fallback {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.name { font-weight: 600; font-size: 15px; }
.time { font-size: 12px; color: var(--text-lighter); }

.to-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.to-arrow {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.to-name {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.to-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(233,69,96,0.2);
}

.card-body {
    margin-bottom: 12px;
    max-height: 51px;
    overflow: hidden;
    position: relative;
}

.card-body::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    padding-left: 20px;
    background: linear-gradient(to right, transparent, #fff 50%);
    color: var(--text-lighter);
    font-size: 14px;
    pointer-events: none;
}

.content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    word-break: break-word;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}

.card-footer:empty {
    display: none;
}

.respond-badge {
    font-size: 12px;
    color: var(--text-light);
}

.allow-respond {
    font-size: 12px;
    color: var(--primary);
    background: rgba(233,69,96,0.06);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ===== 回应轮转 ===== */
.card-responds {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin: 0 -4px;
    background: rgba(233,69,96,0.04);
    border-radius: 8px;
    margin-bottom: 8px;
}

.resp-carousel {
    flex: 1;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.resp-slide {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
}

.resp-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.resp-slide-name {
    color: var(--primary);
    font-weight: 500;
    flex-shrink: 0;
}

.resp-slide-text {
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
}

.resp-count {
    font-size: 11px;
    color: var(--text-lighter);
    flex-shrink: 0;
    background: rgba(0,0,0,0.04);
    padding: 2px 6px;
    border-radius: 8px;
}

/* ===== 空状态 ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state p { color: var(--text-light); margin-bottom: 24px; }

.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border-radius: 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233,69,96,0.4); }

/* ===== 加载更多 ===== */
.load-more { text-align: center; padding: 32px 0; }

.btn-load {
    padding: 12px 40px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: 24px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: none; } }

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border: none;
    background: rgba(0,0,0,0.06);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s;
}

.modal-close:hover { background: rgba(0,0,0,0.1); }

/* ===== 详情页 ===== */
.detail-card { margin-bottom: 24px; }

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.detail-body {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.detail-body .content { font-size: 16px; line-height: 1.8; }

.detail-meta {
    padding-top: 12px;
    font-size: 12px;
    color: var(--text-lighter);
}

/* ===== 回应区域 ===== */
.respond-section {
    background: rgba(233,69,96,0.03);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
}

.respond-title {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text);
}

.respond-list { margin-bottom: 20px; }

.respond-item {
    padding: 14px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.respond-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 4px;
}

.respond-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.respond-time {
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 4px;
    display: block;
}

.respond-form { margin-top: 16px; }

.respond-form-header {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text);
}

.respond-form input,
.respond-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text);
}

.respond-form input:focus,
.respond-form textarea:focus { border-color: var(--primary); }

.btn-respond {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-respond:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233,69,96,0.3); }

/* ===== 发布页 ===== */
.publish-wrap {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.publish-header {
    text-align: center;
    margin-bottom: 32px;
}

.publish-header h2 {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 4px;
}

.publish-header p {
    font-size: 14px;
    color: var(--text-light);
}

.publish-form .form-group {
    margin-bottom: 20px;
}

.publish-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.required { color: var(--primary); }

.publish-form textarea,
.publish-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: vertical;
    background: #fff;
    color: var(--text);
}

.publish-form textarea:focus,
.publish-form input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.08);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.gender-select {
    display: flex;
    gap: 8px;
}

.gender-option {
    flex: 1;
    cursor: pointer;
}

.gender-option input { display: none; }

.gender-label {
    display: block;
    text-align: center;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.gender-option input:checked + .gender-label {
    border-color: var(--primary);
    background: rgba(233,69,96,0.06);
    color: var(--primary);
}

/* 开关 */
.toggle-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-label input { display: none; }

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 2px; left: 2px;
    transition: transform 0.3s;
}

.toggle-label input:checked + .toggle-switch {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(20px);
}

.respond-password-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-lighter);
    font-size: 12px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== 底部 ===== */
.footer {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(233,69,96,0.1);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-logo {
    font-size: 16px;
    opacity: 0.8;
}

.footer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    opacity: 0.7;
}

.footer-sep {
    width: 1px;
    height: 14px;
    background: var(--border);
}

.footer-slogan {
    font-size: 12px;
    color: var(--text-lighter);
    letter-spacing: 0.5px;
}

.footer-right {
    font-size: 12px;
    color: var(--text-lighter);
    opacity: 0.6;
}

/* ===== 响应式 ===== */
/* ===== 封禁页面 ===== */
.banned-page {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 48px 32px;
    box-shadow: var(--shadow);
}

.banned-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.banned-title {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 8px;
}

.banned-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.banned-reason {
    background: rgba(233,69,96,0.06);
    border: 1px solid rgba(233,69,96,0.15);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.banned-reason-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banned-reason-text {
    font-size: 14px;
    color: var(--text);
    margin-top: 6px;
    line-height: 1.6;
}

.banned-info {
    font-size: 12px;
    color: var(--text-lighter);
    margin-bottom: 28px;
    font-family: 'Consolas', monospace;
}

.btn-back-home {
    display: inline-block;
    padding: 10px 28px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.2s;
}

.btn-back-home:hover {
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 768px) {
    .wall { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .publish-wrap { padding: 24px 20px; }
    .container { padding: 20px 16px 60px; }
    .header-inner { padding: 0 16px; }
    .modal { padding: 24px; max-height: 90vh; }
    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
    .footer-sep { display: none; }
}
