:root {
  --bg: #FAF3E0;
  --surface: #FFFDF7;
  --primary: #F4A261;
  --accent: #E63946;
  --text: #2B2D42;
  --muted: #8D99AE;
  --radius: 16px;
  --border: 3px solid #2B2D42;
  --shadow: 6px 6px 0 rgba(43, 45, 66, 0.85);
  --shadow-sm: 4px 4px 0 rgba(43, 45, 66, 0.85);
  --font-heading: 'Archivo Black', 'Arial Black', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background-image: radial-gradient(rgba(43,45,66,0.05) 1px, transparent 1px);
  background-size: 18px 18px;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

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

/* ===== Header ===== */
.header {
  background: var(--surface);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text);
  background: var(--primary);
  border: var(--border);
  border-radius: var(--radius);
  padding: 6px 16px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2deg);
  transition: transform 0.2s;
}

.logo:hover { transform: rotate(2deg); }

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 14px;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--surface);
  transition: all 0.18s;
}

.nav a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.search-box {
  display: flex;
  align-items: center;
  border: var(--border);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 180px;
}

.search-box button {
  border: none;
  background: var(--primary);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.18s;
}

.search-box button:hover { background: var(--accent); color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 26px auto;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-slide {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 340px;
  background-size: cover;
  background-position: center;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,45,66,0) 30%, rgba(43,45,66,0.85) 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
  padding: 26px;
  color: #fff;
  max-width: 640px;
}

.hero-info h2 {
  font-size: 30px;
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
}

.hero-info p {
  margin: 0 0 14px;
  color: #f1f1f1;
  font-size: 14px;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 14px;
  padding: 10px 22px;
  background: var(--primary);
  color: var(--text);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.18s;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(43,45,66,0.85);
}

/* ===== Section ===== */
.sec { margin: 40px 0; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.sec-title {
  font-size: 22px;
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  width: 8px;
  height: 26px;
  background: var(--accent);
  border-radius: 4px;
}

.sec-more {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--surface);
  transition: all 0.18s;
}

.sec-more:hover { background: var(--primary); transform: rotate(-2deg); }

/* ===== Grid & Cards ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.card:hover {
  transform: translate(-3px, -3px) rotate(-1deg);
  box-shadow: 8px 8px 0 rgba(43,45,66,0.85);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--muted);
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 3px 10px;
  border: 2px solid var(--text);
  border-radius: 999px;
  transform: rotate(6deg);
  box-shadow: 2px 2px 0 rgba(43,45,66,0.6);
}

.card-info { padding: 12px; }

.card-title {
  font-size: 15px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Cat list ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
}

.cat-item:hover {
  background: var(--primary);
  transform: rotate(-2deg) translateY(-2px);
}

.cat-count {
  font-family: var(--font-heading);
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
}

/* ===== Rank list ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #fff;
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--accent);
  min-width: 34px;
  text-align: center;
}

.rank-title {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--primary);
  background: var(--text);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ===== Detail ===== */
.detail {
  margin: 30px 0;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.detail-head {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.detail-cover {
  width: 220px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2deg);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta { flex: 1; min-width: 240px; }

.detail-meta h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.detail-meta p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--muted);
}

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
  background: var(--accent);
  border: var(--border);
  border-radius: var(--radius);
  padding: 4px 16px;
  margin-bottom: 12px;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-sm);
}

.detail-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  border-top: 2px dashed var(--muted);
  padding-top: 20px;
}

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 999px;
  transition: all 0.18s;
}

.tag:hover { background: var(--primary); transform: rotate(-3deg); }

/* ===== Pager ===== */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 34px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--font-heading);
  font-size: 14px;
  background: var(--surface);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
}

.pg:hover { background: var(--primary); transform: translateY(-2px); }

.pg.current {
  background: var(--accent);
  color: #fff;
  transform: rotate(-3deg);
}

.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  padding: 4px 14px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.18s;
}

.link-item:hover { color: var(--text); background: var(--primary); }

/* ===== Footer ===== */
.footer {
  margin-top: 50px;
  background: var(--text);
  color: var(--surface);
  border-top: var(--border);
  padding: 30px 0;
  font-size: 13px;
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.footer a { color: var(--primary); }
.footer a:hover { color: var(--accent); }

/* ===== Crumbs ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
}

.crumbs a { color: var(--text); font-weight: 600; }
.crumbs a:hover { color: var(--accent); }

/* ===== Highlight ===== */
.hl {
  background: var(--primary);
  color: var(--text);
  padding: 0 3px;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
  }

  .logo { font-size: 18px; padding: 5px 12px; flex-shrink: 0; }

  .nav { flex: 1; }

  .search-box { flex-shrink: 0; }
  .search-box input { width: 110px; }

  .hero-slide { min-height: 240px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info { padding: 18px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .cat-list { grid-template-columns: 1fr; }

  .detail { padding: 18px; }
  .detail-head { flex-direction: column; }
  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }

  .sec-title { font-size: 18px; }
}