:root{
  --bg:#FBF3E4;
  --surface:#FFF9F0;
  --primary:#E23A2E;
  --accent:#3A8C3F;
  --text:#2A211B;
  --muted:#8A7A6A;
  --radius:16px;
  --font-heading:'Bebas Neue','Oswald','Arial Black',sans-serif;
  --font-body:'Inter','Helvetica Neue','PingFang SC',sans-serif;
  --shadow-soft:6px 6px 14px rgba(42,33,27,.10), -6px -6px 14px rgba(255,255,255,.85);
  --shadow-hard:4px 4px 0 var(--text);
  --line:2px solid var(--text);
}

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

html{-webkit-text-size-adjust:100%;}

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.6;
  background-image:radial-gradient(rgba(42,33,27,.045) 1px, transparent 1px);
  background-size:4px 4px;
}

a{color:inherit;text-decoration:none;}
img{display:block;max-width:100%;}
ul,ol{list-style:none;}
button,input{font-family:inherit;font-size:inherit;}

.wrap{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
}

/* ============ HEADER ============ */
.header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--surface);
  border-bottom:var(--line);
  box-shadow:0 4px 0 rgba(42,33,27,.08);
}
.header .wrap{
  display:flex;
  align-items:center;
  gap:20px;
  min-height:68px;
  flex-wrap:wrap;
}
.logo{
  font-family:var(--font-heading);
  font-size:30px;
  letter-spacing:1px;
  color:var(--primary);
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.logo::before{
  content:"";
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:inset -3px -3px 0 rgba(0,0,0,.15);
}
.logo img{height:36px;width:auto;}

.nav{
  display:flex;
  align-items:center;
  gap:4px;
  flex:1;
  overflow-x:auto;
  scrollbar-width:none;
}
.nav::-webkit-scrollbar{display:none;}
.nav a{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  font-weight:600;
  font-size:14px;
  color:var(--text);
  white-space:nowrap;
  transition:background .2s,color .2s,transform .2s;
}
.nav a:hover{
  background:var(--primary);
  color:#fff;
  transform:translateY(-2px);
}

.search-box{
  display:flex;
  align-items:center;
  gap:6px;
  background:var(--bg);
  border:var(--line);
  border-radius:999px;
  padding:4px 6px 4px 14px;
  box-shadow:var(--shadow-soft);
}
.search-box input{
  border:none;
  outline:none;
  background:transparent;
  width:150px;
  color:var(--text);
  padding:6px 0;
}
.search-box button{
  border:none;
  cursor:pointer;
  background:var(--primary);
  color:#fff;
  border-radius:999px;
  padding:6px 16px;
  font-weight:700;
  transition:background .2s;
}
.search-box button:hover{background:var(--accent);}

/* ============ HERO ============ */
.hero{
  position:relative;
  margin:26px 0;
  border-radius:var(--radius);
  overflow:hidden;
  border:var(--line);
  box-shadow:var(--shadow-hard);
  background:var(--surface);
}
.hero-slide{
  position:relative;
  display:block;
  aspect-ratio:16/7;
  overflow:hidden;
}
.hero-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hero-info{
  position:absolute;
  left:0;
  bottom:0;
  right:0;
  padding:60px 28px 24px;
  background:linear-gradient(to top, rgba(42,33,27,.88), rgba(42,33,27,0));
  color:#fff;
}
.hero-info h2{
  font-family:var(--font-heading);
  font-size:38px;
  line-height:1.05;
  letter-spacing:1px;
  margin-bottom:8px;
}
.hero-info p{
  font-size:14px;
  color:rgba(255,255,255,.82);
  max-width:640px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:14px;
  padding:10px 24px;
  background:var(--primary);
  color:#fff;
  font-weight:700;
  border-radius:999px;
  border:var(--line);
  box-shadow:3px 3px 0 var(--text);
  transition:transform .15s,box-shadow .15s,background .2s;
}
.btn:hover{
  background:var(--accent);
  transform:translate(-1px,-1px);
  box-shadow:5px 5px 0 var(--text);
}

/* ============ SECTION ============ */
.sec{margin:40px 0;}
.sec-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
  padding-bottom:12px;
  border-bottom:var(--line);
}
.sec-title{
  font-family:var(--font-heading);
  font-size:28px;
  letter-spacing:1px;
  display:flex;
  align-items:center;
  gap:10px;
}
.sec-title::before{
  content:"";
  width:10px;
  height:26px;
  background:var(--primary);
  border-radius:3px;
  box-shadow:3px 3px 0 var(--accent);
}
.sec-more{
  font-size:13px;
  font-weight:700;
  color:var(--primary);
  padding:6px 14px;
  border:var(--line);
  border-radius:999px;
  background:var(--surface);
  box-shadow:2px 2px 0 var(--text);
  transition:transform .15s,background .2s,color .2s;
  white-space:nowrap;
}
.sec-more:hover{
  background:var(--primary);
  color:#fff;
  transform:translate(-1px,-1px);
}

/* ============ GRID / CARD ============ */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:22px;
}
.card{
  background:var(--surface);
  border:var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  transition:transform .2s,box-shadow .2s;
  display:flex;
  flex-direction:column;
}
.card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-hard);
}
.card-cover{
  position:relative;
  aspect-ratio:2/3;
  overflow:hidden;
  background:var(--bg);
}
.card-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .4s;
}
.card:hover .card-cover img{transform:scale(1.06);}
.card-score{
  position:absolute;
  top:10px;
  right:10px;
  background:var(--primary);
  color:#fff;
  font-weight:800;
  font-size:13px;
  padding:3px 10px;
  border-radius:999px;
  border:2px solid var(--text);
  box-shadow:2px 2px 0 var(--text);
}
.card-info{
  padding:12px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
}
.card-title{
  font-size:15px;
  font-weight:700;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card:hover .card-title{color:var(--primary);}
.card-meta{
  font-size:12px;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:4px 8px;
  margin-top:auto;
}

/* ============ CAT LIST ============ */
.cat-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:14px;
}
.cat-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:14px 18px;
  background:var(--surface);
  border:var(--line);
  border-radius:var(--radius);
  font-weight:700;
  box-shadow:var(--shadow-soft);
  transition:transform .15s,background .2s,color .2s;
}
.cat-item:hover{
  background:var(--accent);
  color:#fff;
  transform:translateY(-3px);
}
.cat-count{
  font-size:12px;
  font-weight:800;
  background:var(--primary);
  color:#fff;
  border-radius:999px;
  padding:1px 9px;
  border:2px solid var(--text);
}
.cat-item:hover .cat-count{background:var(--surface);color:var(--text);}

/* ============ RANK LIST ============ */
.rank-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.rank-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 16px;
  background:var(--surface);
  border:var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  transition:transform .15s,box-shadow .15s;
}
.rank-item:hover{
  transform:translateX(4px);
  box-shadow:var(--shadow-hard);
}
.rank-num{
  font-family:var(--font-heading);
  font-size:26px;
  min-width:42px;
  text-align:center;
  color:var(--primary);
  line-height:1;
}
.rank-item:nth-child(-n+3) .rank-num{color:var(--accent);}
.rank-title{
  flex:1;
  font-weight:700;
  font-size:15px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rank-score{
  font-weight:800;
  color:var(--primary);
  font-size:14px;
  background:var(--bg);
  padding:2px 12px;
  border-radius:999px;
  border:2px solid var(--text);
}

/* ============ DETAIL ============ */
.detail{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:32px;
  margin:30px 0;
  align-items:start;
}
.detail-head{
  display:flex;
  gap:24px;
}
.detail-cover{
  width:100%;
  aspect-ratio:2/3;
  border-radius:var(--radius);
  border:var(--line);
  overflow:hidden;
  box-shadow:var(--shadow-hard);
  background:var(--surface);
  flex-shrink:0;
}
.detail-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.detail-meta{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:22px;
  background:var(--surface);
  border:var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
}
.detail-meta h1{
  font-family:var(--font-heading);
  font-size:34px;
  line-height:1.1;
  letter-spacing:1px;
}
.detail-meta p{
  font-size:14px;
  color:var(--muted);
}
.detail-meta p strong{color:var(--text);}
.detail-score{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-heading);
  font-size:26px;
  color:#fff;
  background:var(--primary);
  border:var(--line);
  border-radius:999px;
  padding:2px 18px;
  box-shadow:3px 3px 0 var(--text);
  align-self:flex-start;
}
.detail-body{
  background:var(--surface);
  border:var(--line);
  border-radius:var(--radius);
  padding:24px;
  box-shadow:var(--shadow-soft);
  font-size:15px;
  line-height:1.8;
  color:var(--text);
}
.detail-body h2{
  font-family:var(--font-heading);
  font-size:24px;
  letter-spacing:1px;
  margin:20px 0 10px;
}
.detail-body h2:first-child{margin-top:0;}
.detail-body p{margin-bottom:12px;color:var(--muted);}
.detail-body a{color:var(--primary);font-weight:700;}

/* ============ TAGS ============ */
.tag-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.tag{
  display:inline-block;
  font-size:12px;
  font-weight:600;
  padding:4px 12px;
  border-radius:999px;
  background:var(--bg);
  color:var(--text);
  border:2px solid var(--text);
  transition:background .2s,color .2s;
}
.tag:hover{
  background:var(--primary);
  color:#fff;
}

/* ============ PAGER ============ */
.pager{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin:36px 0;
}
.pg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:40px;
  padding:0 14px;
  font-weight:700;
  font-size:14px;
  border-radius:12px;
  background:var(--surface);
  border:var(--line);
  box-shadow:2px 2px 0 var(--text);
  transition:transform .15s,background .2s,color .2s;
}
.pg:hover{
  background:var(--accent);
  color:#fff;
  transform:translate(-1px,-1px);
}
.pg.current{
  background:var(--primary);
  color:#fff;
  box-shadow:3px 3px 0 var(--text);
}
.pg.disabled{
  opacity:.4;
  pointer-events:none;
  box-shadow:none;
}

/* ============ LINKS ============ */
.links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:20px;
  background:var(--surface);
  border:var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
}
.link-item{
  font-size:13px;
  padding:5px 14px;
  border-radius:999px;
  background:var(--bg);
  border:2px solid transparent;
  color:var(--muted);
  transition:color .2s,border-color .2s,background .2s;
}
.link-item:hover{
  color:var(--primary);
  border-color:var(--primary);
  background:var(--surface);
}

/* ============ FOOTER ============ */
.footer{
  margin-top:50px;
  padding:36px 0 28px;
  background:var(--surface);
  border-top:var(--line);
  box-shadow:0 -4px 0 rgba(42,33,27,.08);
  text-align:center;
  font-size:13px;
  color:var(--muted);
}
.footer a{color:var(--primary);font-weight:600;}
.footer a:hover{text-decoration:underline;}
.footer p{margin:6px 0;}

/* ============ CRUMBS ============ */
.crumbs{
  font-size:13px;
  color:var(--muted);
  padding:16px 0 4px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.crumbs a{color:var(--primary);font-weight:600;}
.crumbs a:hover{text-decoration:underline;}

/* ============ HIGHLIGHT ============ */
.hl{
  background:var(--primary);
  color:#fff;
  border-radius:4px;
  padding:0 4px;
  font-weight:700;
}

/* ============ RESPONSIVE ============ */
@media (max-width:768px){
  .wrap{padding:0 14px;}
  .header .wrap{
    gap:10px;
    min-height:auto;
    padding-top:10px;
    padding-bottom:10px;
  }
  .logo{font-size:24px;}
  .nav{
    order:3;
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
  }
  .nav a{padding:6px 12px;font-size:13px;}
  .search-box{
    order:2;
    margin-left:auto;
    flex:0 0 auto;
  }
  .search-box input{width:90px;}
  .search-box button{padding:6px 12px;}

  .hero{margin:16px 0;border-radius:12px;}
  .hero-slide{aspect-ratio:4/3;}
  .hero-info{padding:40px 16px 16px;}
  .hero-info h2{font-size:26px;}
  .hero-info p{font-size:13px;}

  .sec{margin:26px 0;}
  .sec-title{font-size:22px;}
  .sec-title::before{height:20px;width:8px;}

  .grid{
    grid-template-columns:repeat(2,1fr);
    gap:14px;
  }
  .card-info{padding:10px;}
  .card-title{font-size:13px;}

  .cat-list{grid-template-columns:repeat(2,1fr);gap:10px;}
  .cat-item{padding:10px 14px;font-size:14px;}

  .rank-item{padding:8px 12px;gap:10px;}
  .rank-num{font-size:20px;min-width:32px;}
  .rank-title{font-size:14px;}
  .rank-score{font-size:12px;padding:2px 9px;}

  .detail{
    grid-template-columns:1fr;
    gap:20px;
    margin:18px 0;
  }
  .detail-head{flex-direction:column;gap:16px;}
  .detail-cover{width:60%;max-width:220px;}
  .detail-meta{padding:16px;}
  .detail-meta h1{font-size:26px;}
  .detail-body{padding:16px;font-size:14px;}

  .pg{min-width:34px;height:34px;padding:0 10px;font-size:13px;}

  .links{padding:14px;}
  .footer{padding:26px 0 20px;}
}