/* ===== 白鲸信息板 · 深海静谧风格 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep: #0B3B4A;
    --ocean: #1A5F6E;
    --wave: #2E8B8C;
    --mist: #C5E1E6;
    --sand: #F5F0E8;
    --white: #FFFFFF;
    --gold: #D4A853;
    --silver: #A8B8C0;
    --bronze: #C9896E;
    --shadow-soft: 0 8px 24px rgba(11, 59, 74, 0.08);
    --shadow-hover: 0 16px 32px rgba(11, 59, 74, 0.12);
    --radius-card: 20px;
    --radius-pinned: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', sans-serif;
    background: linear-gradient(165deg, #E8F0F2 0%, #D6E8EC 100%);
    min-height: 100vh;
    color: var(--deep);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

/* ===== 导航栏 ===== */
.navbar {
    padding: 20px 0 16px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(11, 59, 74, 0.1);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--deep);
}

.nav-meta {
    display: flex;
    align-items: center;
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    color: var(--ocean);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--wave);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* ===== 置顶区域 ===== */
.pinned-section {
    margin-bottom: 28px;
}

.section-label {
    margin-bottom: 12px;
    padding-left: 4px;
}

.section-label span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ocean);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.pinned-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px 12px;
}

.pinned-scroll::-webkit-scrollbar {
    display: none;
}

.pinned-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-pinned);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s;
}

.pinned-card:active {
    transform: scale(0.98);
}

.pinned-card .pin-icon {
    color: var(--wave);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.pinned-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--deep);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pinned-card p {
    font-size: 0.8rem;
    color: var(--ocean);
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pinned-placeholder {
    flex: 0 0 100%;
    text-align: center;
    padding: 24px;
    color: var(--ocean);
    opacity: 0.6;
}

/* ===== 信息流时间线 ===== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-card {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.timeline-card:hover {
    box-shadow: var(--shadow-hover);
}

.card-layout {
    display: flex;
    padding: 18px 16px;
    gap: 16px;
}

.card-visual {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--mist), #B8D4DB);
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-visual-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #A8CFD6, #8BBCC4);
    color: var(--white);
    font-size: 2rem;
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 8px;
    color: var(--deep);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--ocean);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-date {
    font-size: 0.7rem;
    color: var(--ocean);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeline-card.has-full-image .card-layout {
    flex-direction: column;
    padding: 0 0 16px;
}

.timeline-card.has-full-image .card-visual {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.timeline-card.has-full-image .card-body {
    padding: 0 16px;
}

.timeline-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--ocean);
}

.wave-loader {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.wave-loader span {
    width: 8px;
    height: 8px;
    background: var(--wave);
    border-radius: 50%;
    animation: wave 1.4s ease-in-out infinite;
}

.wave-loader span:nth-child(2) { animation-delay: 0.2s; }
.wave-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-12px); opacity: 1; }
}

.empty-timeline {
    text-align: center;
    padding: 60px 20px;
    color: var(--ocean);
    opacity: 0.7;
}

.empty-timeline svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===== 赞助与交流区 ===== */
.support-section {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 赞助入口卡片 */
.support-card {
    background: linear-gradient(135deg, var(--white) 0%, #F8FDFE 100%);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(46, 139, 140, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

.support-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(46, 139, 140, 0.3);
}

.support-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-icon {
    font-size: 1.8rem;
}

.support-header h3 {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--deep);
}

.support-arrow {
    font-size: 1.8rem;
    color: var(--wave);
    opacity: 0.6;
}

.support-desc {
    margin-top: 6px;
    margin-left: 48px;
    font-size: 0.85rem;
    color: var(--ocean);
    opacity: 0.8;
}

/* 交流群卡片 */
.qun-card {
    background: var(--white);
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qun-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.qun-icon {
    font-size: 1.8rem;
}

.qun-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--deep);
    margin-bottom: 2px;
}

.qun-number {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--wave);
    letter-spacing: 1px;
}

.qun-copy-btn {
    background: linear-gradient(135deg, var(--wave), var(--ocean));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(46, 139, 140, 0.25);
}

.qun-copy-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(46, 139, 140, 0.35);
}

.qun-copy-btn:active {
    transform: scale(0.98);
}

/* 排行榜预览 */
.rank-preview {
    background: var(--white);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.rank-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 500;
    color: var(--deep);
}

.rank-more {
    color: var(--wave);
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.rank-more:hover {
    opacity: 0.7;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(197, 225, 230, 0.3);
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-medal {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.rank-medal.gold {
    color: var(--gold);
}

.rank-medal.silver {
    color: var(--silver);
}

.rank-medal.bronze {
    color: var(--bronze);
}

.rank-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rank-name {
    font-weight: 500;
    color: var(--deep);
}

.rank-amount {
    color: var(--wave);
    font-weight: 500;
}

.rank-amount::before {
    content: '¥';
    font-size: 0.75rem;
    opacity: 0.7;
    margin-right: 2px;
}

.rank-message {
    font-size: 0.75rem;
    color: var(--ocean);
    opacity: 0.7;
    margin-left: 40px;
    margin-top: -4px;
}

.rank-loading {
    text-align: center;
    padding: 16px;
    color: var(--ocean);
    opacity: 0.6;
}

/* ===== 弹窗样式 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 59, 74, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 28px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(11, 59, 74, 0.25);
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-content.rank-modal {
    max-width: 400px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(197, 225, 230, 0.3);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--deep);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--ocean);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    opacity: 0.6;
}

.modal-close:hover {
    background: rgba(197, 225, 230, 0.3);
    opacity: 1;
}

.modal-body {
    padding: 22px;
}

.modal-tip {
    text-align: center;
    color: var(--ocean);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.qrcode-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.qrcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qrcode-item img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(11, 59, 74, 0.12);
    border: 2px solid var(--white);
}

.qrcode-item span {
    font-size: 0.9rem;
    color: var(--ocean);
    font-weight: 500;
}

.modal-footer-tip {
    text-align: center;
    margin-top: 20px;
    font-size: 0.75rem;
    color: var(--ocean);
    opacity: 0.7;
}

/* 排行榜弹窗内容 */
.rank-body {
    padding: 0 0 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.rank-summary {
    padding: 8px 22px 16px;
    border-bottom: 1px solid rgba(197, 225, 230, 0.3);
}

.rank-total {
    font-size: 0.85rem;
    color: var(--ocean);
}

.rank-full-list {
    padding: 8px 22px;
}

.rank-full-list .rank-item {
    padding: 12px 0;
}

.rank-full-list .rank-message {
    margin-left: 40px;
    margin-top: -6px;
    margin-bottom: 4px;
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--deep);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    box-shadow: 0 8px 20px rgba(11, 59, 74, 0.3);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== 页脚 ===== */
.page-footer {
    margin-top: 40px;
    text-align: center;
}

.page-footer p {
    font-size: 0.7rem;
    color: var(--ocean);
    opacity: 0.5;
    letter-spacing: 0.5px;
}

/* ===== 响应式 ===== */
@media (min-width: 640px) {
    .page {
        padding: 0 20px 32px;
    }
    
    .brand-name {
        font-size: 1.7rem;
    }
    
    .pinned-card {
        flex-basis: 280px;
    }
    
    .timeline-card.has-full-image .card-visual {
        height: 240px;
    }
}

@media (min-width: 768px) {
    .timeline {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .card-layout {
        padding: 14px 12px;
        gap: 12px;
    }
    
    .card-visual {
        width: 70px;
        height: 70px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .qrcode-container {
        flex-direction: column;
        align-items: center;
    }
    
    .qrcode-item img {
        width: 180px;
        height: 180px;
    }
    
    .qun-card {
        padding: 14px 16px;
    }
    
    .qun-copy-btn {
        padding: 8px 16px;
    }
}