/* ========================================
   响应式设计 - Responsive CSS  
   凌越传奇官网 - 完整版 V8
   修复：按钮2×2布局 + 移除白色带
   ======================================== */

/* ==================== 
   PC端基础样式
   ==================== */

/* 移除.ver .text的白色背景和padding，让按钮紧贴图片 */
.ver .text {
    padding: 0 !important;
    height: auto !important;
    background-color: transparent !important;
    border-bottom: none !important;
}

/* 版本卡片按钮 - PC端 2×2 网格布局 */
.ver ._down {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px !important;
    width: 594px !important;
    padding: 11px 8px 8px 8px !important;
    position: relative;
    z-index: 1500;
}

.ver ._down a {
    width: 100% !important;
    height: 40px !important;
    line-height: 40px !important;
    text-align: center !important;
    font-size: 15px !important;
    color: #FFF !important;
    border: 1px solid #FFF !important;
    border-radius: 20px !important;
    background-color: #ff9c00 !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
}

.ver ._down a:hover {
    color: #fff !important;
    background-color: #dda04d !important;
    text-decoration: none !important;
}

/* 隐藏第5个按钮（苹果信任教程）在PC端 */
.ver ._down a:nth-child(5) {
    display: none !important;
}

.category-cards {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

.category-link {
    flex: 1;
    min-width: 240px;
    max-width: 260px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    border: 2px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s;
    display: block;
    box-sizing: border-box;
}

.category-link:hover {
    transform: translateY(-5px);
    border-color: #FFD700;
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.3);
}

.category-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.category-title {
    color: #FFD700;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 3px;
}

.category-desc {
    color: #888;
    font-size: 12px;
}

.news-columns {
    max-width: 1200px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* ==================== 
   平板端 (768px - 1199px)
   ==================== */
@media (max-width: 1199px) {
    .category-cards {
        gap: 15px;
        padding: 0 20px;
    }

    .category-link {
        flex: 1 1 calc(50% - 15px);
        max-width: calc(50% - 15px);
        min-width: auto;
    }

    .news-columns {
        padding: 20px 15px;
    }

    .columns-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* ==================== 
   手机端 (≤ 767px)
   ==================== */
@media (max-width: 767px) {

    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    body {
        font-size: 14px;
    }

    /* 视频区域 */
    #Flash,
    #bigpic {
        width: 100% !important;
        max-width: 100% !important;
        height: 40vh;
        min-height: 250px;
        max-height: 350px;
        overflow: hidden;
    }

    #top-video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    #m1 {
        width: 100% !important;
    }

    /* LOGO */
    .center>div[align="center"] img {
        max-width: 80% !important;
        height: auto !important;
    }

    /* 通告栏 - 完整显示"游戏公告"四个字，滚动显示 */
    #gameNotice.notice-bar,
    .notice-bar {
        display: block !important;
        width: calc(100% - 20px) !important;
        margin: 10px 10px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 13px !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 100 !important;
        box-sizing: border-box !important;
        position: relative !important;
    }

    .notice-icon {
        width: 110px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        text-align: center !important;
        height: 100% !important;
    }

    .notice-content {
        left: 110px !important;
        position: absolute !important;
        right: 0 !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    .notice-marquee {
        display: inline-block !important;
        white-space: nowrap !important;
        animation: marquee 20s linear infinite !important;
        padding-left: 100% !important;
        font-size: 12px !important;
    }

    /* 游戏下载区 - 紧贴上方图片，隐藏3.gif */
    .center {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
    }

    /* 手机端也移除白色背景 */
    .ver .text {
        background-color: transparent !important;
        padding: 8px !important;
    }

    /* 按钮改为单列 */
    .ver ._down {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .ver ._down a {
        width: 100% !important;
        min-height: 52px !important;
        padding: 12px 8px !important;
        margin: 0 !important;
        background: linear-gradient(135deg, #FFB200 0%, #FF9500 100%) !important;
        color: #1a1a1a !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-align: center !important;
        text-decoration: none !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 6px rgba(255, 178, 0, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
        border: none !important;
    }

    .ver ._down a:active {
        transform: scale(0.97) !important;
        box-shadow: 0 1px 3px rgba(255, 178, 0, 0.4) !important;
    }

    /* 显示第5个按钮在手机端 */
    .ver ._down a:nth-child(5) {
        display: flex !important;
    }

    .ver_bg,
    .ver_border {
        display: none !important;
    }

    /* 分类卡片 */
    .category-cards {
        flex-direction: column;
        gap: 12px;
        padding: 0 15px;
    }

    .category-link {
        width: 100% !important;
        max-width: 100% !important;
        padding: 18px !important;
    }

    .category-icon {
        font-size: 20px !important;
    }

    .category-title {
        font-size: 16px !important;
    }

    /* 文章列表 */
    .news-columns {
        padding: 20px 15px;
    }

    .columns-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .news-column {
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        padding: 15px;
    }

    .column-title {
        font-size: 15px;
        margin-bottom: 12px;
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    }

    .news-item {
        display: flex;
        justify-content: space-between;
        min-height: 44px;
        padding: 8px 10px;
    }

    .news-item a {
        font-size: 13px !important;
    }

    .news-date {
        font-size: 11px !important;
        margin-left: 10px;
    }

    /* 分类页 */
    .category-header {
        padding: 20px 10px;
    }

    .article-list {
        padding: 10px;
    }

    .article-item {
        flex-direction: column;
        padding: 12px;
    }

    .article-title {
        font-size: 16px;
    }

    /* 页脚 */
    .site-footer-custom {
        padding: 20px 15px;
    }

    .article-detail-page .article-content img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ==================== 
   小屏手机 (≤ 576px)
   ==================== */
@media (max-width: 576px) {
    .ver {
        width: 95% !important;
    }

    .ver ._down a {
        font-size: 13px !important;
        min-height: 48px !important;
    }

    .notice-bar {
        height: 36px !important;
        line-height: 36px !important;
        font-size: 12px !important;
    }

    .notice-icon {
        width: 100px !important;
        font-size: 11px !important;
    }

    .notice-content {
        left: 100px !important;
    }
}

/* ==================== 
   触摸优化
   ==================== */
@media (max-width: 767px) {

    a,
    button,
    input[type="submit"] {
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.2);
    }
}

/* ==================== 
   防止横向滚动
   ==================== */
@media (max-width: 767px) {

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    img,
    video {
        max-width: 100% !important;
        height: auto !important;
    }

    [style*="width: 1200px"],
    [style*="width: 1000px"],
    [style*="max-width: 1200px"] {
        width: 100% !important;
        max-width: 100% !important;
    }
}