:root {
  --color-bg: #F5F5F5;
  --color-text: #0D0D0D;
  --main-color: #E41A1A;  /* main purple */
  --second-color: #F63A3A; /* lighter purple */
  --second-dark: #E5E5E5; /* light darker */
  --second-light: #1A1A1A; /* light grey */
  --third-light: #333; /* grey */
  --third-dark: #AAA; /* light black */
}

body {
  margin: 0;
  font-family: "Source Code Pro", monospace;
  background: var(--color-bg);
  color: var(--color-text);
}

a { color: var(--main-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--second-color); }

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 12px; /* optional, keeps breathing space */
  }
}

.site-header, .site-footer {
  background: var(--second-dark);
  padding: 1rem;
  font-family: "Source Code Pro", monospace;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: url('../img/hero.webp') center/cover no-repeat;
  color: white;
}

/* ======= HOMEPAGE FEATURED GRID ======= */
.hero-grid{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  margin: 32px 0 48px;
}

/* Show desktop grid by default; hide mobile swiper */
.hero-desktop { display: grid; }
.hero-mobile  { display: none; }
.hero-mobile .swiper .hero-swiper { display: none; }

.hero-card{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero-card::before{ /* dark gradient overlay for text readability */
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.55) 100%);
  z-index:0;
}

.hero-link{
  position:absolute; inset:0;
  display:flex; flex-direction:column; justify-content:flex-end;
  padding:18px; gap:10px; z-index:1; color:var(--color-bg); text-decoration:none;
}

.hero-title{
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.25;
  margin:0;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  font-weight: 800;
   display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Layout mapping: big left, two stacked right */
.hero-card-1{ grid-column:1 / 2; grid-row:1 / 3; min-height: 480px; }
.hero-card-2{ grid-column:2 / 3; grid-row:1 / 2; min-height: 230px; }
.hero-card-3{ grid-column:2 / 3; grid-row:2 / 3; min-height: 230px; }

/* Rounded corners nicety */
.hero-card img{ display:block; width:100%; height:100%; object-fit:cover; }

/* Mobile: hide grid, show slider (1 slide per view) */
@media (max-width: 768px){
  .hero-desktop { display: none; }
  .hero-mobile  {
    display: block;
    margin-top: 30px;
  }

  .hero-swiper .hero-card{
    min-height: 160px;
    border-radius: 12px;
  }
}

.badge {
  align-self: flex-start;
  display: inline-block;
  padding: 6px 10px;
  background: var(--main-color);
  color: var(--color-bg);
  font-size: 12px;
  border-radius: 999px;
  margin-right: 5px;
  font-family: "Source Code Pro", monospace;
  font-weight: 700;
  letter-spacing: 3px;
}

/* Floating header stays the same */
.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 768px;
  background: var(--color-bg);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  z-index: 9999;
  box-shadow: none;          /* no shadow initially */
  transition: box-shadow 0.3s ease, top 0.3s ease;
}
.site-header.scrolled {
  top: 20px;                 /* add spacing from top */
  border-radius: 999px;       /* rounded all around */
  border: 1px solid var(--main-color);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Logo */
.logo-wrap img {
  display: block;
  max-height: 20px;
  height: auto;
  width: auto
}

/* Nav menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  font-size: 14px;       /* smaller text */
}
.nav-menu li a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.nav-menu li a:hover {
  color: var(--main-color);
}

/* Add icon (like ▼) after parent menu items */
.site-header nav ul li.menu-item-has-children > a::after {
  content: " ⮯"; /* you can use Font Awesome or unicode */
  font-size: 0.7em;
  margin-left: 0;
  color: var(--second-color); /* accent */
  transition: transform 0.3s ease;
}

/* Rotate icon on hover to show action */
.site-header nav ul li.menu-item-has-children:hover > a::after {
  color: var(--color-bg);
}

.site-header nav ul li {
  position: relative; /* anchor for dropdown */
}

.site-header nav ul li a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  padding: 0.5rem 0;
  display: inline-block;
  transition: color 0.2s ease;
}

.site-header nav ul li a:hover {
  color: var(--second-color); /* your purple accent */
}

/* === Dropdown submenu === */
.site-header nav ul li ul.sub-menu {
  display: none;              /* hide by default */
  position: absolute;
  top: 100%;                  /* push under parent */
  left: 0;
  background: var(--second-color);           /* dropdown bg */
  border-radius: 0 10px 10px 10px;
  min-width: 140px;
  z-index: 99;
  padding: 10px 0;
}

.site-header nav ul li ul.sub-menu li {
  display: block;
  width: 100%;
  font-size: 14px;
}

.site-header nav ul li ul.sub-menu li a {
  padding: 0.5rem 1rem;
  display: block;
  color: var(--color-text);
}

.site-header nav ul li ul.sub-menu li a:hover {
  color: var(--second-dark);
}

/* === Show submenu on hover === */
.site-header nav ul li:hover > ul.sub-menu {
  display: block;
}

/* === Pure CSS Search Icon === */
.search-toggle {
  display: flex;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Hover effect */
.search-toggle:hover {
  color: var(--main-color);
}

/* === Mobile adjustments === */
@media (max-width: 768px) {
  .site-header {
    width: 94%;
    padding: 0.6rem 0.8rem;
  }

  .nav-menu {
    display: none;
  }

  .logo-wrap img {
    max-height: 20px;
  }
}

/* Backdrop */
.search-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9998;
}

/* Modal base */
.search-modal {
  display: none;
  position: fixed;
  top: 9.5%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--second-dark);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  width: 60%;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}

.search-modal.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.search-modal-inner {
  position: relative;
}

/* Search info section */
.search-info {
  display: flex;
  background: var(--color-bg);
  margin-top: 35px;
  font-size: 12px;
  font-style: italic;
  color: #555;
  text-align: center;
  line-height: 1.6;
  border-radius: 0 0 12px 12px;
  padding: 0 20px;
}

.search-info kbd {
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.8rem;
}

/* === Mobile adjustments === */
@media (max-width: 768px) {
  .search-modal {
    width: 94%;
    top: 15%;
  }

  .search-info {
    font-size: 12px;
  }
}

/* Search (pill style) */
.aw-search {
  position: relative;
  width: calc(100% - 40px);               /* adjust width to taste */
  margin: 20px;
}
.aw-search-input {
  width: 100%;
  padding: 12px 44px 12px 16px;   /* room for icon */
  border: 1px solid var(--second-light);
  border-radius: 999px;           /* full pill */
  outline: none;
  background: var(--second-dark);
  color: var(--color-text);
  font-family: 'Space Mono', monospace;
}
.aw-search-input::placeholder { color:var(--third-light); }
.aw-search-input:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px rgba(123,44,191,0.15);
}

.aw-search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: transparent; cursor: pointer; color:var(--third-dark);
  display: grid; place-items:center;
}
.aw-search-btn:hover { color:var(--main-color); }

/* Dark-mode compatibility (if you switch back) */
body.dark .aw-search-input { background:var(--second-dark); border-color:var(--third-dark); color:var(--color-text); }
body.dark .aw-search-input::placeholder { color:var(--third-light); }
body.dark .aw-search-btn { color:var(--second-light); }
body.dark .aw-search-btn:hover { color:var(--second-color); }

/* Responsive */
@media (max-width: 768px) {
  .aw-search { max-width: 100%; }
}

/* Grid layout */
.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin: 40px 0;
}

.wrap-single {
  display: block;
  margin: 50px 0;
}

.home-left,
.home-right {
  min-width: 0;  /* allow flex/grid shrink */
  max-width: 100%; /* don’t bust out of container */
  overflow-x: hidden; /* prevent horizontal bleed from inside */
  box-sizing: border-box;
}

/* Section blocks */
.section-block {
  margin-bottom: 40px;
}
.section-title {
  position: relative;
  display: flex;   /* shrink to fit text */
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 20px;
}

.section-title::after {
  content: "";
  flex: 1;                     /* line takes remaining space */
  height: 1px;
  background: var(--main-color);
  margin-left: 12px;
}

.section-title .title-text {
  display: inline-block;
  padding: 10px 16px 10px 20px;
  border: var(--main-color) solid 1px;   /* ribbon border */
  color: var(--color-text);
  border-radius: 10px 10px 10px 0;      /* rounded right edge */
  position: relative;
  line-height: 1;  /* keep height predictable */
}

/* News list */
.news-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}
.news-item .thumb img {
  width: 220px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
.news-info h3 {
  font-size: 24px;
  margin: 0 0 6px;
}
.news-info h3 a {
  color: var(--color-text);
}
.news-info h3 a:hover {
  color: var(--main-color);
}
.news-info p {
  font-size: 12px;
  margin: 0 0 6px;
}
/* Responsive News Section */
@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .news-item .thumb,
  .news-item .thumb img {
    width: 100%;
    max-height: 100px;
    display: block;
    border-radius: 8px;
    max-width: 100%; /* stop overflow */
  }

  .news-info {
    width: 100%;
    box-sizing: border-box;  /* obey padding inside width */
  }

  .news-info h3,
  .news-info p {
    word-wrap: break-word;  /* prevent overflow */
    overflow-wrap: break-word;
  }

  /* Catch-all to kill sneaky overflow */
  body {
    overflow-x: hidden;
  }
}

/* Ulasan section */
.review-container .swiper {
  width: 100%;
  max-width: 100%;
}
.review-container .swiper-wrapper {
  display: flex;
}
.review-container .review-swiper {
  width: 100% !important;
  max-width: 100% !important;
}
.review-container .review-swiper .swiper-slide {
  flex: 0 0 auto;
}

@media (max-width: 1024px) {
  .review-swiper .swiper-slide {
    width: calc((100% - 20px) / 2); /* 2 slides with 20px gap */
  }
}

@media (max-width: 768px) {
  .review-swiper .swiper-slide {
    width: 100%; /* single slide full width */
  }
}

.review-card {
  border-radius: 8px;
  overflow: hidden;
  flex-direction: column;
}
.review-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}
.review-card h3 {
  font-size: 14px;
  color: var(--color-text);
  margin: 5px 0;
}
.review-card h3:hover {
  color: var(--main-color);
}
.review-card .meta {
  font-size: 12px;
  color: var(--third-light);
  display: flex;
  justify-content: space-between;
}

/* Top Picks Section */
.top-picks-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.top-pick-item {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.top-pick-item .thumb img {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.top-pick-info {
  padding-top: 10px;
}
.top-pick-info h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: bold;
  color: var(--color-text);
}
.top-pick-info h3 a {
  color: inherit;
  text-decoration: none;
}
.top-pick-info h3 a:hover {
  color: var(--main-color);
}
.top-pick-info .meta {
  font-size: 12px;
  color: var(--third-light);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Characters */
.char-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.char-item {
  display: flex;
  align-items: flex-start; /* not center */
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding-bottom: 10px;
}
.char-info {
  flex: 1;
}
.char-info h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--color-text);
}
.char-info h3:hover {
  color: var(--main-color);
}
.char-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--second-dark); /* placeholder background */
}
.char-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Random list */
.random-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.random-item {
  padding-bottom: 8px;
}
.random-item .title:hover {
  color: var(--main-color);
}
.random-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.random-item .meta {
  margin-left: 20px; /* indent meta under the title */
  font-size: 12px;
  color: var(--third-light);
  display: flex;
  gap: 15px;
}

/* Responsive */
@media (max-width:992px){
  .home-grid{ grid-template-columns: 1fr; }
}

.meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  align-items: center;
  color: var(--third-light);
  margin-top: 8px;
  margin-bottom: 8px;
}

.meta .post-author strong a {
  color: var(--color-text);
  font-weight: 700;
}

#breadcrumbs {
  font-size: 13px;
  margin: 10px 0 20px;
  color: var(--third-light);
  font-family: "Source Code Pro", monospace;
}

#breadcrumbs a {
  color: var(--main-color);
  text-decoration: none;
}

#breadcrumbs a:hover {
  text-decoration: underline;
}

#breadcrumbs .breadcrumb_last {
  color: var(--second-light);
  font-weight: 400;
  font-size: 10px;
}

.single-post .post-content p,
.single-post .post-content li {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6; /* Adjust spacing between lines */
}

/* Better styled blockquote */
.single-post blockquote {
  border-left: 4px solid var(--main-color);  /* accent color */
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  color: var(--color-text);
  font-style: italic;
  font-size: 1.05rem;
}

.single-post blockquote p {
  margin: 0;
}

.single-post .featured-img img {
  display: block;
  width: 100%;          /* take full viewport width */
  max-width: 100vw;      /* prevent shrinking */
  height: 300px;         /* or any fixed height you like */
  object-fit: cover;     /* crop to fill without distortion */
  margin: 0;             /* kill margins */
  border-radius: 0;      /* remove rounding if needed */
}

.single-post .featured-img {
  margin: 20px 0 60px 0;
  padding: 0;
}

/* General single post breathing room */
.single-post .post-content > * {
  margin-bottom: 1.5em;   /* space after each element */
  line-height: 1.6;       /* already good for readability */
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4,
.single-post .post-content h5,
.single-post .post-content h6 {
  margin-top: 2em;        /* extra space before headings */
  margin-bottom: 1em;
}

/* Default: behave normal, respect container */
.single-post .post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto; /* center in container */
  border-radius: 8px;
}

.post-tags {
  margin-top: 20px;
}

.tags-label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags-list a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--main-color);
  border-radius: 20px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .tags-list {
    justify-content: center; /* center tags */
  }
}


/* Tag container */
.post-nav {
  margin-top: 36px;
}

/* Mobile override: full-bleed images */
@media (max-width: 768px) {
  .single-post .post-content img {
    width: 100%;       /* full viewport width */
    max-width: 100%;
    border-radius: 0;   /* optional: remove rounding for natural edge-to-edge */
  }
}

.single-post .post-content ul,
.single-post .post-content ol {
  padding-left: 1.5em;    /* indentation for lists */
}

.single-post .post-content blockquote {
  margin: 2em 0;
  padding: 1em 1.5em;
}

/* Mobile adjustment */
@media (max-width: 768px) {
  .single-post .post-content {
    font-size: 15px;  /* slightly smaller */
    line-height: 1.6;
  }

  .single-post .post-content h2 {
    font-size: 20px;
  }

  .single-post .post-content h3 {
    font-size: 18px;
  }

  .single-post .post-content blockquote {
    font-size: 14px;
  }
}

.single-post .related-posts {
  margin-top: 40px;
}

/* Related posts grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.related-card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.related-card:hover {
  transform: translateY(-5px);
}

.related-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.related-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 10px 0 10px 0;
  color: var(--color-text);
}

.related-card h3:hover {
  color: var(--main-color);
}

/* Tablet: 2 columns */
@media (max-width: 992px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

.read-more {
  color: var(--main-color);
  text-decoration: none;
}
.read-more:hover {
  text-decoration: underline;
}

.sidebar .widget {
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.sidebar .widget ul {
  list-style: none;
  padding: 0;
}

.sidebar .widget ul li {
  padding-bottom: 12px;
}

.sidebar .widget ul li:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.sidebar .widget-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--color-text);
  border-bottom: 2px solid var(--main-color);
  padding-bottom: 5px;
}

/* Mobile stack */
@media (max-width: 768px) {
  .archive-page.home-grid {
    grid-template-columns: 1fr;
  }
  .home-right.sidebar {
    margin-top: 30px;
  }
}

/* Search results grid */
.search-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.search-card {
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-card .thumb img {
  width: 100%;
  height: 160px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

.search-card .info {
  padding: 12px;
}

.search-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.search-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.search-card h3 a:hover {
  color: var(--main-color);
}

.search-card .meta {
  font-size: 13px;
  color: var(--third-light);
}

/* Mobile fallback: single column */
@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: 1fr;
  }
}

/* 404 Page */
.site-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh; /* take most of screen */
  text-align: center;
  flex-direction: column;
}

.site-404 .error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--second-color); /* purple accent */
  margin: 0;
}

/* Ranking Page */
.page-banner {
  position: relative;
  width: 100%;
  height: 150px; /* lock the banner height */
  overflow: hidden;
}

.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* keeps ratio, crops instead of stretch */
  object-position: center;  /* crop from the center */
  display: block;
}

.page-banner .page-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: 2.5rem;
  color: var(--color-text);
  font-family: "Source Code Pro", monospace;
  text-shadow: 0 2px 5px rgba(0,0,0,0.7);
  text-transform: uppercase;
}

.ranking-table {
  display: grid;
  gap: 12px;
}

.ranking-header,
.ranking-row {
  display: grid;
  grid-template-columns: 50px 1.5fr 120px 180px 180px 100px;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
}

.ranking-header {
  font-weight: 600;
}

.ranking-header .type,
.ranking-header .detail,
.ranking-header .genre,
.ranking-header .score {
  text-align: center;
}

.ranking-row {
  background: var(--second-dark);
  transition: background 0.2s ease;
  border-radius: 8px;
}

.ranking-row:hover {
  background: var(--third-dark);
}

.ranking-row .type,
.ranking-row .detail,
.ranking-row .genre,
.ranking-row .score {
  text-align: center;
}

.ranking-row .type,
.ranking-row .detail,
.ranking-row .genre {
  font-size: 14px;
}

.ranking-row .rank {
  font-weight: bold;
  color: var(--second-color);
}

.ranking-row .title a {
  color: var(--color-text);
  text-decoration: none;
}

.ranking-row .title a:hover {
  color: var(--second-color);
}

.ranking-row .score span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;       /* fixed size */
  height: 40px;      /* fixed size */
  border-radius: 50%;
  background: var(--second-color);
  color: var(--color-text);
  font-weight: bold;
  font-size: 14px;
}

.genre-tag {
  display: inline-block;
  border: var(--color-text) 1px solid;
  color: var(--color-text);
  padding: 2px 4px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
  font-size: 12px;
}

/* Mobile fallback: single column */
@media (max-width: 768px) {
  .page-banner {
    position: relative;
    width: 100%;
    height: 100px; /* lock the banner height */
    overflow: hidden;
  }
  .page-banner .page-title {
    font-size: 1.5rem;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    margin-left: 60px;
  }
  .ranking-header {
    display: none; /* hide the header row on mobile */
  }
  .ranking-table {
    margin-top: 24px;
  }
  .ranking-row {
    grid-template-columns: 1fr; /* single column */
    text-align: left;
    padding: 12px;
    margin-top: 12px;
  }
  .ranking-row > div {
    margin-bottom: 6px;
  }

  .ranking-row .rank {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .ranking-row .title {
    font-size: 1.2rem;
    margin-bottom: 6px;
    font-weight: 700;
  }

  .ranking-row .type,
  .ranking-row .detail,
  .ranking-row .genre,
  .ranking-row .score {
    text-align: left;
    font-size: 0.9rem;
  }

  .ranking-row .score span {
  all: unset;            /* wipes all styles */
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--second-color);
}

  .genre-tag {
    font-size: 11px;
    padding: 1px 6px;
  }
}

/* Plain Page Layouts */
.plain-page {
  display: block;
  width: 92%;
  max-width: 1200px;
  margin: 50px;
  padding: 0 16px;
  font-size: 16px;
  line-height: 1.7;
}

.plain-page .page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: var(--color-text);
}

.plain-page .page-content p {
  margin-bottom: 1.2em;
}

.plain-page .page-content h2,
.plain-page .page-content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  font-weight: 600;
  color: var(--second-color);
}

.plain-page .page-content a {
  color: var(--second-color);
  text-decoration: underline;
}

.site-footer {
  background: var(--color-bg);
  color: var(--second-light);
  font-family: "Source Code Pro", monospace;
  margin-top: 40px;
  border-top: 1px solid var(--main-color);
}

/* footer strip */
.footer-main {
  padding: 15px 0;
  width: 100%;
}

/* Inner flex container */
.footer-main .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
}
/* Footer text + links */
.footer-main .copyright {
  color: var(--second-light);
  margin: 0;
}
.footer-main .copyright em {
  color: var(--third-light);
  font-size: 12px;
}
.footer-logo {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.footer-logo .logo-wrap img {
  max-height: 40px;
  height: auto;
  width: auto
}

/* Responsive */
@media (max-width: 768px) {
  .footer-main .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-logo { display: none; }
}

.container, .site-header, .site-footer, .section-block {
  max-width: 100%;
  box-sizing: border-box;
}
