:root {
    --primary: #00f2ea;
    --secondary: #ff0050;
    --bg-dark: #0f0f13;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-dark);
    color: white;
    min-height: 100vh;
    position: relative;
    padding: 20px;
}

/* 动态背景光斑 */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: float 10s infinite ease-in-out;
    opacity: 0.3;
    pointer-events: none;
}
.orb-1 { width: 300px; height: 300px; background: var(--secondary); top: -50px; left: -50px; }
.orb-2 { width: 400px; height: 400px; background: var(--primary); bottom: -100px; right: -100px; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-bottom: 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 242, 234, 0.1);
}

.article {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.source-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.article-thumbnail {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 30px 0;
}

.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.article-content p {
    margin-bottom: 20px;
}

.external-link {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--secondary), #ff7a7a);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 0, 80, 0.4);
}

.external-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 0, 80, 0.6);
}

.related-news {
    margin-top: 40px;
}

.related-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.related-item {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}

.related-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 242, 234, 0.2);
}

/* PC端和移动端都使用竖版布局（上图下文） */
.related-item {
    display: flex;
    flex-direction: column;
}

.related-item .related-thumbnail-wrapper {
    width: 100%;
    height: auto;
    min-height: 180px;
}

.related-item .related-content {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* PC端图片区域固定高度，图片居中，文字对齐 */
@media (min-width: 769px) {
    .related-item .related-thumbnail-wrapper {
        height: 180px;
        min-height: 180px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .related-item .related-thumbnail {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .related-item .related-content {
        min-height: 80px;
    }
}

.related-thumbnail-wrapper {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.2), rgba(255, 0, 80, 0.2));
    overflow: hidden;
}

.related-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-thumbnail-wrapper.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.related-thumbnail-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: white;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    padding: 8px;
}

.related-item-title {
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 如果有图片，图片区标题隐藏，内容区显示标题 */
.related-item .related-thumbnail-wrapper:not(.no-image) .related-thumbnail-title {
    display: none;
}

/* 如果没有图片，内容区标题隐藏 */
.related-item .related-thumbnail-wrapper.no-image ~ .related-content .related-item-title {
    display: none;
}

/* 移动端图片完整显示 */
@media (max-width: 768px) {
    .related-item .related-thumbnail {
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .article {
        padding: 24px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .related-item .related-thumbnail-wrapper {
        min-height: 150px;
    }

    .related-thumbnail-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 5;
    }
}

