/* ========================================
   资源站公共样式 style.css
   首页 index.html / 详情页 detail.html / 抖音代发 douyin.html 共用
   ======================================== */

/* ===== 基础 ===== */
*{margin:0;padding:0;box-sizing:border-box}
body{background:#f9fafb;font-family:system-ui,-apple-system,'Microsoft YaHei',sans-serif;color:#292524;line-height:1.5}
a{text-decoration:none;color:inherit}
img{max-width:100%}
.wrap{max-width:500px;margin:0 auto;padding:0 0 40px;background:#f9fafb;min-height:100vh}

/* ===== 顶部栏（首页 / 抖音页） ===== */
.topbar{position:sticky;top:0;z-index:10;padding:14px 20px;background:rgba(249,250,251,.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:space-between}
.topbar .back-btn{color:#10b981;font-size:15px;font-weight:500}
.topbar .logo{font-size:17px;font-weight:700;color:#292524}
.topbar .count{font-size:12px;color:#a8a29e}

/* ===== 区块标题 ===== */
.sec{padding:4px 20px 12px;font-size:16px;font-weight:700;display:flex;align-items:baseline;gap:8px}
.sec-sub{font-size:11px;font-weight:400;color:#a8a29e}

/* ===== 页脚 ===== */
.footer{text-align:center;font-size:11px;color:#d6d3d1;padding:30px 0}

/* ===== 加载 / 空态 ===== */
.loading-wrap{display:flex;justify-content:center;padding:40px 0}
.lds-ring{display:inline-block;position:relative;width:32px;height:32px}
.lds-ring div{box-sizing:border-box;display:block;position:absolute;width:26px;height:26px;margin:3px;border:3px solid #d6d3d1;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#d6d3d1 transparent transparent transparent}
.lds-ring div:nth-child(1){animation-delay:-.45s}
.lds-ring div:nth-child(2){animation-delay:-.3s}
.lds-ring div:nth-child(3){animation-delay:-.15s}
@keyframes lds-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
.empty{text-align:center;padding:40px 0;color:#a8a29e;font-size:14px}

/* ===== 通用卡片（首页列表 / 广告卡共用） ===== */
.card{background:#fff;border-radius:14px;margin-bottom:10px;padding:16px 18px;display:flex;align-items:center;gap:14px;border:1px solid #f3f4f6;cursor:pointer;transition:border-color .15s}
.card:active{border-color:#d6d3d1}
.c-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.c-i1{background:#d1fae5;color:#059669}
.c-i2{background:#fef3c7;color:#d97706}
.c-i3{background:#ede9fe;color:#7c3aed}
.c-i4{background:#fce7f3;color:#db2777}
.c-i5{background:#e0f2fe;color:#0284c7}
.c-img{width:44px;height:44px;border-radius:12px;object-fit:cover;flex-shrink:0;background:#f0f0f0}
.c-info{flex:1;min-width:0}
.c-name{font-size:14px;font-weight:600;margin-bottom:2px;color:#292524}
.c-meta{font-size:11px;color:#a8a29e;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.c-meta .badge{font-size:9px;background:#ecfdf5;color:#065f46;padding:1px 6px;border-radius:3px;font-weight:500}
.c-meta .stars{color:#d97706}
.c-meta .ad-badge{font-size:9px;background:#f59e0b;color:#fff;padding:1px 6px;border-radius:3px;font-weight:500}
.ad-card{border:1px dashed #fcd34d;background:#fffbeb;border-radius:14px;margin-bottom:16px;padding:16px 18px;display:flex;align-items:center;gap:14px;width:100%}
.ad-card .c-name{color:#b45309;font-size:14px;font-weight:600}
.ad-card .c-meta{font-size:11px;color:#a8a29e;display:flex;align-items:center;gap:6px}
.ad-card .c-btn{flex-shrink:0;padding:7px 18px;background:#d97706;color:#fff;border-radius:10px;font-size:12px;font-weight:600;text-decoration:none}
.ad-card .c-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0;background:#fef3c7;color:#d97706}
.c-btn{flex-shrink:0;padding:7px 18px;background:#10b981;color:#fff;border-radius:10px;font-size:12px;font-weight:600;text-decoration:none}

/* ========================================
   首页 index.html
   ======================================== */
.hero{margin:8px 16px 20px;border-radius:16px;overflow:hidden;height:190px;display:flex;align-items:flex-end;padding:24px;position:relative}
.hero-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero::before{content:'';position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.6),rgba(0,0,0,.2) 50%);z-index:1}
.hero::after{content:'';position:absolute;inset:0;background:linear-gradient(135deg,rgba(5,150,105,.55),rgba(0,0,0,.2));z-index:1}
.hero-inner{position:relative;z-index:2;color:#fff}
.hero-tag{font-size:10px;background:rgba(255,255,255,.15);display:inline-block;padding:2px 10px;border-radius:8px;margin-bottom:8px}
.hero-title{font-size:20px;font-weight:700;margin-bottom:2px}
.hero-meta{font-size:11px;color:rgba(255,255,255,.65);margin-bottom:12px}
.hero-btn{display:inline-block;padding:7px 22px;background:#fff;color:#059669;border-radius:8px;font-size:12px;font-weight:600;text-decoration:none}

.tabs{padding:0 16px 16px;display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tab{padding:6px 16px;border-radius:10px;font-size:12px;white-space:nowrap;background:#fff;color:#78716c;border:1px solid #e7e5e4;cursor:pointer;flex-shrink:0}
.tab.on{background:#292524;color:#fff;border-color:#292524}

.list{padding:0 16px}

/* ===== 前三宫格（小图标并排） ===== */
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 16px;margin-bottom:12px}
.grid3 > div{min-width:0}
.grid3-item{
  background:#fff;border-radius:14px;padding:12px 8px;
  display:flex;flex-direction:column;align-items:center;
  border:1px solid #f3f4f6;cursor:pointer;transition:border-color .15s;
  min-width:0;width:100%;
}
.grid3-item:active{border-color:#10b981}
.g3-wrap{
  width:64px;height:64px;flex-shrink:0;
  border-radius:14px;overflow:hidden;background:#f0f0f0;
}
.g3-img{width:100%;height:100%;object-fit:cover;display:block}
.g3-icon{
  width:100%;height:100%;
  display:flex;align-items:center;justify-content:center;
  font-size:22px;font-weight:600;
}
.g3-name{
  font-size:11px;font-weight:600;color:#292524;margin-top:8px;
  width:100%;text-align:center;line-height:1.3;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.g3-btn{
  margin-top:6px;padding:4px 18px;
  background:#10b981;color:#fff;
  border-radius:99px;font-size:11px;font-weight:600;
}
.g3-sk-ico{width:64px;height:64px;border-radius:14px}
.g3-sk-name{width:70%;height:12px;border-radius:6px;margin-top:8px}

/* ===== 骨架屏（首页） ===== */
.hero-sk{position:absolute;inset:0;padding:24px;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;background:linear-gradient(135deg,#c7c9d1,#a5a7b0)}
.sk{background:#e5e5ea;border-radius:8px;animation:sk-flash 1.2s ease-in-out infinite}
.sk-tag{width:64px;height:16px}
.sk-title{width:72%;height:24px;margin-top:4px}
.sk-meta{width:56%;height:12px}
.sk-btn{width:96px;height:30px;border-radius:8px;margin-top:6px;background:rgba(255,255,255,.65)}
.sk-list{padding:0 16px}
.sk-card{pointer-events:none}
.sk-ico{width:44px;height:44px;border-radius:12px;flex-shrink:0}
.sk-line{height:14px;border-radius:6px}
.sk-btn2{width:56px;height:28px;border-radius:10px;flex-shrink:0}
.sk-logo{width:120px;height:18px;border-radius:6px}
.sk-count{width:72px;height:12px;border-radius:6px}
@keyframes sk-flash{0%,100%{opacity:.5}50%{opacity:1}}

/* ========================================
   详情页 detail.html
   ======================================== */
.detail-topbar{position:sticky;top:0;z-index:10;padding:14px 20px;background:rgba(249,250,251,.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:space-between;max-width:500px;margin:0 auto}
.detail-topbar .back-btn{color:#10b981;font-size:15px;font-weight:500}
.detail-topbar .logo{font-size:13px;color:#a8a29e}

.detail-banner{width:100%;max-width:500px;margin:0 auto;height:140px;overflow:hidden;background:#f0f0f0}
.detail-banner img{width:100%;height:100%;object-fit:cover}

.detail-info{display:flex;gap:16px;padding:20px 20px 12px;max-width:500px;margin:0 auto}
.di-cover{width:110px;height:110px;min-width:110px;border-radius:14px;overflow:hidden;background:#f0f0f0;box-shadow:0 2px 8px rgba(0,0,0,.06);margin-top:-50px;position:relative;z-index:2}
.di-cover img{width:100%;height:100%;object-fit:cover}
.di-main{flex:1;min-width:0;padding-top:4px}
.di-title{font-size:20px;font-weight:700;color:#292524;margin-bottom:6px;line-height:1.3}
.di-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.di-tag{font-size:11px;padding:2px 10px;border-radius:99px;background:#d1fae5;color:#047857;font-weight:500}
.di-cat{font-size:11px;padding:2px 10px;border-radius:99px;background:#f0f0f0;color:#78716c}
.di-time{font-size:12px;color:#a8a29e}

.detail-actions{display:flex;gap:10px;padding:8px 20px 16px;max-width:500px;margin:0 auto}
.da-btn{flex:1;padding:12px 0;border-radius:12px;font-size:15px;font-weight:600;text-align:center;border:none;cursor:pointer;transition:all .15s}
.da-btn.primary{background:#10b981;color:#fff}
.da-btn.primary:hover{background:#059669}
.da-btn.outline{background:#ecfdf5;color:#059669;border:1px solid #a7f3d0}
.da-btn.outline:hover{background:#d1fae5}

.detail-group-wrap{padding:0 20px 16px;max-width:500px;margin:0 auto}
.detail-ad-wrap{padding:0 20px 16px;max-width:500px;margin:0 auto}
.detail-group{display:flex;align-items:center;gap:8px;padding:14px 20px;background:linear-gradient(135deg,#a78bfa,#7c3aed);border-radius:14px;color:#fff;font-size:14px}
.dg-icon{font-size:18px}
.dg-text{opacity:.9}
.dg-num{font-weight:700;letter-spacing:1px}
.dg-copy{margin-left:auto;padding:4px 14px;background:rgba(255,255,255,.2);border:none;border-radius:8px;color:#fff;font-size:12px;cursor:pointer}

.detail-body{padding:0 20px;max-width:500px;margin:0 auto}
.detail-desc{padding:20px;background:#fff;border-radius:16px}
.dd-title{font-size:16px;font-weight:700;color:#292524;margin-bottom:12px}
.dd-text{line-height:1.8;color:#57534e;font-size:14px}

/* ===== 骨架屏（详情页） ===== */
.sk-banner{width:100%;height:140px;border-radius:0}
.sk-detail-info{display:flex;gap:16px;padding:20px 20px 12px}
.sk-cover{width:110px;height:110px;min-width:110px;border-radius:14px;margin-top:-50px;position:relative;z-index:2}
.sk-detail-main{flex:1;min-width:0;padding-top:4px}
.sk-dl-btn{height:48px;border-radius:12px;margin:8px 20px 16px}
.sk-group{height:48px;border-radius:14px;margin:0 20px 16px}
.sk-desc-box{padding:20px;background:#fff;border-radius:16px;margin:0 20px 20px}

/* ========================================
   抖音代发页 douyin.html
   ======================================== */
.dy-hero{margin:8px 16px 20px;border-radius:16px;overflow:hidden;padding:26px 24px;position:relative;background:linear-gradient(135deg,#ecfdf5,#d1fae5)}
.dy-hero::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 85% 20%,rgba(255,255,255,.6),transparent 55%)}
.dy-hero .hero-tag{background:#a7f3d0;color:#047857;padding:3px 10px;margin-bottom:10px;letter-spacing:1px}
.dy-hero .hero-title{font-size:24px;font-weight:800;margin-bottom:6px;color:#065f46}
.dy-hero .hero-sub{font-size:14px;font-weight:600;margin-bottom:10px;color:#047857}
.dy-hero .hero-desc{font-size:11px;color:#64748b;line-height:1.8}

.income{margin:0 16px 14px;border-radius:16px;background:#fff;border:1px solid #f3f4f6;padding:18px 20px;position:relative}
.income-title{font-size:13px;font-weight:700;color:#292524;margin-bottom:14px;display:flex;align-items:center;gap:6px}
.income-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;position:relative;z-index:1}
.income-item{background:#fafafa;border:1px solid #f3f4f6;border-radius:12px;padding:12px 14px}
.income-num{font-size:20px;font-weight:800;line-height:1.2;color:#059669}
.income-num small{font-size:12px;font-weight:600}
.income-label{font-size:10px;color:#a8a29e;margin-top:3px}
.income-tip{margin-top:12px;font-size:10px;color:#a8a29e;display:flex;align-items:center;gap:5px}
.income-tip::before{content:'';width:5px;height:5px;border-radius:50%;background:#10b981;flex-shrink:0}

.panel{margin:0 16px 14px;background:#fff;border-radius:14px;padding:16px 18px;border:1px solid #f3f4f6}

.steps{display:flex;flex-direction:column;gap:12px}
.step{display:flex;align-items:flex-start;gap:12px}
.step-num{width:24px;height:24px;min-width:24px;border-radius:8px;background:#d1fae5;color:#059669;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-top:1px}
.step-txt{font-size:13px;color:#57534e;line-height:1.7}
.step-txt b{color:#292524;font-weight:600}

.feats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 16px 14px}
.feat{background:#fff;border-radius:12px;padding:10px 4px;text-align:center;border:1px solid #f3f4f6}
.feat-icon{width:30px;height:30px;margin:0 auto 6px;border-radius:9px;display:flex;align-items:center;justify-content:center}
.feat-icon svg{width:15px;height:15px}
.f-i1{background:#d1fae5;color:#059669}
.f-i2{background:#e0f2fe;color:#0284c7}
.f-i3{background:#fce7f3;color:#db2777}
.f-i4{background:#ede9fe;color:#7c3aed}
.feat-name{font-size:11px;font-weight:600}

.warn-icon{width:18px;height:18px;min-width:18px;border-radius:50%;background:#10b981;color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;font-style:normal}
.warn{border:1px dashed #e5e5e4;background:#fff;border-radius:14px;margin:0 16px 14px;padding:14px 18px}
.warn-title{font-size:13px;font-weight:700;color:#292524;display:flex;align-items:center;gap:6px;margin-bottom:8px}
.warn-item{font-size:12px;color:#78716c;line-height:1.8;padding-left:16px;position:relative}
.warn-item::before{content:'';position:absolute;left:2px;top:8px;width:5px;height:5px;border-radius:50%;background:#d6d3d1}
.warn-item b{color:#292524}

.cta{margin:4px 16px 0;padding:14px;border-radius:14px;background:linear-gradient(135deg,#34d399,#10b981);color:#fff;text-align:center;font-size:15px;font-weight:700;cursor:pointer;transition:opacity .15s;box-shadow:0 6px 16px rgba(16,185,129,.2)}
.cta:active{opacity:.85}
.cta small{display:block;font-size:10px;font-weight:400;color:rgba(255,255,255,.85);margin-top:3px}

/* ===== 弹窗（添加对接图片） ===== */
.modal-mask{display:none;position:fixed;inset:0;z-index:999;background:rgba(0,0,0,.55);align-items:center;justify-content:center;padding:24px}
.modal-box{position:relative;background:#fff;border-radius:16px;padding:14px;max-width:340px;width:100%}
.modal-close{position:absolute;top:-12px;right:-12px;width:28px;height:28px;border-radius:50%;background:#292524;color:#fff;border:none;font-size:15px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.modal-box img{display:block;width:100%;border-radius:10px}
