*{margin:0;padding:0;box-sizing:border-box}
body{font:14px/1.6 -apple-system,"PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;color:#333;background:#fff;min-width:320px}
a{text-decoration:none;color:#2563eb}
a:hover{color:#1d4ed8}
img{max-width:100%;display:block}

.wrap{max-width:1200px;margin:0 auto;padding:0 16px}

/* header */
.topbar{background:#f5f5f5;border-bottom:1px solid #e5e5e5;font-size:12px;line-height:32px;color:#666}
.topbar .wrap{display:flex;justify-content:space-between}

.header{padding:20px 0;border-bottom:1px solid #eee}
.header .wrap{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.logo{font-size:22px;font-weight:700;color:#111;display:flex;align-items:center;gap:6px}
.logo span{color:#e74c3c}

/* search */
.search-box{position:relative;flex:1;max-width:480px;min-width:200px}
.search-box input{width:100%;height:40px;padding:0 44px 0 14px;border:2px solid #2563eb;font-size:14px;outline:none;background:#fff}
.search-box button{position:absolute;right:0;top:0;width:44px;height:40px;background:#2563eb;border:none;color:#fff;cursor:pointer;font-size:18px;line-height:40px}
.search-box button:hover{background:#1d4ed8}

/* nav categories */
.nav-cats{border-bottom:1px solid #eee;background:#fff}
.nav-cats .wrap{display:flex;flex-wrap:wrap;gap:0}
.nav-cats a{display:block;padding:10px 18px;color:#555;font-size:14px;border-bottom:2px solid transparent}
.nav-cats a:hover,.nav-cats a.active{color:#2563eb;border-bottom-color:#2563eb}

/* main */
.main{padding:24px 0}
.main .wrap{display:flex;gap:24px}
.sidebar{width:180px;flex-shrink:0}
.content{flex:1;min-width:0}

.sidebar h3{font-size:14px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #eee}
.sidebar a{display:block;padding:6px 0;font-size:13px;color:#666}
.sidebar a:hover,.sidebar a.active{color:#2563eb}
.styles{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.styles span{padding:4px 10px;font-size:12px;background:#f0f0f0;cursor:pointer;border:1px solid #e0e0e0}
.styles span:hover,.styles span.active{background:#2563eb;color:#fff;border-color:#2563eb}

/* grid */
.bread{font-size:13px;color:#888;margin-bottom:16px}
.bread a{color:#2563eb}
.result-info{font-size:13px;color:#888;margin-bottom:12px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.card{border:1px solid #e8e8e8;background:#fff;overflow:hidden}
.card:hover{border-color:#2563eb;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.card .thumb{height:150px;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:700;position:relative}
.card .thumb .badge{position:absolute;top:6px;right:6px;background:#e74c3c;color:#fff;font-size:11px;padding:1px 6px;font-weight:400}
.card .info{padding:10px 12px}
.card .info h3{font-size:14px;font-weight:600;margin-bottom:4px;line-height:1.4}
.card .info h3 a{color:#333}
.card .info h3 a:hover{color:#2563eb}
.card .info .meta{font-size:12px;color:#999;display:flex;align-items:center;gap:8px}

/* detail page */
.detail-header{padding:24px 0;border-bottom:1px solid #eee}
.detail-header h1{font-size:22px;margin-bottom:8px}
.detail-header .meta{font-size:13px;color:#888}
.detail-body{display:flex;gap:24px;padding:24px 0}
.detail-main{flex:1}
.detail-sidebar{width:260px}
.slide-preview{border:1px solid #e0e0e0;margin-bottom:12px;min-height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 30px;text-align:center;background-size:cover;background-position:center}
.slide-preview h2{font-size:26px;margin-bottom:10px}
.slide-preview p{font-size:14px;opacity:.8}
.slide-nav{display:flex;justify-content:center;gap:4px;margin-top:12px}
.slide-nav span{width:10px;height:10px;border-radius:50%;background:#ddd;cursor:pointer}
.slide-nav span.active{background:#2563eb}
.detail-sidebar h3{font-size:16px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #eee}
.detail-sidebar .dl-btn{display:block;width:100%;padding:12px;background:#2563eb;color:#fff;border:none;text-align:center;font-size:16px;cursor:pointer;margin-bottom:12px}
.detail-sidebar .dl-btn:hover{background:#1d4ed8}
.detail-sidebar .info-list{font-size:13px;color:#666;line-height:2}
.detail-sidebar .info-list span{color:#999;margin-right:4px}

/* footer */
.footer{background:#f5f5f5;border-top:1px solid #e5e5e5;padding:24px 0;margin-top:40px;text-align:center;font-size:12px;color:#999;line-height:2}
.footer a{color:#666}

/* empty */
.empty{text-align:center;padding:60px 0;color:#999}
.empty p{margin-bottom:12px}

/* mobile */
@media(max-width:768px){
  .main .wrap{flex-direction:column}
  .sidebar{width:100%;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
  .sidebar h3{width:auto;margin:0;padding:0 8px 0 0;border:none}
  .sidebar a{display:inline-block;padding:4px 10px;font-size:13px;background:#f5f5f5;margin:0}
  .grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
  .card .thumb{height:110px;font-size:20px}
  .detail-body{flex-direction:column}
  .detail-sidebar{width:100%}
  .search-box{max-width:100%}
}
