/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #07c160;
    --primary-dark: #06ad56;
    --primary-light: #e8f8ee;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --navbar-height: 64px;
    --max-width: 1100px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 6px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.nav-links li a i {
    font-size: 1rem;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.hamburger {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger:hover {
    background: var(--bg);
}

/* ===== 主体 ===== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* ===== 页面标题 ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-header h1 i {
    color: var(--primary);
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    background: linear-gradient(135deg, #07c160 0%, #06ad56 40%, #0b8a4c 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 48px 32px;
}

.hero-content h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 28px;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== 区块标题 ===== */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

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

/* ===== 功能卡片 ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== 动态列表 ===== */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.dynamic-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.2s;
}

.dynamic-item:hover {
    transform: translateX(4px);
}

.dynamic-avatar {
    font-size: 2.4rem;
    color: var(--primary);
    flex-shrink: 0;
}

.dynamic-content {
    flex: 1;
}

.dynamic-content .username {
    font-weight: 600;
    margin-bottom: 4px;
}

.dynamic-content .text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.dynamic-content .time {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 6px;
}

.load-more {
    text-align: center;
}

/* ===== 朋友圈卡片 ===== */
.moments-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.moment-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    transition: transform 0.2s;
}

.moment-card:hover {
    transform: translateY(-2px);
}

.moment-avatar {
    font-size: 2.8rem;
    color: var(--primary);
    flex-shrink: 0;
}

.moment-body {
    flex: 1;
}

.moment-user {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a73e8;
    margin-bottom: 6px;
}

.moment-text {
    color: var(--text);
    margin-bottom: 12px;
}

.moment-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.moment-images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.moment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.moment-actions {
    display: flex;
    gap: 16px;
}

.moment-actions span {
    cursor: pointer;
    transition: color 0.2s;
}

.moment-actions span:hover {
    color: var(--primary);
}

.moment-actions .liked {
    color: #e74c3c;
}

/* ===== 发现页 ===== */
.discover-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.discover-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.discover-item:last-child {
    border-bottom: none;
}

.discover-item:hover {
    background: var(--primary-light);
}

.discover-icon {
    font-size: 1.6rem;
    color: var(--primary);
    width: 40px;
    text-align: center;
}

.discover-info {
    flex: 1;
}

.discover-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.discover-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.arrow {
    color: #ccc;
    font-size: 0.9rem;
}

/* ===== 个人中心 ===== */
.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    margin-bottom: 12px;
}

.profile-card h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.profile-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.profile-stats div {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-stats span {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.me-menu {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--primary-light);
}

.menu-item i:first-child {
    font-size: 1.4rem;
    color: var(--primary);
    width: 32px;
    text-align: center;
}

.menu-item span {
    flex: 1;
    font-weight: 500;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: #aaa;
    font-size: 0.8rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    :root {
        --navbar-height: 56px;
    }

    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 12px 20px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        transform: translateY(-120%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-links li a {
        padding: 12px 16px;
        border-radius: 12px;
        width: 100%;
    }

    .hamburger {
        display: block;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero {
        min-height: 280px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .moment-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .moment-images img {
        height: 100px;
    }

    .profile-stats {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 16px 60px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .moment-images {
        grid-template-columns: 1fr 1fr;
    }

    .moment-images img {
        height: 80px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}