*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Microsoft YaHei",sans-serif;background:#f2f3f5;color:#293444}a{color:#2366b1;text-decoration:none}a:hover{text-decoration:underline}.wrap{max-width:1360px;margin:auto;padding:18px}.site-head{background:linear-gradient(120deg,#fffdf8,#eef2fa);text-align:center;padding:24px 0;border-bottom:1px solid #e4e8ee}.site-head h1{font-size:34px;margin:0}.site-head p{color:#718096}.site-head nav a{margin:0 12px}.categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.panel{background:rgba(255,255,255,.94);padding:22px;border:1px solid #e8eaf0;border-radius:16px;box-shadow:0 5px 18px #202b3810}.panel h3{margin:0 0 15px;border-bottom:1px solid #eee;padding-bottom:12px}.section-title{margin:30px 0 14px}.links{display:grid;gap:12px}.text-links{grid-template-columns:repeat(2,minmax(0,1fr))}.image-links{grid-template-columns:repeat(4,minmax(0,1fr))}.links a{color:#334155;overflow-wrap:anywhere}.image-links a{text-align:center}.link-logo{width:70px;height:70px;object-fit:cover;border-radius:12px;display:block;margin:0 auto 7px}.ad-circle{display:grid;grid-template-columns:repeat(8,1fr);gap:16px;margin:20px 0}.ad-circle img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:50%}.ad-slider{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;margin:20px 0}.ad-slider a{flex:0 0 100%;scroll-snap-align:start}.ad-slider img{width:100%;max-height:280px;object-fit:cover;border-radius:12px}.ad-banner,.ad-footer{display:grid;gap:12px;margin:20px 0}.ad-banner img,.ad-footer img{display:block;width:100%;max-height:240px;object-fit:cover;border-radius:12px}footer{text-align:center;padding:30px;color:#7a8799}.narrow{max-width:580px;margin:40px auto}label{display:block;margin:12px 0;color:#526173}input,select,textarea{display:block;width:100%;padding:10px;border:1px solid #cfd8e4;border-radius:8px;margin:5px 0;background:white;color:#263444}input[type=checkbox]{display:inline;width:auto}button,.btn{display:inline-block;padding:9px 17px;border:0;border-radius:8px;background:#2563eb;color:white;cursor:pointer}.err{color:#b42318}.admin-nav{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;background:#fff;padding:16px}.admin-nav a{padding:8px}.admin-main{max-width:1300px;margin:24px auto;padding:0 18px}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.item{padding:14px;border-bottom:1px solid #eee}.item img{max-width:180px;max-height:80px;object-fit:contain}.muted{color:#728197;font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap}.inline-form{display:inline}.danger{background:#b42318}@media(max-width:900px){.categories{grid-template-columns:1fr 1fr}.admin-grid{grid-template-columns:1fr}.ad-circle{grid-template-columns:repeat(4,1fr)}}@media(max-width:600px){.categories{grid-template-columns:1fr}.image-links{grid-template-columns:repeat(4,1fr)}.text-links{grid-template-columns:repeat(2,1fr)}.wrap{padding:12px}.site-head h1{font-size:26px}}

/* =====================================
   红果AI导航 - 首页栏目彩色标题修复
   ===================================== */

/* 首页图片链接、文字链接栏目标题 */
.categories > .panel > h3 {
    display: block !important;
    margin: -22px -22px 18px !important;
    padding: 14px 18px !important;
    background: linear-gradient(135deg, #2563eb, #0891b2) !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    border: none !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

/* 第1种颜色：蓝色 */
.categories > .panel:nth-child(6n+1) > h3 {
    background: linear-gradient(135deg,#2563eb,#06b6d4) !important;
}

/* 第2种颜色：绿色 */
.categories > .panel:nth-child(6n+2) > h3 {
    background: linear-gradient(135deg,#16a34a,#059669) !important;
}

/* 第3种颜色：橙色 */
.categories > .panel:nth-child(6n+3) > h3 {
    background: linear-gradient(135deg,#f59e0b,#ea580c) !important;
}

/* 第4种颜色：紫色 */
.categories > .panel:nth-child(6n+4) > h3 {
    background: linear-gradient(135deg,#8b5cf6,#6d28d9) !important;
}

/* 第5种颜色：粉色 */
.categories > .panel:nth-child(6n+5) > h3 {
    background: linear-gradient(135deg,#ec4899,#db2777) !important;
}

/* 第6种颜色：青绿色 */
.categories > .panel:nth-child(6n+6) > h3 {
    background: linear-gradient(135deg,#0d9488,#0f766e) !important;
}

/* 栏目卡片 */
.categories > .panel {
    overflow: hidden;
    transition: box-shadow .2s ease;
}

.categories > .panel:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.10);
}

/* 手机端 */
@media(max-width:600px) {
    .categories > .panel > h3 {
        font-size: 16px !important;
        padding: 12px 15px !important;
    }
}

/* 2026 升级：电脑每行4个、手机每行3个，卡片居中 */
.categories{grid-template-columns:repeat(2,minmax(0,1fr))}
.categories .links{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:12px}
.categories .links a{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-width:0;font-weight:700;font-size:16px;line-height:1.45;padding:10px 4px;background:#f7f8fc;border:1px solid #e8eaf2;border-radius:10px}
.categories .links a span{display:flex;flex-direction:column;align-items:center;overflow-wrap:anywhere;width:100%}
.categories .link-logo{max-width:100%;width:76px;height:76px;object-fit:contain}
.category-more{text-align:right;margin:16px 0 0}.category-more a{display:inline-block;background:#2563eb;color:white;padding:7px 15px;border-radius:9px;font-weight:700}
.link-detail{max-width:850px;margin:24px auto;text-align:center;padding:36px}.link-detail h2{font-size:30px}.detail-logo{display:block;max-width:200px;max-height:200px;object-fit:contain;margin:20px auto}.detail-hint{font-size:21px;font-weight:700;color:#273449;margin-top:25px}.detail-enter{display:inline-block;background:#2563eb;color:#fff;padding:13px 28px;border-radius:10px;font-size:19px;font-weight:700}.detail-enter:hover{color:white;background:#174cb5}
.owner-info{max-width:650px}.owner-info p{overflow-wrap:anywhere;line-height:1.7}.owner-preview{max-width:140px;max-height:140px;object-fit:contain}
@media(max-width:600px){.categories{grid-template-columns:1fr}.categories .links{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.categories .links a{font-size:13px;padding:8px 2px}.categories .link-logo{width:65px;height:65px}.panel{padding:14px}.categories>.panel>h3{margin:-14px -14px 15px!important}.link-detail{padding:20px}.ad-circle{gap:6px}}

/* Apply page owner logo thumbnail: desktop + mobile */
.owner-info img.owner-preview{display:block!important;width:150px!important;height:150px!important;max-width:150px!important;max-height:150px!important;object-fit:contain!important;object-position:center!important;margin:10px 0!important;}

/* 2026-11 横幅广告完整展示修复：覆盖旧的 max-height / object-fit:cover */
.ad-banner, .ad-slider {height:auto!important; min-height:0!important; overflow:visible;}
.ad-banner a, .ad-slider a {height:auto!important; min-height:0!important; display:block;}
.ad-banner img, .ad-slider img {
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  aspect-ratio:auto!important;
  border-radius:12px;
}
@media(max-width:600px){
  .ad-banner img, .ad-slider img {width:100%!important;height:auto!important;max-height:none!important;}
}
