/* ============================================
   大娱网 - 响应式样式
   支持移动端、平板、桌面端
   ============================================ */

/* 大屏桌面 (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
}

/* 桌面端 (992px - 1199px) */
@media (max-width: 1199px) {
    .nav-list a {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .gossip-main .gossip-image {
        min-height: 350px;
    }
    
    .dual-image {
        width: 120px;
        height: 90px;
    }
}

/* 平板端 (768px - 991px) */
@media (max-width: 991px) {
    .header-inner {
        height: 60px;
    }
    
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        margin: 0;
        padding: 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    
    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-list a {
        padding: 16px 0;
        font-size: 16px;
        width: 100%;
    }
    
    .nav-list a::after {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero {
        padding-top: 60px;
    }
    
    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .hero-content {
        padding: 30px 20px;
        order: 2;
    }
    
    .hero-image {
        order: 1;
        min-height: 280px;
        border-radius: 0;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .gossip-grid {
        grid-template-columns: 1fr;
    }
    
    .gossip-main .gossip-image {
        min-height: 280px;
    }
    
    .gossip-side {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dual-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .dual-col:first-child::after {
        display: none;
    }
    
    .movie-grid {
        grid-template-columns: 1fr;
    }
    
    .triple-grid {
        grid-template-columns: 1fr;
    }
    
    .triple-col:not(:last-child)::after {
        display: none;
    }
    
    .triple-col {
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .triple-col:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .list-page-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }
    
    .list-sidebar,
    .detail-sidebar {
        order: 2;
    }
    
    .list-card > a {
        flex-direction: column;
    }
    
    .list-image {
        width: 100%;
        height: 200px;
    }
    
    .list-content {
        /* padding: 16px; */
    }
    
    .search-card > a {
        flex-direction: column;
    }
    
    .search-image {
        width: 100%;
        height: 180px;
    }
}

/* 移动端 (576px - 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 12px;
    }
    
    .header {
        position: relative;
        box-shadow: none;
        border-bottom: none;
    }
    
    .header-inner {
        height: 50px;
        flex-direction: row;
        padding: 8px 0;
        gap: 10px;
    }
    
    .logo-text {
        font-size: 18px;
        white-space: nowrap;
    }
    
    .logo-text img {
        width: 26px;
        height: 26px;
    }
    
    .header-actions {
        flex: 1;
        justify-content: flex-end;
    }
    
    .header-search-form {
        width: auto;
        min-width: 140px;
        max-width: 200px;
    }
    
    .header-search-form input {
        width: 100%;
        font-size: 13px;
    }
    
    .header-search-form input::placeholder {
        font-size: 12px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-nav-bar {
        display: block;
        background: var(--primary-color);
        width: 100%;
        padding: 0 12px;
    }
    
    .mobile-nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
    }
    
    .mobile-nav-container::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-nav-list {
        display: flex;
        justify-content: flex-start;
        white-space: nowrap;
        width: auto;
        list-style: none;
        padding: 0;
        margin: 0;
        line-height: 1;
    }
    
    .mobile-nav-list li {
        flex: none;
        text-align: center;
        margin: 0;
        margin-right: 12px;
    }
    
    .mobile-nav-list li:last-child {
        margin-right: 0;
    }
    
    .mobile-nav-list a {
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        display: inline-block;
        padding:12px 12px 12px 0px;
        width: 100%;
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
    }
    
    .mobile-nav-list a::after {
        content: '';
        position: absolute;
        bottom: 6px;
        left: 0;
        width: 0;
        height: 2px;
        border-radius: 100px;
        background: #fff;
        transition: width 0.3s ease;
    }
    
    .mobile-nav-list a:hover {
        color: #f0f0f0;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-nav-list a.active {
        font-weight: bold;
    }
    
    .mobile-nav-list a.active::after,
    .mobile-nav-list a:hover::after {
        width: calc(100% - 12px);
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .hero {
        padding-top: 0;
    }
    
    .hero-inner {
        display: none;
    }
    
    .section {
        padding: 0;
        margin-bottom: 8px;
    }
    
    .section-header {
        display: none;
    }
    
    .hot-news {
        display: none;
    }
    
    .gossip {
        display: none;
    }
    
    .dual-column {
        display: none;
    }
    
    .triple-column {
        display: none;
    }
    
    .visual-gallery {
        display: none;
    }
    
    .mobile-feed {
        display: block;
        background: #ffffff;
        min-height: 100vh;
        padding-bottom: 20px;
    }
    
    .feed-item {
        background: #fff;
        padding: 16px 14px;
        margin-bottom: 0px;
    }

    .feed-item:not(:last-child) {
        position: relative;
    }
    .feed-item:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 12px;
        right: 12px;
        height: 1px;
        background-color: var(--border-color);
    }
    
    .feed-item a {
        display: flex;
        gap: 16px;
    }
    
    .feed-image {
        width: 120px;
        height: 90px;
        flex-shrink: 0;
        border-radius: 4px;
        overflow: hidden;
        order: 2;
    }
    
    .feed-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .feed-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        order: 1;
    }
    
    .feed-title {
        font-size: 15px;
        font-weight: 500;
        line-height: 1.5;
        color: #333;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .feed-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
    }
    
    .feed-tag {
        padding: 2px 8px;
        background: rgba(232, 1, 83, 0.1);
        color: var(--primary-color);
        font-size: 12px;
        border-radius: 2px;
    }
    
    .feed-time {
        font-size: 12px;
        color: #999;
    }
    
    .list-header {
        display: none;
    }
    
    .footer {
        margin-top: 0;
    }
    
    .article-main {
        /* padding: 5cqmax; */
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-meta {
        /* flex-direction: column; */
        gap: 14px;
    }
    
.article-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 6px;
}
   .gallery-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
} 
.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}
.gallery-main {
    position: relative;
    background: var(--bg-black);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 10px;
}
    .article-actions {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .search-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .search-filter {
        display: none;
    }
    
    .filter-btn {
        white-space: nowrap;
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .search-card > a {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-image {
        width: 100%;
        height: 180px;
        border-top-left-radius: var(--radius-lg);
        border-top-right-radius: var(--radius-lg);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .search-card-title {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .search-desc {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    
    .search-meta {
        gap: 12px;
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .search-cat {
        font-size: 12px;
        margin-right: 8px;
    }
    
    .related-search {
        margin-top: 30px;
    }
    
    .related-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .related-tags {
        gap: 8px;
    }
    
    .related-tags .tag {
        font-size: 13px;
        padding: 4px 10px;
    }


}

/* 小屏移动端 (< 576px) */
@media (max-width: 575px) {

    .detail-breadcrumb {
        display: flex;
        align-items: center;
        gap: 8px;
        /* margin-bottom: 24px; */
        margin: 14px 0 20px 0;
        font-size: 13px;
        padding: 0px 5px;
    }
    .detail-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 0 5px;
    }
    .container {
        padding: 0 16px;
    }
    
    .header-inner {
        height: 46px;
        margin: 10px 0px;
        gap: 6px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .logo-text img {
        width: 28px;
        height: 28px;
        margin: 2px 6px 0 0;
    }
    
    .header-search-form {
        min-width: 200px;
        max-width: 300px;
        padding: 6px 10px;
    }
    
    .header-search-form input {
        font-size: 14px;
    }
    
    .header-search-form input::placeholder {
        font-size: 11px;
    }
    
    .mobile-nav-bar {
        width: 100%;
        padding: 0 16px;
    }
    
    .mobile-nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
    }
    
    .mobile-nav-container::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-nav-list {
        display: flex;
        justify-content: flex-start;
        white-space: nowrap;
        width: auto;
        list-style: none;
        padding: 0;
        margin: 0;
        line-height: 1;
    }
    
    .mobile-nav-list li {
        flex: none;
        text-align: center;
        margin: 0;
        margin-right: 10px;
    }
    
    .mobile-nav-list li:last-child {
        margin-right: 0;
    }
    
    .mobile-nav-list a {
        color: #fff;
        text-decoration: none;
        font-size: 16px;
        display: inline-block;
        width: 100%;
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
    }
    
        .mobile-nav-list a::after {
            content: '';
            position: absolute;
            bottom: 4px;
            left: 0;
            width: 0;
            height: 2px;
            border-radius: 100px;
            background: #fff;
            transition: width 0.3s ease;
        }
    
    .mobile-nav-list a:hover {
        color: #f0f0f0;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
        .mobile-nav-list a.active {

            font-weight: bold;
        }
        
        .mobile-nav-list a.active::after,
        .mobile-nav-list a:hover::after {
            width: calc(100% - 12px);
        }
    
    .feed-item {
        padding: 16px 14px;
        margin-bottom: 0px;
    }

    .feed-item:not(:last-child) {
        position: relative;
    }
    .feed-item:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 14px;
        right: 14px;
        height: 1px;
        background-color: var(--border-color);
    }
    
    .feed-image {
        width: 100px;
        height: 75px;
        order: 2;
    }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 20px 0;
    font-size: 13px;
    padding: 0 0px;
}    

.list-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    border-bottom-left-radius: 0px;
}

.search-image {
    height: 200px;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.search-card-title {
    font-size: 20px;
}

.search-desc {
    font-size: 13px;
}

.search-meta {
    font-size: 11px;
    gap: 10px;
}

.search-cat {
    font-size: 11px;
}

.related-title {
    font-size: 15px;
}

.related-tags .tag {
    font-size: 12px;
    padding: 3px 8px;
}

.footer-copyright p {
    font-size: 11px;
}

    .feed-content {
        order: 1;
    }
    
    .feed-title {
        font-size: 16px;
        line-height: 1.4;
        text-align: justify;
    }
    
    .feed-tag {
        font-size: 11px;
        padding: 1px 6px;
    }
    
    .feed-time {
        font-size: 11px;
    }
    
    .list-header {
        display: none;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 16px;
        right: 16px;
    }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .back-to-top,
    .sidebar,
    .comment-section,
    .article-actions {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .article-main {
        box-shadow: none;
        padding: 0;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-content {
        font-size: 14px;
    }
}

/* 信息流加载指示器 */
.feed-load-more {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
}

.feed-load-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.feed-load-more.hidden {
    display: none;
}

.feed-load-more .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: feed-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes feed-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.feed-load-more .load-more-text {
    vertical-align: middle;
}
