/* ==================== 重置样式（消除浏览器默认差异）=================== */
html { color: #000; background: #fff; }
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td { margin: 0; padding: 0; }
table { border-collapse: collapse; border-spacing: 0; }
fieldset, img { border: 0; }
address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal; }
ol, ul { list-style: none; }
caption, th { text-align: left; }
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }
q:before, q:after { content: ""; }
abbr, acronym { border: 0; font-variant: normal; }
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
input, textarea, select { font-family: inherit; font-size: inherit; font-weight: inherit; *font-size: 100%; }
legend { color: #000; }
/* 清除浮动 */
.inner { zoom: 1; }
.inner:before, .inner:after { content: ""; display: table; }
.inner:after { clear: both; overflow: hidden; }

/* ==================== 基础样式（全局通用）=================== */
html { 
    height: 100%; 
    -webkit-text-size-adjust: none; 
    -moz-text-size-adjust: none; 
    -ms-text-size-adjust: none; 
    text-size-adjust: none; 
}
body { 
    height: 100%; 
    font-family: Arial, Helvetica, "Microsoft Yahei", sans-serif; 
    font-size: 14px; 
    color: #333; 
    background-color: #f2f2f2; 
}
a { text-decoration: none; color: #333; transition: color 0.3s ease; }
a:hover { color: #ff6600; text-decoration: underline; }
img { vertical-align: middle; }
button, input, select, textarea { 
    font-family: Tahoma, Arial, Helvetica, "微软雅黑", sans-serif; 
    font-size: inherit; 
    line-height: inherit; 
}

/* ==================== 布局容器样式 ==================== */
.wrapper { 
    position: relative; 
    min-height: 100%; 
    background: #f2f2f2; 
}
.inner { 
    margin: 0 auto; 
    max-width: 640px; /* 页面最大宽度，居中显示 */
}
.header { margin-bottom: 15px; }
.container { margin-bottom: 25px; }
.J_link { cursor: pointer; }
.J_link canvas { cursor: pointer; }

/* ==================== 头部模块样式（mod-head）=================== */
.mod-head { 
    background: #5773b9; 
    padding-bottom: 75px; 
    margin-bottom: -75px; /* 负margin抵消高度，实现无缝衔接 */
}
.mod-head .bd { padding-top: 50px; }
/* Logo样式 */
.mod-head .bd .logo { 
    display: block; 
    height: 80px; 
    margin-bottom: 20px; 
    text-align: center; 
    overflow: hidden; 
}
.mod-head .bd .logo img { margin-top: -60px; }
/* 搜索框样式 */
.mod-head .search { 
    position: relative; 
    height: 42px; 
    margin-bottom: 20px; 
    background: rgba(255, 255, 255, 0.8); 
    border-radius: 21px; 
    overflow: hidden; 
}
.mod-head .search .clear { 
    display: none; 
    position: absolute; 
    top: 5px; 
    right: 90px; 
    width: 32px; 
    height: 32px; 
    line-height: 32px; 
    text-align: center; 
    vertical-align: middle; 
}
.mod-head .search .clear span { 
    display: inline-block; 
    width: 24px; 
    height: 24px; 
    background: #dbdbdb; 
    line-height: 24px; 
    text-align: center; 
    font-size: 14px; 
    border-radius: 50%; 
    color: #333; 
}
.mod-head .search .input-text { 
    width: 100%; 
    height: 42px; 
    padding: 9px 136px 9px 16px; 
    margin-right: -120px; 
    border: medium none; 
    background: none; 
    line-height: 24px; 
    vertical-align: middle; 
    font-size: 16px; 
    outline: none; 
    box-sizing: border-box; 
}
.mod-head .search .button { 
    float: right; 
    position: relative; 
    z-index: 9; 
    width: 120px; 
    height: 42px; 
    padding: 0; 
    margin: 0; 
    background: #333; 
    border: medium none; 
    line-height: 42px; 
    vertical-align: middle; 
    font-size: 16px; 
    color: #fff; 
    border-radius: 0; 
    outline: none; 
    cursor: pointer; 
    -webkit-appearance: none; 
}
.mod-head .search .button:hover { background: #000; }
.mod-head .search .button-visit { background: #4bae4f; }
.mod-head .search .button-visit:hover { background: #47a04b; }
/* 搜索框（域名模式）样式 */
.mod-head .search-domain .input-text { 
    padding: 9px 256px 9px 16px; 
    margin-right: -240px; 
}

/* ==================== 底部模块样式（mod-foot）=================== */
.mod-foot { 
    padding: 10px 0; 
    position: relative; 
    line-height: 24px; 
    text-align: center; 
    color: #999; 
    border-radius: 8px; 
}
.mod-foot span, .mod-foot a { margin: 0 3px; white-space: nowrap; }
.mod-foot a { color: #999; }
.mod-foot a:hover { color: #ff6600; text-decoration: underline; }
/* 底部链接模块 */
.mod-link { 
    margin-bottom: 10px; 
    line-height: 26px; 
    text-align: center; 
}
.mod-link a { 
    padding: 0 4px; 
    white-space: nowrap; 
    color: #0081c2; 
}
.mod-link a:hover { text-decoration: underline; }

/* ==================== 侧边栏模块（mod-sidebar）=================== */
.mod-sidebar { 
    display: none; 
    position: fixed; 
    left: 50%; 
    z-index: 99; 
    bottom: 100px; 
    margin-left: 620px; 
    width: 48px; 
    text-align: center; 
}
.mod-sidebar a { 
    display: block; 
    width: 48px; 
    height: 48px; 
    line-height: 48px; 
    background: #999; 
}
.mod-sidebar a:hover { background: #0092dd; }
.mod-sidebar a img { width: 32px; height: 32px; }

/* ==================== 广告容器样式（ad-container）=================== */
.banner-outer { margin-bottom: 15px; }
.ad-container { 
    width: 100%; 
    overflow: hidden; 
    border-radius: 5px; 
    transition: all 0.3s ease; 
}
.ad-container:hover { 
    transform: scale(1.02); 
    transition: all 0.3s ease; 
}

/* ==================== 返回顶部按钮样式（back-to-top）=================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4285f4;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}
#back-to-top:hover {
    background: #3367d6;
}

/* ==================== 加载动画样式（loading-indicator）=================== */
.loading-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #333;
    animation: bounce 1.4s infinite ease-in-out both;
}
.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-text {
    color: #333;
    font-size: 14px;
}
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ==================== 全局加载层样式（关键修复：DOM加载完即隐藏）=================== */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999; /* 确保覆盖所有内容 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f2f2f2;
    border-top-color: #5773b9; /* 与头部背景色呼应 */
    border-radius: 50%;
    animation: spinner-rotate 1s linear infinite; /* 加载动画 */
}
@keyframes spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== 缩略图加载样式（单独控制加载状态）=================== */
.info-screenshot-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin: 20px 0;
}
.info-list {
    flex: 1;
    min-width: 250px;
}
.screenshot-wrapper {
    position: relative;
    flex: 1;
    min-width: 300px;
    min-height: 225px; /* 4:3比例适配截图，避免加载时区域塌陷 */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}
#screenshot-fallback {
    position: absolute;
    z-index: 1;
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 0 10px;
}
.site-screenshot {
    position: relative;
    z-index: 2;
    max-width: 100%;
    height: auto;
    display: none; /* 初始隐藏，加载完成后显示 */
}

/* ==================== 移动端响应式样式（屏幕<800px）=================== */
@media screen and (max-width: 800px) {
    .wrapper { background: #fff; }
    .header .inner { padding: 0 10px; }
    .footer { padding: 20px 0; background: #f8f8f8; }

    /* 头部模块移动端适配 */
    .mod-head .bd { padding-top: 25px; }
    .mod-head .bd .logo { height: 40px; }
    .mod-head .bd .logo img { 
        width: 160px; 
        height: 100px; 
        margin-top: -30px; 
    }
    .mod-head .search { 
        height: 36px; 
        margin-bottom: 15px; 
        border-radius: 3px; 
    }
    .mod-head .search .input-text { 
        height: 36px; 
        padding: 6px 90px 6px 10px; 
        margin-right: -80px; 
        font-size: 14px; 
    }
    .mod-head .search .button { 
        width: 80px; 
        height: 36px; 
        line-height: 36px; 
        font-size: 14px; 
    }
    /* 搜索框（域名模式）移动端适配 */
    .mod-head .search-domain .input-text { 
        padding: 6px 138px 6px 10px; 
        margin-right: -132px; 
    }
    .mod-head .search-domain .button { 
        position: absolute; 
        top: 0; 
        right: 0; 
        width: 64px; 
    }
    .mod-head .search-domain .button-search { right: 64px; }

    /* 底部模块移动端适配 */
    .mod-foot { 
        line-height: 24px; 
        font-size: 12px; 
    }
    .mod-link { 
        margin-bottom: 5px; 
        line-height: 24px; 
        font-size: 12px; 
    }

    /* 侧边栏移动端适配 */
    .mod-sidebar { 
        left: auto; 
        right: 15px; 
        bottom: 20px; 
        margin-left: 0; 
        zoom: 0.75; 
    }

    /* 返回顶部按钮移动端适配 */
    #back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }

    /* 缩略图移动端适配 */
    .screenshot-wrapper {
        min-width: 100%;
        min-height: 180px;
    }
}