/* styles.css  - 最终版本 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 基础背景设置 */
    background:
            #83ffe7
            url('./bg-diamante.svg');



    background-repeat: repeat;

    /* 抗锯齿优化 */
    image-rendering: -moz-crisp-edges;         /* Firefox */
    image-rendering: -webkit-optimize-contrast;/* Chrome/Safari */
    image-rendering: crisp-edges;              /* 标准属性 */
    -ms-interpolation-mode: nearest-neighbor;  /* IE遗留方案 */

    /* 像素级对齐 */
    position: relative;
    transform: translateZ(0);  /* 启用GPU加速 */
}


/* 核心容器 */
.container {

    /*backdrop-filter: blur(8px);*/
    border-radius: 24px;

    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 92px);
    grid-auto-rows: 92px;
    grid-auto-flow: dense;
    gap: 6px;
    justify-content: center;

}

/* 卡片基础样式 */
.card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition:
            transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.3s ease,
            opacity 0.2s ease;
    box-shadow:
            0 2px 4px rgba(0,0,0,0.05),
            0 1px 2px rgba(0,0,0,0.1);
    transform: translateZ(0); /* 开启硬件加速 */
}
.card-ads {
    position: relative;
    /*background: #fff;*/
    grid-column: span 4;  /* 占据7列 (7*92=644px) */
    grid-row: span 2;     /* 占据4行 (4*92=368px) */
    width: 369px;         /* 实际显示尺寸 */
    height:169px;
    /*height: 169px;*/
    /*width: 100%;*/
    /*margin: 0 10px 10px 10px;       !* 水平居中 *!*/
    /*background: #454545;*/
    /*border-radius: 0px;*/
    /*box-shadow: 0 4px 8px rgba(0,0,0,0.1);*/
    justify-content: center;
    align-items: center;
    position: relative;
    display: flex;
    /*overflow: hidden;*/
    /*cursor: pointer;*/
    /*transition:*/
    /*        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),*/
    /*        box-shadow 0.3s ease,*/
    /*        opacity 0.2s ease;*/
    /*box-shadow:*/
    /*        0 2px 4px rgba(0,0,0,0.05),*/
    /*        0 1px 2px rgba(0,0,0,0.1);*/

}
/* 卡片悬停效果 */
.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
            0 8px 16px rgba(0,0,0,0.1),
            0 4px 8px rgba(0,0,0,0.08);
    z-index: 2;
}

/* 标题显示效果 */
.card::after {
    pointer-events: none;
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 8px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.75) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.25s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-transform: capitalize !important; /* 关键属性 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* 增强可读性 */
}

.card:hover::after {
    opacity: 1;
}

/* 卡片尺寸控制 */
.card-small {
    grid-column: span 1;
    grid-row: span 1;
    width: calc(92px - 6px);
    height: calc(92px - 6px);
    margin: -4px;
}

.card-large {
    grid-column: span 2;
    grid-row: span 2;
    width: calc(184px - 6px);
    height: calc(184px - 6px);
    margin: -4px;
}

/* 图片适配 */
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

/* 桌面端优化 */
/*@media (min-width: 768px) {*/
/*    .container {*/
/*        gap: 8px;*/
/*        padding: 32px;*/
/*    }*/

/*    .card-small {*/
/*        width: calc(92px - 8px);*/
/*        height: calc(92px - 8px);*/
/*        margin: -4px;*/
/*    }*/

/*    .card-large {*/
/*        width: calc(184px - 8px);*/
/*        height: calc(184px - 8px);*/
/*        margin: -6px;*/
/*    }*/

/*    !* 增强桌面端悬停效果 *!*/
/*    .card:hover {*/
/*        transform: translateY(-6px) scale(1.03);*/
/*    }*/
/*}*/

/* 安全边界控制 */
/*@media (max-width: 480px) {*/
/*    .card img {*/
/*        object-position: center top;*/
/*    }*/
/*}*/

/* 新版样式 */
.search-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center; /* 水平居中 */
    padding: 30px 20px;
    /*background: rgba(255,255,255,0.96);*/
    backdrop-filter: blur(8px);
}

.search-wrapper {
    width: 100%;
    max-width: 800px; /* 控制最大宽度 */
}

#searchInput {
    width: 100%;
    padding: 18px 30px;  /* 增大点击区域 */
    font-size: 18px;     /* 放大字体 */
    border: 2px solid #83ffe7;
    border-radius: 40px; /* 更圆润的弧度 */
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(131,255,231,0.2);
}

#searchInput:focus {
    outline: none;
    transform: scale(1.02); /* 聚焦时轻微放大 */
    box-shadow: 0 0 20px rgba(131,255,231,0.4);
}

/* 容器间距补偿 */
#gameContainer.container  {
    margin-top: 0px; /* 根据搜索栏实际高度调整 */
    padding: 20px;
}

/* 新增CSS样式 */
.content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin:  auto;
    /*max-width: 1200px;*/
    padding: 32px;
    transition: transform 0.3s ease;
    font-family: 'Lato', sans-serif;
    font-size: 18px;
}

.content-section:hover {
    transform: translateY(-3px);
}

.content-section h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 24px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 12px;
    text-align: center;
    text-transform: capitalize;
}

.article-content {
    line-height: 2.0;
    color: #596A92;
}
.article-content ul{
    padding: 32px;
}
.article-content img{
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.main-footer {
    background: #f8f9fa;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #e7e7e7;
}

.main-footer p {
    color: #7f8c8d;
    margin-bottom: 12px;
}

.main-footer nav a {
    color: #3498db;
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.2s;
}

.main-footer nav a:hover {
    opacity: 0.8;
}


.site-header {
    padding: 20px;
    text-align: center;
    /*background: #ffffff;*/
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* style.css  新增内容 */
.card-iframe {
    grid-column: span 10;  /* 占据7列 (7*92=644px) */
    grid-row: span 6;     /* 占据4行 (4*92=368px) */
    width: 960px;         /* 实际显示尺寸 */
    height: 540px;
    margin: 0 auto;       /* 水平居中 */
    background: #060606;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* 修复网格布局 */
.container {
    /* 保持原有配置 */
    grid-template-columns: repeat(auto-fill, 92px);
    grid-auto-rows: 92px;

}

/* 修复样式 */
.card-iframe {
    overflow: visible !important; /* 解除溢出隐藏 */
    padding-bottom: 0; /* 消除底部间隙 */
}

.iframe-menu {
    background: #fff; /* 白底 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: -5px 0 0 0; /* 负边距消除间隙 */
    /*padding: 12px 20px;*/
    border-radius: 0 0 8px 8px; /* 圆角与卡片匹配 */
    position: relative;
    z-index: 2; /* 确保显示层级 */
}

.menu-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-title {
    color: #333; /* 黑字 */
    font-weight: 600;
    font-size: 16px;
    margin-left:10px;
}

.fullscreen-btn {
    background: transparent;
    border: 0px solid #ddd;
    color: #333; /* 黑字 */
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.fullscreen-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.card.card-iframe  {
    border-radius: 12px 12px 0 0 !important; /* 上左/上右圆角 */
    overflow: hidden; /* 确保iframe内容不溢出 */
}
/* 调整iframe内层圆角 */
.card-iframe iframe {
    border-radius: 12px 12px 0 0 !important; /* 与容器同步 */
    /*margin-bottom: -5px; !* 消除像素间隙 *!*/
}

/* 下方菜单适配 */
.iframe-menu {
    border-radius: 0 0 12px 12px !important; /* 移除菜单顶部圆角 */
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* 加强底部投影 */
    text-transform: capitalize !important; /* 关键属性 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* 增强可读性 */
}

/* 信息卡片特效 */
/* 尺寸与布局 */
.info-card {
    grid-column: span 4;  /* 占据7列 (7*92=644px) */
    grid-row: span 2;     /* 占据4行 (4*92=368px) */
    width: 369px;         /* 实际显示尺寸 */
    height: 169px;
    /*margin: 0 10px 10px 10px;       !* 水平居中 *!*/
    background: #454545;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    justify-content: center;
    align-items: center;
    position: relative;
    display: flex;
}

/* 文字定位与特效 */
.text-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.info-title {
    color: rgba(255,255,255,0.95);
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
    letter-spacing: 0.08em;
    transform: translateY(0);
    transition: transform 0.3s;
}
/* 交互反馈系统 */
.info-card:hover {
    transform: perspective(1000px) rotateX(3deg) rotateY(2deg);
}

.info-card:hover::before {
    opacity: 0.25;
}

.info-card:hover .info-title {
    transform: translateY(-3px);
    text-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
/* 三维光效系统 */
.info-card::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(
            from 210deg at 50% 50%,
            #ff6b6b 0deg,
            #4ecdc4 120deg,
            #45b7d1 240deg,
            #ff6b6b 360deg
    );
    animation: rotateGlow 4s linear infinite;
    opacity: 0;
    transition: opacity 0.5s;
}

@keyframes rotateGlow {
    to { transform: rotate(360deg); }
}

#info_card_a {
    text-decoration: none !important;  /* 关键代码 */
}

/* 你的原始样式保持不变，直到媒体查询部分 */

/* 小屏幕：小于 768px */
@media (max-width: 767px) {
    .container {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        display: block;
    }

    .card-iframe {
        width: 100%;                /* 3列，占满宽度 */
        height: auto;               /* 高度自适应 */
        margin: 0 auto 10px;
        background: #060606;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
    }

    .card-iframe iframe {
        width: 100%;
        height: 200px;              /* 2行，固定高度 */
        border-radius: 12px 12px 0 0;
    }

    .iframe-menu {
        padding: 8px;
        border-radius: 0 0 12px 12px;
        background: #fff;
        width: 100%;
    }

    .game-title {
        font-size: 14px;
    }

    .fullscreen-btn {
        font-size: 12px;
        padding: 4px 8px;
    }

    .info-card {
        display: none;              /* 在移动端隐藏 */

    }

    .card:not(.card-iframe):not(.info-card) {
        width: calc(33.33% - 6.66px); /* 一行3个 */
        height: calc(33.33% - 6.66px); /* 正方形 */
        background: #fff;
        border-radius: 12px;
    }

    #gameContainer {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        padding: 0;
    }

    .content-section {
        margin: 15px 10px;
        padding: 15px;

    }

    .content-section h1 {
        font-size: 20px;
    }

    .main-footer {
        padding: 15px 10px;
    }

    .main-footer nav a {
        display: block;
        margin: 5px 0;
        font-size: 14px;
    }

    .card-large{
        margin:0;
    }
}

/* 中等屏幕：768px - 1024px */
@media (min-width: 480px) and (max-width: 1024px) {
    .container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        display: block;
    }
    .card-large{
        margin:0;
    }
    .card-iframe {
        width: 100%;                /* 3列，占满宽度 */
        height: auto;               /* 高度自适应 */
        margin: 0 auto 15px;
        background: #060606;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
    }

    .card-iframe iframe {
        width: 100%;
        height: 400px;              /* 4行，固定高度 */
        border-radius: 12px 12px 0 0;
    }

    .iframe-menu {
        padding: 10px;
        border-radius: 0 0 12px 12px;
        background: #fff;
        width: 100%;
    }

    .game-title {
        font-size: 16px;
    }

    .fullscreen-btn {
        font-size: 14px;
        padding: 6px 12px;
    }

    .info-card {
        display: none;              /* 在此范围仍隐藏 */
    }

    .card:not(.card-iframe):not(.info-card) {
        width: calc(25% - 7.5px);   /* 一行4个，减去间距 */
        height: calc(25% - 7.5px);  /* 正方形 */
        background: #fff;
        border-radius: 12px;
    }

    #gameContainer {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        padding: 0;
    }

    .content-section {
        margin: 20px 15px;
        padding: 20px;
    }

    .content-section h1 {
        font-size: 24px;
    }

    .main-footer {
        padding: 20px 15px;
    }

    .main-footer nav a {
        display: inline;
        margin: 0 10px;
        font-size: 14px;
    }
}