﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}

body {
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    width: 100%;
    height: 500px;
    margin-bottom: 40px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    flex: 0 0 100%;
    position: relative;
    cursor: pointer;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.8) 100%);
    padding: 40px;
}

.carousel-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.2;
}

.carousel-date {
    font-size: 14px;
    opacity: 0.8;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* 分类标签样式 */
.filter-container {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.2);
}

.filter-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tag {
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.7);
}

.filter-tag.all {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
}

.filter-tag.share {
    background: linear-gradient(135deg, #4FACFE, #00F2FE);
    color: white;
}

.filter-tag.create {
    background: linear-gradient(135deg, #43E97B, #38F9D7);
    color: white;
}

.filter-tag.notice {
    background: linear-gradient(135deg, #FA709A, #FEE140);
    color: white;
}

.filter-tag.news {
    background: linear-gradient(135deg, #6B8DE3, #8693E3);
    color: white;
}

.filter-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0071e3, #40a9ff);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
    border-radius: inherit;
}

.filter-tag.active {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    animation: activePop 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.filter-tag.active::before {
    opacity: 1;
}

.filter-tag:not(.active):hover {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(0, 113, 227, 0.05);
}

.filter-tag:active {
    transform: scale(0.98);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-tag span {
    padding: 4px 12px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    display: inline-block;
    min-width: 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-tag:hover span {
    transform: scale(1.1);
}

.filter-tag.active span {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1);
}

/* 推荐内容样式 */
.recommendations {
    padding: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #1d1d1f;
    letter-spacing: -0.003em;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
    position: relative;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    position: relative;
}

/* 不规则布局 */
.post-card:nth-child(6n+1) {
    grid-column: span 2;
    grid-row: span 1;
}

.post-card:nth-child(6n+2) {
    grid-column: span 1;
    grid-row: span 1;
}

.post-card:nth-child(6n+3) {
    grid-column: span 1;
    grid-row: span 2;
}

.post-card:nth-child(6n+4) {
    grid-column: span 2;
    grid-row: span 1;
}

.post-card:nth-child(6n+5) {
    grid-column: span 1;
    grid-row: span 1;
}

.post-card:nth-child(6n+6) {
    grid-column: span 1;
    grid-row: span 1;
}

.post-card:hover {
    transform: translateY(-4px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.post-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* 大尺寸卡片的图片 */
.post-card:nth-child(6n+1) .post-image,
.post-card:nth-child(6n+4) .post-image {
    height: 320px;
}

/* 竖向卡片的图片 */
.post-card:nth-child(6n+3) .post-image {
    height: 400px;
}

.post-card:hover .post-image {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.author-name {
    font-size: 14px;
    color: #1d1d1f;
}

.post-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-date {
    font-size: 13px;
    color: #86868b;
}

.post-views {
    font-size: 13px;
    color: #86868b;
}

.post-author:hover .author-avatar {
    transform: scale(1.1) rotate(5deg);
}

/* 响应式布局 */
@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .carousel {
        height: 400px;
    }
    
    .carousel-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .post-card:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .filter-tags {
        gap: 10px;
    }
    
    .filter-tag {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .post-image {
        height: 200px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .post-description {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 20px 15px;
    }
    
    .carousel {
        height: 300px;
        border-radius: 20px;
        margin-bottom: 30px;
    }
    
    .carousel-title {
        font-size: 24px;
    }
    
    .carousel-content {
        padding: 20px;
    }
    
    .filter-container {
        padding: 15px;
        margin: 20px 0;
    }
    
    .filter-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .filter-tags {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .filter-tag {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 15px;
    }
    
    .filter-tag span {
        padding: 2px 6px;
        font-size: 12px;
        margin-left: 4px;
        min-width: 24px;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .recommendations {
        padding: 20px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-tag,
    .post-card,
    .post-image {
        transition-duration: 0.4s;
    }
    
    .post-card[data-filtered="true"] {
        animation-duration: 0.6s;
    }
    
    .post-card[data-filtered="false"] {
        animation-duration: 0.4s;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 15px 10px;
    }
    
    .carousel {
        height: 250px;
        border-radius: 15px;
    }
    
    .carousel-title {
        font-size: 20px;
    }
    
    .carousel-date {
        font-size: 12px;
    }
    
    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .filter-container {
        padding: 12px;
    }
    
    .filter-tag {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .filter-tag span {
        padding: 2px 5px;
        font-size: 11px;
    }
    
    .recommendations {
        padding: 15px;
        border-radius: 15px;
    }
    
    .post-image {
        height: 180px;
    }
    
    .post-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .post-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .author-avatar {
        width: 20px;
        height: 20px;
    }
    
    .author-name {
        font-size: 13px;
    }
    
    .post-date {
        font-size: 12px;
    }
}

/* 适配横屏模式 */
@media (max-height: 600px) and (orientation: landscape) {
    .carousel {
        height: 70vh;
    }
    
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    body {
        background: #000;
        color: #f5f5f7;
    }

    .filter-container,
    .recommendations {
        background: rgba(30, 30, 32, 0.7);
    }

    .post-card {
        background: rgba(44, 44, 46, 0.7);
    }

    .post-title,
    .section-title,
    .filter-title {
        color: #f5f5f7;
    }

    .post-description {
        color: #98989d;
    }

    .author-name {
        color: #f5f5f7;
    }

    .post-date {
        color: #98989d;
    }

    .filter-tag:not(.active):hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .filter-tag.active {
        box-shadow: 0 4px 12px rgba(0, 113, 227, 0.4);
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    .filter-tag,
    .post-card,
    .filter-tag::before,
    .filter-tag span {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* 筛选切换时的文章卡片动画 */
@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes cardDisappear {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
}

.post-card[data-filtered="true"] {
    animation: cardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.post-card[data-filtered="false"] {
    animation: cardDisappear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
} 