* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 头部 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1a1a1a;
}

.logo {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.tagline {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.update-time {
    margin-top: 12px;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.update-badge {
    background: #1a1a1a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #ffd700;
}

/* 标签导航 */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
}

.tab {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #666;
    padding: 10px 28px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.tab:hover {
    border-color: #444;
    color: #999;
}

.tab.active {
    background: #ffd700;
    color: #0a0a0a;
    border-color: #ffd700;
    font-weight: 600;
}

/* 内容区域 */
.content {
    display: none;
}

.content.active {
    display: block;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2a2a2a;
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* 热搜列表 - 方案 C 紧凑单行式 */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trending-item {
    background: #121212;
    border: 1px solid #1a1a1a;
    padding: 16px 18px;
    border-radius: 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.trending-item:hover {
    background: #1a1a1a;
    border-color: #2a2a2a;
    transform: translateX(4px);
}

.item-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.rank {
    font-size: 22px;
    font-weight: 800;
    min-width: 35px;
    text-align: center;
}

.rank.top1 { color: #ffd700; }
.rank.top2 { color: #c0c0c0; }
.rank.top3 { color: #cd7f32; }
.rank.normal { color: #444; }

.trending-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.heat-score {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b6b;
    white-space: nowrap;
}

.item-bottom {
    padding-left: 51px;
}

.trending-description {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-all;
    height: 62.4px;
    /* 13px * 1.6 * 3 = 62.4px，确保固定高度 */
}

/* 金银铜边框 */
.trending-item:nth-child(1) { 
    border: 2px solid transparent;
    background: linear-gradient(#121212, #121212) padding-box,
                linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1)) border-box;
}

.trending-item:nth-child(2) { 
    border: 2px solid transparent;
    background: linear-gradient(#121212, #121212) padding-box,
                linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(192, 192, 192, 0.1)) border-box;
}

.trending-item:nth-child(3) { 
    border: 2px solid transparent;
    background: linear-gradient(#121212, #121212) padding-box,
                linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(205, 127, 50, 0.1)) border-box;
}

/* KOL 推文列表 */
.kol-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kol-item {
    background: #121212;
    border: 1px solid #1a1a1a;
    padding: 20px;
    border-radius: 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.kol-item:hover {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

.kol-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.kol-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0a0a0a;
    font-size: 15px;
    flex-shrink: 0;
}

.kol-info {
    flex: 1;
    min-width: 0;
}

.kol-name {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kol-time {
    font-size: 11px;
    color: #666;
}

.kol-engagement {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 600;
}

.kol-content {
    font-size: 14px;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 12px;
}

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

.tag {
    color: #ffd700;
    font-size: 13px;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 25px 15px;
    }

    .logo {
        font-size: 36px;
    }

    .tabs {
        gap: 8px;
    }

    .tab {
        padding: 8px 20px;
        font-size: 13px;
    }

    .trending-item {
        padding: 14px 16px;
    }

    .item-top {
        gap: 12px;
    }

    .rank {
        font-size: 20px;
        min-width: 30px;
    }

    .trending-title {
        font-size: 14px;
    }

    .heat-score {
        font-size: 14px;
    }

    .item-bottom {
        padding-left: 42px;
    }

    .trending-description {
        font-size: 12px;
    }
}

/* 悬浮分享按钮 (FAB) */
.share-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.fab-main {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transition: all 0.3s;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.fab-main:active {
    transform: scale(0.95);
}

.fab-main svg {
    color: #0a0a0a;
}

.fab-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #333;
}

.fab-menu.active {
    display: flex;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.fab-item:hover {
    background: #222;
}

.fab-item svg {
    flex-shrink: 0;
}

.fab-item span {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

@media (max-width: 768px) {
    .share-fab {
        bottom: 20px;
        right: 20px;
    }
    
    .fab-main {
        width: 56px;
        height: 56px;
    }
    
    .fab-menu {
        bottom: 70px;
    }
}

/* 模态框 */
.modal {
    display: none !important;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background-color: #1a1a1a;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    text-align: center;
    position: relative;
}

.close {
    color: #888;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: #fff;
}

#posterCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 100%);
    color: #0a0a0a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* PWA 安装卡片 */
.pwa-install-card {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 14px 18px;
    display: none;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 40px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    z-index: 999;
    animation: slideUp 0.3s ease;
}

.pwa-install-card.show {
    display: flex;
}

.pwa-card-logo {
    font-size: 32px;
    flex-shrink: 0;
}

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

.pwa-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.pwa-card-desc {
    font-size: 12px;
    color: #888;
}

.pwa-card-install {
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 100%);
    color: #0a0a0a;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.pwa-card-install:hover {
    transform: scale(1.05);
}

.pwa-card-close {
    background: transparent;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.pwa-card-close:hover {
    color: #fff;
}

/* iOS 安装横幅 */
.ios-install-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 107, 107, 0.95) 100%);
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.ios-install-banner.show {
    display: flex;
}

.ios-banner-content {
    flex: 1;
    color: #0a0a0a;
}

.ios-banner-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ios-banner-text {
    font-size: 12px;
    opacity: 0.8;
}

.ios-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ios-banner-btn {
    background: rgba(10, 10, 10, 0.9);
    color: #ffd700;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.ios-banner-btn:hover {
    background: #0a0a0a;
}

.ios-banner-close {
    background: transparent;
    border: none;
    color: #0a0a0a;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ios-banner-close:hover {
    opacity: 1;
}

