/* ============================================================
   天龙之眼 flzt.io 全站样式
   自适应：手机 (<=600px) / 平板 (601~992px) / 电脑 (>992px)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    /* 背景图片铺满且固定，不随页面滚动移动 */
    background: #0a1622 url("../images/bgrnd_flzt_01.jpg") no-repeat center center fixed;
    background-size: cover;
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    font-size: 14px;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: #f7f4a7;
}

/* ---------------- 顶部区域 ---------------- */

.site-header {
    background: rgba(10, 22, 34, 0.55);
    border-bottom: 1px solid rgba(247, 244, 167, 0.18);
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand img {
    display: block;
    width: 129px;
    height: 32px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 隐藏背景图片开关（勾选时去掉 body 背景图） */
body.no-bg-image {
    background-image: none;
}
.bg-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #f7f4a7;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.bg-toggle input[type="checkbox"] {
    accent-color: #f7f4a7;
    cursor: pointer;
    margin: 0;
}

#lang_select {
    font-family: inherit;
    font-size: 12px;
    color: #ffffff;
    background: rgba(17, 33, 46, 0.75);
    border: 1px solid rgba(247, 244, 167, 0.45);
    border-radius: 3px;
    padding: 4px 6px;
    cursor: pointer;
    outline: none;
}

#lang_select option {
    color: #000000;
}

.btn-link {
    font-size: 12pt;
    color: #ffffff;
    padding: 4px 14px;
    border: 1px solid rgba(247, 244, 167, 0.55);
    border-radius: 3px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.btn-link:hover {
    background: rgba(247, 244, 167, 0.15);
    color: #f7f4a7;
}

/* ---------------- 中部导航菜单 ---------------- */

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 26px;
}

.nav-link {
    font-size: 12pt;
    color: #ffffff;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    color: #f7f4a7;
}

.nav-link.active {
    color: #f7f4a7; /* 淡金色：当前选中菜单 */
    border-bottom-color: #f7f4a7;
}

/* ---------------- 主体内容 ---------------- */

.site-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    display: flex;
    flex-direction: column;
}

#flzt_content {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

/* 搜索区在首屏垂直+水平居中 */
#search_box {
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#search_box .search-bar,
#search_box #hot_key,
#search_box #hot_list,
#search_box .hot-hint {
    align-self: center;
    text-align: center;
}

#search_box .hot-item {
    text-align: left;
}

.page-title {
    font-size: 20px;
    color: #f7f4a7;
    margin-bottom: 16px;
}

.page-placeholder {
    background: rgba(17, 33, 46, 0.48);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 6px;
    padding: 40px 24px;
    text-align: center;
    color: #cdd6e0;
}

.about-logo {
    display: block;
    margin: 0 auto 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.about-desc {
    white-space: pre-line;
    text-align: left;
    line-height: 1.8;
    margin-top: 16px;
}

/* ---------------- 排行榜：统计分析卡片 ---------------- */

.section-title {
    font-size: 16px;
    color: #f7f4a7;
    margin: 28px 0 16px;
    padding-left: 10px;
    border-left: 3px solid #f7f4a7;
    line-height: 1.2;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.stat-card {
    background: linear-gradient(160deg, rgba(17, 33, 46, 0.85), rgba(17, 33, 46, 0.55));
    border: 1px solid rgba(247, 244, 167, 0.25);
    border-radius: 8px;
    padding: 22px 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(247, 244, 167, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.stat-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    display: block;
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
    color: #f7f4a7;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    margin-top: 8px;
    font-size: 12px;
    color: #cdd6e0;
}

@media (max-width: 992px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-value {
        font-size: 24px;
    }
}

/* ---------------- 排行榜：服务器产品 TOP 20 表格 ---------------- */

.rank-table-wrap {
    background: rgba(17, 33, 46, 0.55);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rank-table thead th {
    background: rgba(247, 244, 167, 0.12);
    color: #f7f4a7;
    font-weight: bold;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(247, 244, 167, 0.3);
    white-space: nowrap;
}

.rank-table tbody td {
    padding: 9px 16px;
    border-bottom: 1px solid rgba(247, 244, 167, 0.08);
    color: #cdd6e0;
    vertical-align: middle;
}

.rank-table tbody tr:last-child td {
    border-bottom: none;
}

.rank-table tbody tr {
    transition: background 0.15s ease;
}

.rank-table tbody tr:hover {
    background: rgba(247, 244, 167, 0.06);
}

.col-rank {
    width: 64px;
    text-align: center !important;
}

.col-count {
    width: 260px;
}

.rank-badge {
    display: inline-block;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: rgba(247, 244, 167, 0.12);
    color: #cdd6e0;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ff9d00);
    color: #1a1a1a;
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #e0e0e0, #9aa4ad);
    color: #1a1a1a;
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #d98e5a, #a85f2f);
    color: #fff;
}

.col-name {
    font-family: Consolas, 'Courier New', monospace;
    color: #e6ecf2;
}

.col-banner {
    word-break: break-all;
    font-size: 12px;
    line-height: 1.5;
}

.count-bar {
    position: relative;
    height: 22px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 11px;
    overflow: hidden;
}

.count-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(247, 244, 167, 0.45), rgba(247, 244, 167, 0.85));
    border-radius: 11px;
    transition: width 0.4s ease;
}

.count-num {
    position: relative;
    display: block;
    height: 22px;
    line-height: 22px;
    padding: 0 10px;
    text-align: right;
    font-size: 12px;
    font-weight: bold;
    color: #f7f4a7;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .rank-table {
        font-size: 12px;
    }
    .rank-table thead th,
    .rank-table tbody td {
        padding: 8px 10px;
    }
    .col-rank {
        width: 44px;
    }
    .col-count {
        width: 130px;
    }
    .col-name {
        word-break: break-all;
    }
}

/* ---------------- 首页：搜索区 ---------------- */

.search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

/* 搜索框独占第二行：输入框 + 两个图标按钮 */
.search-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#search_type,
#country_select {
    font-family: inherit;
    font-size: 14px;
    color: #ffffff;
    background: rgba(17, 33, 46, 0.85);
    border: 1px solid rgba(247, 244, 167, 0.45);
    border-radius: 6px;
    padding: 8px;
    height: 38px;
    outline: none;
    cursor: pointer;
}

#country_select {
    width: 175px;
    max-width: 100%;
    padding: 8px 34px 8px 12px;
    /* 去掉原生外观，使用自定义箭头 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f7f4a7' d='M6 8.5L1.5 4h9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#country_select:hover {
    border-color: rgba(247, 244, 167, 0.85);
    box-shadow: 0 0 8px rgba(247, 244, 167, 0.25);
}

#country_select option {
    color: #ffffff;
    background: #11212e;
    padding: 6px 10px;
}

#country_select option:checked {
    background: rgba(247, 244, 167, 0.25);
    color: #f7f4a7;
}

#country_select option[value=""] {
    color: #8fa0b2;
    font-style: italic;
}

#search_q {
    flex: 1 1 280px;
    min-width: 0;
    max-width: 340px;
    font-family: inherit;
    font-size: 14px;
    color: #ffffff;
    background: rgba(17, 33, 46, 0.85);
    border: 1px solid rgba(247, 244, 167, 0.45);
    border-radius: 3px;
    padding: 8px 10px;
    height: 38px;
    outline: none;
}

#search_q::placeholder {
    color: #8fa0b2;
}

#search_q:focus,
#search_type:focus,
#country_select:focus {
    border-color: #f7f4a7;
}

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border: none;
    background: transparent;
    flex: 0 0 auto;
}

.icon-box img {
    width: 32px;
    height: 32px;
    display: block;
}

.icon-box:hover {
    filter: brightness(1.25);
}

/* 龙图标可点击（弹出 TODO 提示） */
#loong_box {
    cursor: pointer;
}

/* 热门搜索标题行：标题 + 图标并排 */
.hot-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* 热门搜索标题条：深蓝 #11212E，48% 透明 */
#hot_key {
    display: inline-block;
    background-color: rgba(17, 33, 46, 0.48);
    border: 1px solid rgba(247, 244, 167, 0.15);
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 13px;
    color: #f7f4a7;
    margin-bottom: 0;
}

#hot_icon {
    width: 32px;
    height: 32px;
}

#hot_list {
    background-color: rgba(17, 33, 46, 0.48);
    border: 1px solid rgba(247, 244, 167, 0.15);
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 522px;
    max-width: 100%;
}

.hot-item {
    width: 500px;
    max-width: 100%;
    height: 40px;
    line-height: 40px;
    padding: 0 14px;
    color: #dce6f0;
    background: rgba(17, 33, 46, 0.8);
    border: 1px solid rgba(247, 244, 167, 0.15);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition_: background 0.15s, color 0.15s;
}

.hot-item:hover {
    background: rgba(247, 244, 167, 0.12);
    color: #f7f4a7;
}

.hot-hint {
    margin-top: 12px;
    font-style: italic;
    font-size: 11px;
    color: #f7f4a7; /* 淡金色 */
    text-align: center;
}

/* ---------------- 视频页 ---------------- */

.media-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 60vh;
}

.media-content audio {
    width: 300px;
    max-width: 100%;
    accent-color: #f7f4a7;            /* 进度条、滑块等强调色：淡金色 */
    background-color: rgba(247, 244, 167, 0.08);
    border: 1px solid rgba(247, 244, 167, 0.35);
    border-radius: 6px;
    padding: 2px;
}

/* 音频条目：标签 + 播放器纵向排列 */
.audio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(17, 33, 46, 0.55);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.audio-item:hover {
    border-color: rgba(247, 244, 167, 0.55);
    box-shadow: 0 0 12px rgba(247, 244, 167, 0.15);
}

.audio-label {
    color: #f7f4a7;
    font-size: 13px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* WebKit 内核（Chrome/Edge/Safari）控件面板底色 */
.media-content audio::-webkit-media-controls-panel {
    background-color: rgba(17, 33, 46, 0.85);
}

.media-content video {
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    border: 1px solid rgba(247, 244, 167, 0.25);
    border-radius: 4px;
    background: #000000;
}

/* ---------------- 法律 / 文档内容 ---------------- */

.doc-content {
    background: rgba(17, 33, 46, 0.62);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 6px;
    padding: 28px 32px;
    line-height: 1.8;
}

.doc-content h1 {
    font-size: 22px;
    color: #f7f4a7;
    margin-bottom: 18px;
}

.doc-content h2 {
    font-size: 17px;
    color: #f7f4a7;
    margin: 22px 0 10px;
}

.doc-content h3 {
    font-size: 15px;
    color: #ffffff;
    margin: 16px 0 8px;
}

.doc-content p {
    margin-bottom: 10px;
}

.doc-content blockquote {
    border-left: 3px solid #f7f4a7;
    background: rgba(247, 244, 167, 0.07);
    padding: 8px 14px;
    margin: 10px 0;
    color: #e8e2a8;
}

.doc-content ul,
.doc-content ol {
    margin: 8px 0 12px 26px;
}

.doc-content li {
    margin-bottom: 6px;
}

.doc-content strong {
    color: #f7f4a7;
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13px;
}

.doc-content th,
.doc-content td {
    border: 1px solid rgba(247, 244, 167, 0.35);
    padding: 8px 10px;
    text-align: left;
}

.doc-content th {
    background: rgba(247, 244, 167, 0.12);
    color: #f7f4a7;
}

/* ---------------- 底部 ---------------- */

.site-footer {
    flex-shrink: 0;
    background: rgba(10, 22, 34, 0.7);
    border-top: 1px solid rgba(247, 244, 167, 0.18);
    padding: 14px 16px;
    text-align: center;
    font-size: 12px;
    color: #c8d2dd;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 16px;
}

.footer-inner a {
    color: #c8d2dd;
}

.footer-inner a:hover {
    color: #f7f4a7;
}

.footer-sep {
    opacity: 0.4;
}

/* ---------------- 平板自适应 ---------------- */

@media (max-width: 992px) {
    .main-nav {
        gap: 6px 18px;
    }

    #search_q {
        max-width: 320px;
    }
}

/* ---------------- 手机自适应 ---------------- */

@media (max-width: 600px) {
    .header-top {
        flex-direction: column;
        gap: 8px;
    }

    .header-actions {
        justify-content: center;
    }

    .main-nav {
        gap: 8px 14px;
        padding-bottom: 10px;
    }

    .nav-link,
    .btn-link {
        font-size: 11pt;
    }

    .site-main {
        padding: 16px 10px 30px;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #search_type,
    #country_select {
        width: 100%;
        max-width: 100%;
    }

    #search_q {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }

    .search-bar .icon-box {
        flex: 0 0 32px;
        align-self: center;
    }

    .doc-content {
        padding: 18px 14px;
    }

    .footer-inner {
        gap: 6px 10px;
    }
}

/* ---------------- 文档页：语法说明 ---------------- */

.docs-wrap {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-bottom: 30px;
}

.docs-h2 {
    position: relative;
    padding-left: 14px;
    margin: 0 0 14px;
    font-size: 18px;
    color: #f7f4a7;
}

.docs-h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, #f7f4a7, #d8b34a);
}

.docs-table-wrap {
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(17, 33, 46, 0.9);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.6;
}

.docs-table thead th {
    background: rgba(247, 244, 167, 0.12);
    color: #f7f4a7;
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(247, 244, 167, 0.3);
    white-space: nowrap;
}

.docs-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(247, 244, 167, 0.08);
    color: #cdd6e0;
    vertical-align: top;
}

.docs-table tbody tr:last-child td {
    border-bottom: none;
}

.docs-table tbody tr:hover {
    background: rgba(247, 244, 167, 0.05);
}

.docs-table .col-syntax {
    width: 38%;
}

.docs-table code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    color: #ffe9a8;
    background: rgba(247, 244, 167, 0.1);
    border: 1px solid rgba(247, 244, 167, 0.18);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: normal;
    word-break: break-all;
}

@media (max-width: 768px) {
    .docs-table {
        font-size: 12px;
    }
    .docs-table thead th,
    .docs-table tbody td {
        padding: 8px 10px;
    }
    .docs-table .col-syntax {
        width: auto;
    }
}

/* 限流提示 */
.rate-limit-tip{max-width:560px;margin:60px auto;padding:36px 40px;text-align:center;background:rgba(20,30,55,.72);border:1px solid rgba(212,175,55,.35);border-radius:14px;box-shadow:0 8px 32px rgba(0,0,0,.35);backdrop-filter:blur(6px)}
.rate-limit-icon{font-size:46px;line-height:1;color:#d4af37;margin-bottom:14px}
.rate-limit-text{margin:0;font-size:18px;color:#f0e6c8;letter-spacing:.5px}

/* 未启用 JavaScript 提示条（<noscript> 内，仅禁用 JS 时显示） */
.noscript-tip{width:100%;box-sizing:border-box;padding:12px 16px;text-align:center;background:rgba(212,175,55,.92);color:#1b2433;font-size:15px;font-weight:600;letter-spacing:.5px}

/* ============================================================
   搜索结果页（type=ip）
   ============================================================ */

.search-results {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 顶部搜索类型与关键字条 */
.search-query-bar {
    background: rgba(17, 33, 46, 0.6);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 6px;
    padding: 10px 16px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 14px;
    color: #cdd6e0;
}
.search-query-bar .sq-type { color: #f7f4a7; }
.search-query-bar .sq-sep  { opacity: 0.5; }
.search-query-bar .sq-q    { color: #ffffff; }
.search-query-bar .sq-note { color: #f7f4a7; opacity: 0.65; font-size: 13px; }

/* 未找到提示 */
.ip-not-found {
    background: rgba(17, 33, 46, 0.55);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 8px;
    padding: 60px 24px;
    text-align: center;
    font-size: 18px;
    color: #cdd6e0;
}

/* IP 统计信息面板 */
.div_class_stat {
    background: rgba(17, 33, 46, 0.65);
    border: 1px solid rgba(247, 244, 167, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.div_class_stat .stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    line-height: 1.6;
}
.div_class_stat .stat-label {
    color: #f7f4a7;
    flex: 0 0 90px;
}
.div_class_stat .stat-value {
    color: #e6ecf2;
    flex: 1;
    word-break: break-all;
}
.flag-icon {
    display: inline-block;
    max-height: 25px;
    max-width: 25px;
    width: auto;
    height: auto;
    vertical-align: middle;
    margin: 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 主 Tab 组 */
.result-tabs {
    background: rgba(17, 33, 46, 0.9);
    border: 1px solid rgba(247, 244, 167, 0.18);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.9;
}
.main-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    background: rgba(247, 244, 167, 0.08);
    border-bottom: 1px solid rgba(247, 244, 167, 0.2);
}
.main-tab-btn {
    background: transparent;
    border: none;
    border-right: 1px solid rgba(247, 244, 167, 0.12);
    color: #cdd6e0;
    padding: 10px 22px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}
.main-tab-btn:hover { background: rgba(247, 244, 167, 0.1); color: #f7f4a7; }
.main-tab-btn.active { background: rgba(247, 244, 167, 0.16); color: #f7f4a7; font-weight: bold; }
.main-tab-content { padding: 16px; }
.main-tab-pane { display: none; }
.main-tab-pane.active { display: block; }

.todo-placeholder, .no-port {
    padding: 50px 20px;
    text-align: center;
    color: #8fa0b2;
    font-size: 15px;
}

/* 端口卡片 */
.div_class_item {
    background: rgba(17, 33, 46, 0.6);
    border: 1px solid rgba(247, 244, 167, 0.18);
    border-radius: 8px;
    margin-bottom: 14px;
    overflow: hidden;
}
.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(247, 244, 167, 0.06);
    border-bottom: 1px solid rgba(247, 244, 167, 0.15);
}
.item-title {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #6ad5ff;
}
.item-buttons { display: flex; gap: 8px; }
.port-badge, .service-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}
.port-badge {
    background: rgba(247, 244, 167, 0.2);
    color: #f7f4a7;
    border: 1px solid rgba(247, 244, 167, 0.4);
}
.service-badge {
    background: rgba(106, 213, 255, 0.15);
    color: #6ad5ff;
    border: 1px solid rgba(106, 213, 255, 0.35);
}

/* 卡片内容：左服务信息 + 右子 Tab */
.item-body {
    display: flex;
    flex-direction: row;
    gap: 0;
}
.item-left {
    flex: 1 1 40%;
    min-width: 0;
    padding: 12px 16px;
    border-right: 1px solid rgba(247, 244, 167, 0.12);
}
.item-right {
    flex: 1 1 60%;
    min-width: 0;
    padding: 12px 16px;
}
.info-line {
    display: flex;
    gap: 6px;
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.6;
}
.info-label {
    color: #f7f4a7;
    flex: 0 0 auto;
}
.info-text {
    color: #cdd6e0;
    word-break: break-all;
    flex: 1;
}
.info-time .info-text { color: #8fa0b2; font-family: Consolas, 'Courier New', monospace; font-size: 12px; }

/* 子 Tab */
.sub-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(247, 244, 167, 0.15);
}
.sub-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    color: #cdd6e0;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}
.sub-tab-btn:hover { background: rgba(247, 244, 167, 0.08); color: #f7f4a7; }
.sub-tab-btn.active {
    background: rgba(247, 244, 167, 0.12);
    color: #f7f4a7;
    border-color: rgba(247, 244, 167, 0.25);
}
.sub-tab-pane { display: none; }
.sub-tab-pane.active { display: block; }

.code-block {
    margin: 0;
    padding: 10px 12px;
    background: rgba(10, 22, 34, 0.7);
    border: 1px solid rgba(247, 244, 167, 0.12);
    border-radius: 4px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #dce6f0;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 320px;
    overflow-y: auto;
}

/* 散列值表格 */
.hash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hash-table th {
    background: rgba(247, 244, 167, 0.1);
    color: #f7f4a7;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid rgba(247, 244, 167, 0.18);
    white-space: nowrap;
    font-weight: 500;
}
.hash-table td {
    padding: 8px 12px;
    border: 1px solid rgba(247, 244, 167, 0.12);
    color: #cdd6e0;
    word-break: break-all;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
}

/* 平板/手机：卡片内容改纵向 */
@media (max-width: 768px) {
    .item-body { flex-direction: column; }
    .item-left { border-right: none; border-bottom: 1px solid rgba(247, 244, 167, 0.12); }
    .div_class_stat .stat-label { flex: 0 0 70px; }
}
@media (max-width: 600px) {
    .main-tab-btn { padding: 8px 14px; font-size: 13px; }
    .item-title { font-size: 14px; }
    .info-line { font-size: 12px; }
}

/* 同一个IP的子域名 */
#div_same_ip_dns {
    margin-top: 16px;
}
.dns-section-title {
    color: #f7f4a7;
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 10px;
}
#div_same_ip_dns .item-title {
    word-break: break-all;
}
