/* ============================================
   特色组件样式 - 热搜、投票、时间线、弹幕、标签云
   ============================================ */

/* === 通用卡片 === */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover-effect);
}

.card__image {
    position: relative;
    overflow: hidden;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card__image img {
    transform: scale(1.05);
}

.card__badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    background: var(--accent);
    color: #FFFFFF;
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.card__badge--exclusive {
    background: var(--primary);
}

.card__badge--hot {
    background: #FF4500;
}

.card__content {
    padding: var(--space-md);
}

.card__title {
    font-size: var(--fs-h4);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
    transition: color var(--transition-fast);
}

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

.card__excerpt {
    font-size: var(--fs-small);
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-family: var(--font-number);
}

.card__meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* === 明星人气投票组件 === */
.poll {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.poll__title {
    font-size: var(--fs-h3);
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--primary);
}

.poll__item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.poll__item:last-child {
    border-bottom: none;
}

.poll__avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--secondary);
    flex-shrink: 0;
}

.poll__info {
    flex: 1;
}

.poll__name {
    font-weight: 700;
    font-size: var(--fs-body);
    margin-bottom: var(--space-xs);
}

.poll__progress {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.poll__progress-bar {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll__votes {
    font-family: var(--font-number);
    font-size: var(--fs-small);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.poll__btn {
    background: var(--gradient-primary);
    color: #FFFFFF;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: 20px;
    font-size: var(--fs-small);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.poll__btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.4);
}

.poll__btn--voted {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* === 八卦事件时间线 === */
.timeline {
    position: relative;
    padding: var(--space-xl) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.timeline__item {
    position: relative;
    padding-left: 60px;
    margin-bottom: var(--space-xl);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.timeline__item:nth-child(1) { animation-delay: 0.1s; }
.timeline__item:nth-child(2) { animation-delay: 0.2s; }
.timeline__item:nth-child(3) { animation-delay: 0.3s; }
.timeline__item:nth-child(4) { animation-delay: 0.4s; }
.timeline__item:nth-child(5) { animation-delay: 0.5s; }

.timeline__dot {
    position: absolute;
    left: 15px;
    top: 4px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: var(--radius-full);
    border: 4px solid var(--bg);
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline__date {
    font-family: var(--font-number);
    font-size: var(--fs-small);
    color: var(--primary);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.timeline__content {
    background: var(--card-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.timeline__title {
    font-size: var(--fs-h4);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.timeline__desc {
    font-size: var(--fs-small);
    color: var(--text-light);
    line-height: 1.8;
}

/* === 弹幕评论飘屏 === */
.bullet-screen {
    position: relative;
    width: 100%;
    height: 200px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-xl) 0;
}

.bullet-screen__item {
    position: absolute;
    white-space: nowrap;
    color: #FFFFFF;
    font-size: var(--fs-small);
    padding: 4px 12px;
    border-radius: 20px;
    animation: bullet-fly linear infinite;
    will-change: transform;
}

.bullet-screen__item--highlight {
    color: var(--secondary);
    font-weight: 700;
}

.bullet-screen__controls {
    position: absolute;
    bottom: var(--space-md);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 var(--space-md);
}

.bullet-screen__input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: var(--space-sm) var(--space-md);
    color: #FFFFFF;
    font-size: var(--fs-small);
}

.bullet-screen__input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.bullet-screen__send {
    background: var(--primary);
    color: #FFFFFF;
    padding: var(--space-sm) var(--space-md);
    border-radius: 20px;
    font-size: var(--fs-small);
    font-weight: 600;
}

.bullet-screen__toggle {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-small);
    padding: var(--space-sm);
}

@keyframes bullet-fly {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* === 话题标签云 === */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-lg);
    justify-content: center;
}

.tag-cloud__item {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text);
    font-size: var(--fs-small);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid var(--border);
}

.tag-cloud__item:hover {
    background: var(--primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
}

.tag-cloud__item--lg {
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--primary);
    border-color: var(--primary);
}

.tag-cloud__item--md {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--accent);
}

.tag-cloud__item--sm {
    font-size: var(--fs-xs);
    color: var(--text-light);
}

/* === 通用按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 24px;
    font-weight: 600;
    font-size: var(--fs-small);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn--primary {
    background: var(--gradient-primary);
    color: #FFFFFF;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
    color: #FFFFFF;
}

.btn--secondary {
    background: var(--card-bg);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn--secondary:hover {
    background: var(--primary);
    color: #FFFFFF;
}

.btn--lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--fs-body);
}

/* === 区块标题 === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.section-header__title {
    font-size: var(--fs-h2);
    font-weight: 800;
    position: relative;
    padding-left: var(--space-md);
}

.section-header__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-header__more {
    color: var(--text-muted);
    font-size: var(--fs-small);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.section-header__more:hover {
    color: var(--primary);
}

/* === 动画关键帧 === */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes heartBurst {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

/* === 瀑布流布局 === */
.waterfall {
    column-count: 3;
    column-gap: var(--space-lg);
}

.waterfall__item {
    break-inside: avoid;
    margin-bottom: var(--space-lg);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.waterfall__item--visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .waterfall {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .waterfall {
        column-count: 1;
    }
}

/* === 头条大图区 === */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 250px 250px;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-grid__main {
    grid-row: 1 / 3;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-grid__side {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-grid__main img,
.hero-grid__side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-grid__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #FFFFFF;
}

.hero-grid__overlay h2 {
    font-size: var(--fs-h2);
    margin-bottom: var(--space-sm);
}

.hero-grid__overlay p {
    font-size: var(--fs-small);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 200px 200px;
    }

    .hero-grid__main {
        grid-row: auto;
    }
}

/* === 横向滚动卡片组 === */
.scroll-cards {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-md);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-cards::-webkit-scrollbar {
    height: 4px;
}

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

.scroll-cards__item {
    flex-shrink: 0;
    width: 200px;
    scroll-snap-align: start;
}

/* === 骨架屏 === */
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, #FFE4F0 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
