:root {
    /* 深色背景方案 */
    --bg-body: #1e272e;
    --border-color: #e0e0e0;
    --text-main: #2f3640;
    --radius: 2px;
    --w-max: 1200px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center top;
}

a { text-decoration: none; color: inherit; }
* { box-sizing: border-box; }

/* 统一容器 */
.container {
    max-width: var(--w-max);
    margin: 0 auto;
    padding: 0; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 细线分隔符 */
.section-divider {
    border-top: 1px solid var(--border-color);
    margin: 0;
    height: 1px;
    width: 100%;
}

/* 紧凑布局核心类 */
.compact-section { background: #fff; margin-bottom: 0; }

/* A. 顶部导航 */
.navbar { 
    background: #fff; 
    height: 54px; /* 从50px改为80px，给图片上下留点呼吸空间 */
}
.nav-inner {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 54px; /* 保持与navbar一致 */
    padding: 0 15px;
}
.logo { 
    display: flex; 
    align-items: center; 
    text-decoration: none; 
    height: 30px;
}

.logo img { 
    height: 30px;  /* 强制图片显示为 60px 高度 */
    width: 90px;  /* 强制图片显示为 180px 宽度 */
    object-fit: contain; /* 关键：确保图片比例不失真 */
    display: block;
}
.nav-links { display: flex; gap: 8px; align-items: center;}
.btn-action { padding: 4px 12px; border-radius: 20px; font-size: 12px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.btn-home { background: #dfe6e9; color: #333; }
.btn-add { background: #2ecc71; color: #fff; }

/* B. 快捷导航 */
.quick-nav-wrapper { background: #fff; padding: 0 0 1px 0; }
.quick-nav-grid {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; 
    background: var(--border-color); border-top: 1px solid var(--border-color);
}
.quick-nav-item {
    background: #2980b9; color: #fff; text-align: center; padding: 10px 0;
    font-size: 13px; font-weight: bold; display: block; transition: background 0.2s;
}
.quick-nav-item:hover { background: #3498db; }

/* C. 横幅 */
.banner-wrapper { padding: 0 !important; }
.banner-wrapper img { display: block; width: 100%; max-height: 120px; object-fit: cover; }

/* D. 图标广告 */
.icon-ads-wrapper { padding-bottom: 5px; }
.ad-icons { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; padding: 10px 5px; }
.ad-icon-item { display: flex; flex-direction: column; align-items: center; text-align: center; transition: opacity 0.2s; }
.ad-icon-item:hover { opacity: 0.8; }
.icon-box {
    width: 91px; height: 91px; border-radius: 10px; overflow: hidden; margin-bottom: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.icon-box img { width: 100%; height: 100%; object-fit: cover; }
.icon-title { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; font-weight: bold; }

/* E. 文字广告 */
.text-ads-wrapper { padding-bottom: 5px; }
.text-ads-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; padding: 10px 5px; }
.text-ad-cell {
    display: flex; align-items: center; background: #f1f2f6; padding: 4px; border-radius: 20px; font-size: 13px;
    transition: all 0.2s; font-weight: bold; overflow: hidden;
}
.text-ad-cell:hover { background: #e1e2e6; transform: translateY(-1px); }
.ad-tag { color: #fff; font-size: 12px; padding: 1px 4px; border-radius: 10px; margin-right: 4px; flex-shrink: 0; font-weight: normal; }
.ad-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* [新增] F0. 每日打卡栏样式 */
.checkin-bar-wrapper { padding: 2px 0; }
.checkin-bar-inner {
    background: linear-gradient(to right, #fff0f3, #fff); /* 淡淡的粉色渐变 */
    border: 1px solid #ffccd5;
    border-radius: var(--radius);
    height: 42px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #d63031;
}
.checkin-content { display: flex; align-items: center; width: 100%; }
.checkin-label { font-weight: bold; font-size: 13px; margin-right: 10px; }
.checkin-slots { display: flex; gap: 5px; margin-right: 15px; }
.slot { font-size: 16px; opacity: 0.3; transition: all 0.3s; transform: scale(1); }
.slot.active { opacity: 1; transform: scale(1.2); text-shadow: 0 0 5px rgba(231, 76, 60, 0.4); }
.checkin-tip { font-size: 12px; color: #636e72; margin-left: auto; }
.checkin-reward-text { 
    font-weight: bold; color: #e84393; font-size: 13px; 
    animation: fadeIn 0.5s ease-in; width: 100%; text-align: center;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* F. 混合栏 */
.mix-bar-wrapper { padding: 2px 0; }
.fused-bar {
    display: flex; align-items: center; background: #fff3e0; color: #e67e22; border: 1px solid #ffe0b2;
    border-radius: var(--radius); height: 40px; width: 100%; overflow: hidden;
}
.mix-part { display: flex; align-items: center; height: 100%; padding: 0 12px; font-size: 13px; font-weight: bold; }
.mix-icon-area { padding-right: 4px; flex-shrink: 0; }
.mix-quote-area { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 0; }
.split-border { border-left: 1px solid rgba(230, 126, 34, 0.2); }
.mix-btn-area { cursor: pointer; flex-shrink: 0; transition: background 0.1s; }
.mix-btn-area:hover { background: rgba(255, 255, 255, 0.4); }
.mix-btn-area:active { background: rgba(0, 0, 0, 0.05); transform: scale(0.98); }
.mix-stat-area { white-space: nowrap; flex-shrink: 0; }
.online-dot { color: #2ecc71; font-size: 14px; margin-right: 4px; animation: breathe 2s infinite; }
@keyframes breathe { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* G. 分类表格 */
.category-section { background: #fff; overflow: hidden; }
.cat-header {
    padding: 8px 12px; color: #fff; display: flex; justify-content: space-between; align-items: center;
}
.cat-title { font-size: 15px; font-weight: bold; display: flex; align-items: center; gap: 6px;}

/* 开关组 */
.switch-group { display: flex; align-items: center; gap: 15px; }
.switch-label { cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 12px; color: rgba(255,255,255,0.9); font-weight: bold;}
.switch-input { display: none; }
.switch-toggle { width: 30px; height: 16px; background: rgba(0,0,0,0.25); border-radius: 16px; position: relative; transition: 0.3s; }
.switch-toggle::after { content:''; position: absolute; top:2px; left:2px; width:12px; height:12px; background:#fff; border-radius:50%; transition:0.3s;}

/* 热度开关选中状态 */
.switch-input:checked + .switch-toggle { background: #00cec9; }
.switch-input:checked + .switch-toggle::after { left:16px; }

/* 检测开关特别样式 (橙色) */
.switch-input:checked + .switch-toggle-check { background: #f39c12; }
.switch-input:checked + .switch-toggle-check::after { left:16px; }

/* 表格 */
.grid-table {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid #eee;
}
.site-item {
    border-right: 1px solid #eee; border-bottom: 1px solid #eee; height: 42px; 
    background: #fff; transition: background 0.2s; padding: 0 8px; display: flex; align-items: center;
}
.site-item:hover { background: #fcfcfc; }
.site-item.is-sticky { background-color: #fffbf0; }
.site-item.is-sticky .site-name { font-weight: bold; color: #c0392b; }

.site-link-row { width: 100%; display: flex; justify-content: space-between; align-items: center; color: var(--text-main); }
.site-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; padding-right: 4px; display: flex; align-items: center; }
.site-vote-box { display: flex; align-items: center; gap: 2px; font-size: 11px; color: #b2bec3; cursor: pointer; flex-shrink: 0; }
.site-vote-box:hover { color: #ff7675; }
.heart-icon { font-size: 11px; }

/* H. 底部版权 */
.site-footer { text-align: center; padding: 15px 0; color: #999; font-size: 12px; background: #fff; }
.site-footer p { margin: 4px 0; }

/* 测速样式 */
.speed-tag { font-size: 10px; margin-left: 4px; padding: 0 4px; border-radius: 2px; font-family: monospace; }
.speed-fast { color: #27ae60; background: rgba(39, 174, 96, 0.1); }
.speed-mid { color: #e67e22; background: rgba(230, 126, 34, 0.1); }
.speed-slow { color: #c0392b; background: rgba(192, 57, 43, 0.1); }
.site-link-down .site-name { text-decoration: line-through; color: #b2bec3; opacity: 0.6; }

/* 移动端适配 */
@media (max-width: 768px) {
    .quick-nav-grid { grid-template-columns: repeat(4, 1fr); }
    .ad-icons { grid-template-columns: repeat(5, 1fr); gap: 5px; }
    .text-ads-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
    .grid-table { grid-template-columns: repeat(3, 1fr); }
    
    .container { width: auto; margin: 0 1px; box-shadow: none; }
    .nav-inner { padding: 0 2px; }
    .ad-text { max-width: 100%; }
    
    .mix-part { padding: 0 4px; font-size: 12px; } 
    .mix-icon-area { padding-right: 2px; } 
    .icon-box { width: 42px; height: 42px; }
    .site-item { padding: 0 3px; }
    .site-name { font-size: 13px; }
    .site-vote-box { font-size: 10px; gap: 1px; }
    .heart-icon { font-size: 10px; }
    
    /* [修改] 移动端现在显示开关文字 */
    .switch-label span { display: inline-block; font-size: 11px; } 
    .switch-group { gap: 8px; }

    /* 打卡栏移动端适配 */
    .checkin-label { font-size: 12px; margin-right: 5px; }
    .checkin-slots { gap: 2px; }
    .slot { font-size: 14px; }
    .navbar, .nav-inner { height: 50px; } /* 手机端导航栏变窄点 */
    .logo img { 
        width: 90px;  /* 手机端图片缩小到 135px */
        height: 30px;  /* 手机端图片缩小到 45px */
    }
}

/* 弹窗样式 (保持原样) */
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); z-index: 9999; display: none; justify-content: center; align-items: center; }
.home-modal-box { width: 90%; max-width: 360px; padding: 0; border-radius: 6px; overflow: hidden; background: #fff; text-align: left; box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.home-modal-header { padding: 15px 20px; font-size: 17px; font-weight: bold; color: #2c3e50; display: flex; justify-content: center; align-items: center; position: relative; background: #fff; }
.close-cross { position: absolute; right: 15px; top: 15px; color: #b2bec3; font-size: 24px; line-height: 1; cursor: pointer; font-weight: normal; }
.close-cross:hover { color: #2d3436; }
.home-divider { height: 1px; background: #f1f2f6; width: 100%; margin: 0; }
.home-list-container { padding: 15px 20px 5px 20px; }
.home-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.home-site-name { font-size: 14px; font-weight: bold; color: #2d3436; margin-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-site-name::first-letter { color: #e67e22; }
.home-btn-group { display: flex; gap: 8px; flex-shrink: 0; }
.btn-copy, .btn-visit, .btn-copy-email { border: none; padding: 5px 12px; border-radius: 4px; font-size: 13px; cursor: pointer; font-family: inherit; transition: all 0.2s; line-height: 1.5; text-align: center; text-decoration: none; display: inline-block; }
.btn-copy, .btn-copy-email { background: #f5f6fa; color: #636e72; border: 1px solid #dcdde1; }
.btn-copy:hover, .btn-copy-email:hover { background: #dcdde1; color: #2d3436; }
.btn-visit { background: #27ae60; color: #fff; border: 1px solid #27ae60; }
.btn-visit:hover { background: #2ecc71; border-color: #2ecc71; opacity: 0.9; }
.home-email-box { padding: 5px 20px 15px 20px; font-size: 13px; color: #2d3436; background: #fff; }
.home-email-box p { margin: 0 0 8px 0; line-height: 1.6; font-weight: bold;}
.email-text { color: #2980b9; } 
.home-footer-area { padding: 15px; text-align: center; background: #fcfcfc; }
.btn-main-close { background: #636e72; color: #fff; border: none; padding: 8px 30px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.btn-main-close:hover { background: #2d3436; }
@media (max-width: 400px) { .home-site-name { font-size: 13px; } .btn-copy, .btn-visit { padding: 4px 8px; font-size: 12px; } }