/**
 * 校园表白墙 - 小红书风格样式
 */

/* ===== CSS变量 ===== */
:root {
    --primary: #ff2442;
    --primary-light: #ff4d6d;
    --primary-gradient: linear-gradient(135deg, #ff2442 0%, #ff6b81 100%);
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #999999;
    --text-light: #bbbbbb;
    --border: #eeeeee;
    --border-light: #f5f5f5;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --header-height: 56px;
    --nav-height: 60px;
    --category-height: 48px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== 重置样式 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

textarea {
    resize: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== 顶部搜索栏 ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    max-width: 768px;
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.logo i {
    font-size: 22px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.search-box:hover {
    background: #ebebeb;
}

.search-box i {
    font-size: 14px;
    color: var(--text-light);
}

.header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.header-icon:active {
    background: var(--border);
}

/* ===== 分类导航 ===== */
.category-nav {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    max-width: 768px;
    margin: 0 auto;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.category-item i {
    font-size: 12px;
}

.category-item.active {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.3);
}

.category-item:not(.active):hover {
    background: var(--border-light);
    color: var(--text);
}

/* ===== 瀑布流容器 ===== */
.waterfall-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 12px;
}

.waterfall {
    column-count: 2;
    column-gap: 10px;
}

@media (min-width: 640px) {
    .waterfall {
        column-count: 3;
        column-gap: 12px;
    }
}

@media (min-width: 1024px) {
    .waterfall {
        column-count: 4;
        column-gap: 14px;
    }
}

/* ===== 表白卡片 ===== */
.confession-card {
    break-inside: avoid;
    margin-bottom: 10px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: cardAppear 0.5s ease-out backwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confession-card:nth-child(1) { animation-delay: 0s; }
.confession-card:nth-child(2) { animation-delay: 0.05s; }
.confession-card:nth-child(3) { animation-delay: 0.1s; }
.confession-card:nth-child(4) { animation-delay: 0.15s; }
.confession-card:nth-child(5) { animation-delay: 0.2s; }
.confession-card:nth-child(6) { animation-delay: 0.25s; }
.confession-card:nth-child(7) { animation-delay: 0.3s; }
.confession-card:nth-child(8) { animation-delay: 0.35s; }

.confession-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.confession-card:active {
    transform: scale(0.98);
}

.card-header {
    padding: 14px 14px 10px;
    position: relative;
}

.card-to {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.card-to i {
    color: var(--primary);
    font-size: 11px;
}

.top-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-gradient);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.card-body {
    padding: 0 14px 12px;
}

.card-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.card-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border-light);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-category {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-category i {
    font-size: 10px;
}

.card-time {
    font-size: 11px;
    color: var(--text-light);
}

.card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.author-avatar.anonymous {
    background: linear-gradient(135deg, #a8a8a8 0%, #c0c0c0 100%);
}

.author-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    padding: 4px 0;
}

.action-btn i {
    font-size: 16px;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--primary);
}

.action-btn.liked {
    color: var(--primary);
}

.action-btn.liked i {
    animation: likeBounce 0.4s ease;
}

@keyframes likeBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.action-btn .count {
    font-size: 12px;
}

/* ===== 加载更多 ===== */
.load-more {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more:hover {
    color: var(--primary);
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 16px;
    color: var(--border);
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 20px;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--card-bg);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 16px;
    color: var(--text-secondary);
    font-size: 10px;
    transition: all 0.2s;
    position: relative;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    font-weight: 900;
}

.nav-publish {
    padding: 0;
}

.publish-btn {
    width: 44px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.35);
    transition: all 0.2s;
}

.publish-btn:active {
    transform: scale(0.9);
}

/* ===== 弹窗系统 ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 搜索弹窗 */
.search-modal {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideDown 0s; /* 搜索从上方下来 */
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border-radius: 20px;
    padding: 8px 14px;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
}

.search-clear {
    color: var(--text-light);
    font-size: 16px;
    padding: 2px;
}

.search-cancel {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 4px;
}

.search-history {
    padding: 16px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.history-header button {
    font-size: 12px;
    color: var(--text-light);
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tags span {
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.history-tags span:hover {
    background: var(--border);
}

.hot-searches {
    padding: 0 16px 16px;
}

.hot-header {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hot-header i {
    color: #ff6b35;
}

.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-tags span {
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.hot-tags span:hover {
    background: #fff0f2;
    color: var(--primary);
}

/* 发布弹窗 */
.publish-modal {
    width: 100%;
    max-width: 768px;
    margin: auto auto 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.publish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
}

.publish-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.publish-form {
    padding: 16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group label i {
    color: var(--primary);
    margin-right: 4px;
    width: 16px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: var(--card-bg);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1);
}

.form-group textarea {
    line-height: 1.6;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 分类选择 */
.category-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-option input {
    display: none;
}

.cat-option span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.cat-option span i {
    font-size: 12px;
}

.cat-option input:checked + span {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary);
}

/* 匿名开关 */
.anonymous-toggle {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-switch::after {
    left: 22px;
}

/* 详情弹窗 */
.detail-modal {
    width: 100%;
    max-width: 768px;
    margin: auto auto 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.detail-content {
    padding: 20px 16px;
}

.detail-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.detail-to {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.detail-to i {
    color: var(--primary);
    font-size: 14px;
}

.detail-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-category {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--bg);
    font-weight: 600;
}

.detail-time {
    font-size: 12px;
    color: var(--text-light);
}

.detail-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.detail-author .author-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.detail-author .author-info {
    flex: 1;
}

.author-label {
    font-size: 11px;
    color: var(--text-light);
}

.author-name-lg {
    font-size: 14px;
    font-weight: 600;
}

/* 详情操作栏 */
.detail-actions-bar {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.detail-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.detail-action-btn i {
    font-size: 22px;
}

.detail-action-btn.liked {
    color: var(--primary);
}

.detail-action-btn:active {
    background: var(--bg);
}

/* 评论区 */
.comments-section h4 {
    font-size: 15px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comments-section h4 i {
    color: var(--primary);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    background: var(--bg);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comment-name {
    font-size: 13px;
    font-weight: 600;
}

.comment-time {
    font-size: 11px;
    color: var(--text-light);
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

/* 评论输入 */
.comment-form {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding: 10px 0;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.comment-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: var(--bg);
}

.comment-form input:focus {
    border-color: var(--primary);
}

.comment-form button {
    padding: 10px 18px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.comment-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-comments {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 13px;
}

/* ===== 分享弹窗 ===== */
.share-modal {
    width: 100%;
    max-width: 400px;
    margin: auto auto 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px;
    text-align: center;
}

.share-modal h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.share-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 24px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.share-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text);
    transition: all 0.2s;
}

.share-icon:hover {
    transform: scale(1.05);
}

.share-icon.wechat {
    background: #e8f5e9;
    color: #07c160;
}

.share-icon.qq {
    background: #e3f2fd;
    color: #2196f3;
}

.share-option span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 按钮样式 ===== */
.btn-primary {
    padding: 8px 18px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.35);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-text {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 4px;
}

.btn-cancel {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    margin-top: 10px;
}

/* ===== Toast提示 ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 页面标题栏（非首页） ===== */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-header h1 {
    font-size: 17px;
    font-weight: 600;
}

.page-header .back-btn {
    position: absolute;
    left: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
}

/* ===== 发现页面 ===== */
.discover-section {
    padding: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 热榜 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-item:active {
    transform: scale(0.98);
}

.ranking-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.ranking-num.top1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: white;
}

.ranking-num.top2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: white;
}

.ranking-num.top3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
}

.ranking-num.normal {
    background: var(--bg);
    color: var(--text-secondary);
}

.ranking-content {
    flex: 1;
    min-width: 0;
}

.ranking-to {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-text {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.ranking-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== 关于页面 ===== */
.about-content {
    padding: 20px 16px;
    max-width: 768px;
    margin: 0 auto;
}

.about-hero {
    text-align: center;
    padding: 40px 20px;
}

.about-hero .logo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    color: white;
    box-shadow: 0 4px 16px rgba(255, 36, 66, 0.3);
}

.about-hero h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.about-hero p {
    color: var(--text-secondary);
    font-size: 14px;
}

.about-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.about-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text);
}

.about-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-links {
    display: flex;
    flex-direction: column;
}

.about-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.about-link:last-child {
    border-bottom: none;
}

.about-link i:first-child {
    width: 24px;
    color: var(--primary);
}

.about-link i:last-child {
    color: var(--text-light);
    font-size: 12px;
}

.about-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 12px;
}

/* ===== 响应式调整 ===== */
@media (max-width: 380px) {
    .waterfall {
        column-count: 2;
        column-gap: 8px;
    }

    .confession-card {
        margin-bottom: 8px;
    }

    .card-content {
        font-size: 13px;
    }

    .nav-item {
        padding: 6px 10px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* 选中文本颜色 */
::selection {
    background: rgba(255, 36, 66, 0.2);
}

/* ===== 红点提醒 ===== */
.red-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #ff2442;
    border-radius: 50%;
    border: 2px solid white;
}

/* ===== 通知页面 ===== */
.notif-page {
    max-width: 768px;
    margin: 0 auto;
    background: var(--card-bg);
    min-height: 100vh;
}

.notif-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.notif-list {
    padding: 8px 0;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s;
}

.notif-item:hover {
    background: #fafafa;
}

.notif-item.unread {
    background: #fff8f9;
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notif-icon.like { background: #fff0f2; color: #ff2442; }
.notif-icon.comment { background: #eef2ff; color: #4f46e5; }
.notif-icon.message { background: #ecfdf5; color: #059669; }
.notif-icon.system { background: #fff7ed; color: #ea580c; }

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.notif-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-time {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.notif-badge {
    width: 8px;
    height: 8px;
    background: #ff2442;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
