/* 图标广告容器 */
.adhidden {
    display: flex !important;
}

/* MissAV footer partner links. The server list uses #script_seo_links and
   asynchronously rendered pages use .footer-links. Keep both consistent. */
.footer-links.footer-links,
#script_seo_links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 18px;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.48));
    box-sizing: border-box;
}

.footer-links.footer-links:empty,
#script_seo_links:empty {
    display: none;
}

.footer-links.footer-links a,
#script_seo_links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    max-width: none;
    margin: 0;
    padding: 8px 12px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.58);
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease;
    box-sizing: border-box;
}

.footer-links.footer-links a:hover,
#script_seo_links a:hover {
    color: #fff;
    border-color: rgba(244, 63, 94, 0.52);
    background: rgba(244, 63, 94, 0.12);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .footer-links.footer-links,
    #script_seo_links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
        padding: 10px;
        border-radius: 12px;
    }

    .footer-links.footer-links a,
    #script_seo_links a {
        min-height: 38px;
        padding: 7px 8px;
        font-size: 13px;
    }
}

@media (max-width: 340px) {
    .footer-links.footer-links,
    #script_seo_links {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 会员入口与账号弹窗：与 javsb 保持一致的紧凑图标入口。 */
.member-icon-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    color: #eceff4;
    border: 1px solid rgba(216, 222, 233, .16);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(67, 76, 94, .9), rgba(46, 52, 64, .94));
    box-shadow: 0 8px 22px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .06);
    transition: transform .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.member-icon-button.hidden { display: none; }
.member-icon-button svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    stroke: currentColor;
}
.member-icon-button:hover,
.member-icon-button:focus-visible {
    color: #fe628e;
    border-color: rgba(254, 98, 142, .58);
    box-shadow: 0 10px 28px rgba(254, 98, 142, .16), inset 0 1px rgba(255, 255, 255, .08);
    transform: translateY(-1px);
    outline: none;
}
.grid.md\:grid-cols-2.gap-8 {
    display: none !important;
}

.icon-ads,
.remaining-ads {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    justify-content: center; /* 水平居中 */
    gap: 10px; /* 子元素之间的间距 */
    padding: 5px;
    max-width: 1320px;
    margin: 0 auto;
}
.icon-ad {
    width: calc(20% - 10px); /* 每行显示 5 个广告 */
    text-align: center;
    display: flex;
    flex-direction: column; /* 子元素纵向排列 */
    align-items: center; /* 子元素水平居中 */
    overflow: visible; /* 确保子元素不会被裁剪 */
}

.icon-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* 保证正方形比例 */
    overflow: hidden; /* 保持图片裁剪 */
    border-radius: 10px;
    background-color: #000; /* 确保图片容器背景色 */
    flex-shrink: 0; /* 确保图片容器不会被压缩 */
}


.icon-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片按比例裁剪填充 */
}

.icon-title {
    font-size: 14px; /* 字体大小 */
    line-height: 1; /* 设置行高 */
    margin-top: 5px; /* 图片与标题之间的间距 */
    max-width: calc(4em); /* 1 个字宽度约等于 1em */
    overflow: hidden; /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 显示省略号 */
    white-space: nowrap; /* 禁止换行 */
    text-align: center; /* 标题居中 */
    color: #fff; /* 设置文字颜色 */
}
.telegrambd{
    text-align: center;padding: 5px;
    color: #fff; /* 设置文字颜色 */
}


/* 按钮容器样式，用于居中整个页面 */
.toggle-button-container {
    display: none !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.toggle-button {
    flex: 0 0 calc(100%);
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-button:hover {
    background-color: #0056b3;
}

/* PC端调整按钮宽度 */
@media (min-width: 1024px) {
    .toggle-button {
        flex: 0 0 calc(25% - 10px);
    }
    .icon-ad {
        width: calc(10% - 10px); /* 在PC端时一行10个图标 */
        height: 60px;
    }
}

/* 默认隐藏广告 */
.mobile-only {
    display: none;
}

/* 移动设备显示广告 */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

.googlelink{
    position: absolute;
    opacity: 0;
}
.footer-links {
    color: white;
    text-align: center;
    padding: 20px 0; /* 给上方和下方留出一些内边距 */
    margin-top: 10px; /* 给 footer 上方留一些外边距，避免和内容紧挨着 */
}

/* 设置链接样式 */
.footer-links a {
    color: white;
    text-decoration: none;
    margin: 10px 15px; /* 上下 10px，左右 15px */
    font-size: 14px;

    /* 添加以下属性隐藏多余文字 */
    display: inline-block; /* 确保 text-overflow 生效 */
    max-width: 100px; /* 设置一个最大宽度，根据需要调整 */
    overflow: hidden; /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 用省略号表示被隐藏的文字 */
    white-space: nowrap; /* 禁止换行 */
    text-align: center; /* 居中对齐文字 */
}

/* 让链接在鼠标悬停时显示高亮 */
.footer-links a:hover {
    text-decoration: underline;
    color: #ff6600;
}

/* 响应式设计：调整链接布局为网格布局，每行显示 4 个 */
@media (max-width: 768px) {
    .footer-links {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 每行 4 列 */
        gap: 15px 10px; /* 增加上下和左右的网格间距 */
        justify-items: center; /* 水平居中 */
        padding: 15px 0; /* 减少内边距 */
    }

    .footer-links a {
        margin: 0; /* 移除单独的外边距，使用网格间距 */
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* 在更小屏幕上保持 1 行 4 个链接，但字体更大 */
    .footer-links a {
        font-size: 14px; /* 更大的字体 */
    }

    .footer-links {
        gap: 20px 10px; /* 为小屏幕增加更多的间隔 */
    }
}
