/*
Theme Name: SubtitleHub
Theme URI: https://example.com/subtitlehub
Author: SubtitleHub Team
Author URI: https://example.com
Description: A fast, clean subtitle & video community theme inspired by modern subtitle platforms. Features movie/TV title cards, recent subtitle feeds, expandable news cards, dark mode, custom post types for Titles and Subtitles, and a one-click demo importer.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: subtitlehub
Tags: dark-mode, custom-menu, custom-logo, featured-images, translation-ready, blog, news
*/

/* =========================================================
   1. Design tokens
   ========================================================= */
:root {
  --ss-bg: #ffffff;
  --ss-surface: #ffffff;
  --ss-pill: #eef2f4;
  --ss-pill-hover: #e3eaed;
  --ss-text: #1b2733;
  --ss-heading: #10222e;
  --ss-muted: #66798a;
  --ss-accent: #0f766e;
  --ss-accent-strong: #0d9488;
  --ss-accent-contrast: #ffffff;
  --ss-accent-soft: rgba(13, 148, 136, 0.12);
  --ss-danger: #e11d48;
  --ss-border: #e4eaee;
  --ss-border-strong: #d5dee3;
  --ss-shadow: 0 10px 30px rgba(8, 40, 52, 0.10);
  --ss-shadow-soft: 0 3px 12px rgba(8, 40, 52, 0.06);
  --ss-header-bg: rgba(255, 255, 255, 0.94);
  --ss-deco-opacity: 1;
  --ss-radius: 14px;
  --ss-radius-sm: 10px;
  --ss-font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ss-container: 1400px;
}

html.dark {
  --ss-bg: #111416;
  --ss-surface: #1a1e21;
  --ss-pill: #262c30;
  --ss-pill-hover: #2f363b;
  --ss-text: #e9eef1;
  --ss-heading: #ffffff;
  --ss-muted: #94a3ad;
  --ss-accent: #2dd4bf;
  --ss-accent-strong: #0d9488;
  --ss-accent-soft: rgba(45, 212, 191, 0.14);
  --ss-border: #262d31;
  --ss-border-strong: #333c42;
  --ss-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --ss-shadow-soft: 0 3px 12px rgba(0, 0, 0, 0.3);
  --ss-header-bg: rgba(17, 20, 22, 0.94);
  --ss-deco-opacity: 0.55;
}

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--ss-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ss-text);
  background-color: var(--ss-bg);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

a { color: var(--ss-accent); text-decoration: none; }
a:hover { color: var(--ss-text); }

h1, h2, h3, h4, h5, h6 {
  color: var(--ss-heading);
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 800;
}

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.3em; }

input, button, textarea, select { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ss-accent-strong);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.container {
  max-width: var(--ss-container);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* =========================================================
   3. Background decorations (teal geometric shapes)
   ========================================================= */
.ss-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: var(--ss-deco-opacity);
}
.ss-deco-tl {
  top: 0; left: 0;
  width: 560px; height: 500px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.16), rgba(13, 148, 136, 0) 62%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.ss-deco-tr {
  top: 0; right: 0;
  width: 520px; height: 560px;
  background: linear-gradient(225deg, rgba(13, 148, 136, 0.14), rgba(13, 148, 136, 0) 58%);
  clip-path: polygon(100% 0, 100% 78%, 0 0);
}
.ss-deco-bl {
  bottom: 0; left: 0;
  width: 480px; height: 420px;
  background: linear-gradient(45deg, rgba(13, 148, 136, 0.15), rgba(13, 148, 136, 0) 60%);
  clip-path: polygon(0 100%, 0 0, 100% 100%);
}
.ss-deco-br {
  bottom: 0; right: 0;
  width: 560px; height: 480px;
  background: linear-gradient(315deg, rgba(13, 148, 136, 0.17), rgba(13, 148, 136, 0) 60%);
  clip-path: polygon(100% 100%, 100% 22%, 12% 100%);
}

.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

/* =========================================================
   4. Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ss-header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ss-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 66px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-shrink: 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--ss-heading);
}
.site-logo:hover { color: var(--ss-heading); opacity: 0.9; }
.site-logo svg { height: 40px; width: auto; display: block; }
.site-logo img.custom-logo { height: 42px; width: auto; }

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  color: var(--ss-heading);
  font-size: 15.5px;
  font-weight: 700;
  padding: 6px 0;
}
.primary-nav a:hover { color: var(--ss-accent); }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.header-search { flex: 0 1 430px; }

/* Search form */
.search-form { position: relative; }
.search-form input[type="search"] {
  width: 100%;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ss-pill);
  color: var(--ss-text);
  padding: 0 48px 0 20px;
  font-size: 14.5px;
  transition: border-color 0.2s, background 0.2s;
}
.search-form input[type="search"]::placeholder { color: var(--ss-muted); }
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--ss-accent);
  background: var(--ss-surface);
}
.search-form .search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ss-muted);
  cursor: pointer;
}
.search-form .search-submit:hover { color: var(--ss-accent); background: var(--ss-accent-soft); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ss-accent-strong);
  color: #fff !important;
}
.btn-primary:hover { background: var(--ss-accent); color: #fff !important; }
.btn-outline {
  background: transparent;
  color: var(--ss-heading);
  border: 1px solid var(--ss-border-strong);
}
.btn-outline:hover { color: var(--ss-accent); border-color: var(--ss-accent); }

.signin-link {
  color: var(--ss-heading);
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
}
.signin-link:hover { color: var(--ss-accent); }

.account-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ss-heading);
  font-weight: 700;
  font-size: 14px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-user:hover { color: var(--ss-accent); }
.account-user .avatar { border-radius: 50%; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.theme-toggle button {
  width: 32px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ss-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.theme-toggle button:hover { color: var(--ss-accent); }
.theme-toggle button.active {
  background: var(--ss-accent-soft);
  color: var(--ss-accent);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ss-border);
  border-radius: 8px;
  background: transparent;
  color: var(--ss-heading);
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
}
.mobile-only { display: none; }

/* =========================================================
   5. Front page layout
   ========================================================= */
.site-main { display: block; }

.front-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 46px;
  padding: 26px 0 70px;
  align-items: start;
}

.front-sidebar { position: sticky; top: 90px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 2px solid var(--ss-accent);
  padding-bottom: 10px;
  margin: 0 0 22px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.2px;
  margin: 0;
}
.recent-note {
  font-size: 12px;
  color: var(--ss-muted);
  font-weight: 400;
}
.owner-label {
  margin-left: auto;
  font-size: 16px;
  font-weight: 800;
  color: var(--ss-heading);
}
.section + .section { margin-top: 40px; }

/* =========================================================
   6. Title cards (movie / tv)
   ========================================================= */
.title-card {
  display: flex;
  gap: 22px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  box-shadow: var(--ss-shadow-soft);
  padding: 18px;
  margin-bottom: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.title-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ss-shadow);
}

.title-card .poster-link {
  flex: 0 0 170px;
  line-height: 0;
}
.title-card .poster-img {
  width: 170px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--ss-pill);
}

.title-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.title-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 2px 0 14px;
  line-height: 1.35;
}
.title-card h3 a { color: var(--ss-heading); }
.title-card h3 a:hover { color: var(--ss-accent); }

.sub-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ss-pill);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ss-text);
  transition: background 0.15s;
}
.sub-row:hover { background: var(--ss-pill-hover); color: var(--ss-text); }
.sub-row .ss-icon { color: var(--ss-text); flex-shrink: 0; display: inline-flex; }
.sub-row .sub-lang { font-weight: 600; }
.sub-row .sub-by { color: var(--ss-muted); }
.sub-row:hover .sub-by { color: var(--ss-muted); }

.title-meta {
  margin-top: auto;
  padding-top: 16px;
  text-align: right;
  font-size: 14px;
  color: var(--ss-muted);
}
.title-meta strong { color: var(--ss-heading); font-weight: 700; }

/* Poster placeholder when no thumbnail */
.poster-placeholder {
  width: 170px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--ss-accent-soft), var(--ss-pill));
  display: grid;
  place-items: center;
  color: var(--ss-muted);
  font-size: 34px;
}

/* =========================================================
   7. Recent subtitles list
   ========================================================= */
.recent-card {
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  box-shadow: var(--ss-shadow-soft);
  overflow: hidden;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--ss-border);
  font-size: 15px;
}
.recent-item:last-child { border-bottom: 0; }
.recent-item .ss-icon { color: var(--ss-muted); display: inline-flex; flex-shrink: 0; }
.recent-item .sub-lang { font-weight: 700; color: var(--ss-heading); }
.recent-item .recent-title-link { color: var(--ss-text); font-weight: 600; }
.recent-item .recent-title-link:hover { color: var(--ss-accent); }
.recent-owner {
  margin-left: auto;
  color: var(--ss-accent);
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  padding-left: 12px;
}
.recent-owner:hover { color: var(--ss-text); }

/* =========================================================
   8. News & Updates (sidebar)
   ========================================================= */
.news-card {
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: 12px;
  box-shadow: var(--ss-shadow-soft);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.news-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.news-head h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}
.news-head h3 a { color: var(--ss-heading); }
.news-head h3 a:hover { color: var(--ss-accent); }
.news-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ss-muted);
}
.news-meta a { color: var(--ss-accent); font-weight: 700; }
.news-meta a:hover { color: var(--ss-text); }
.news-meta .dot { margin: 0 7px; color: var(--ss-accent); }
.news-toggle {
  margin-left: auto;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ss-border);
  background: transparent;
  color: var(--ss-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s, color 0.2s, border-color 0.2s;
}
.news-toggle:hover { color: var(--ss-accent); border-color: var(--ss-accent); }
.news-card.open .news-toggle { transform: rotate(180deg); }
.news-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ss-text);
}
.news-card.open .news-body { max-height: 480px; padding-top: 12px; }

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer {
  padding: 56px 0 44px;
  text-align: center;
}
.footer-logo {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--ss-heading);
}
.footer-logo svg { height: 66px; width: auto; }
.footer-logo img.custom-logo { height: 70px; width: auto; }
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  font-size: 15px;
}
.footer-nav a { color: var(--ss-muted); font-weight: 600; }
.footer-nav a:hover { color: var(--ss-accent); }
.footer-nav .menu-support a { color: var(--ss-danger); }
.footer-nav .menu-ranks a { color: var(--ss-accent); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 28px 0;
}
.footer-social a {
  color: #8fa0aa;
  display: inline-flex;
  transition: color 0.2s, transform 0.2s;
}
.footer-social a:hover { color: var(--ss-accent); transform: translateY(-2px); }

.copyright {
  font-size: 14.5px;
  color: var(--ss-muted);
}

/* =========================================================
   10. Inner pages / singles / archives
   ========================================================= */
.page-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.entry-header { margin-bottom: 26px; }
.entry-header h1 { font-size: 30px; font-weight: 900; margin-bottom: 8px; }
.entry-meta {
  font-size: 13.5px;
  color: var(--ss-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}
.entry-meta a { color: var(--ss-accent); font-weight: 700; }

.entry-content { font-size: 16.5px; line-height: 1.75; }
.entry-content h2 { margin-top: 1.6em; font-size: 24px; }
.entry-content h3 { margin-top: 1.4em; font-size: 19px; }
.entry-content a { text-decoration: underline; }
.entry-content img { border-radius: 10px; }
.entry-content blockquote {
  margin: 1.4em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--ss-accent);
  background: var(--ss-pill);
  border-radius: 0 10px 10px 0;
  color: var(--ss-muted);
}

.badge {
  display: inline-block;
  background: var(--ss-accent-soft);
  color: var(--ss-accent);
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-muted { background: var(--ss-pill); color: var(--ss-muted); }

/* Single title hero */
.title-hero {
  display: flex;
  gap: 28px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  box-shadow: var(--ss-shadow-soft);
  padding: 22px;
  margin: 30px 0 26px;
}
.title-hero .poster-link { flex: 0 0 200px; line-height: 0; }
.title-hero .poster-img {
  width: 200px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.title-hero h1 { font-size: 26px; font-weight: 900; margin: 4px 0 10px; }
.title-hero .badges { display: flex; gap: 8px; margin-bottom: 12px; }
.title-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 14.5px;
  color: var(--ss-muted);
  margin-bottom: 14px;
}
.title-stats strong { color: var(--ss-heading); }
.title-desc { color: var(--ss-text); font-size: 15.5px; }

.subtitle-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--ss-heading);
  margin: 30px 0 16px;
}

.download-bar { margin: 18px 0 8px; display: flex; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   11. Search results / archives
   ========================================================= */
.archive-head {
  border-bottom: 2px solid var(--ss-accent);
  padding-bottom: 12px;
  margin: 34px 0 24px;
}
.archive-head h1 { font-size: 26px; font-weight: 900; margin: 0 0 4px; }
.archive-head p { color: var(--ss-muted); font-size: 14.5px; margin: 0; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
}

/* =========================================================
   12. Pagination
   ========================================================= */
.pagination, .navigation.pagination {
  margin: 38px 0 10px;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.page-numbers {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  color: var(--ss-text);
  font-weight: 700;
  font-size: 14px;
}
.page-numbers:hover { border-color: var(--ss-accent); color: var(--ss-accent); }
.page-numbers.current {
  background: var(--ss-accent-strong);
  border-color: transparent;
  color: #fff;
}
.page-numbers.dots { border: 0; background: transparent; }

/* =========================================================
   13. Empty states / 404
   ========================================================= */
.empty-state {
  background: var(--ss-surface);
  border: 1px dashed var(--ss-border-strong);
  border-radius: var(--ss-radius);
  padding: 40px 28px;
  text-align: center;
  color: var(--ss-muted);
  margin-bottom: 26px;
}
.empty-state .ss-icon { color: var(--ss-accent); margin-bottom: 10px; display: inline-flex; }
.empty-state h3 { color: var(--ss-heading); margin-bottom: 6px; }
.empty-state p { margin: 0 auto; max-width: 520px; }
.empty-state .btn { margin-top: 18px; }

.error-404 {
  text-align: center;
  padding: 90px 24px 110px;
}
.error-404 .code {
  font-size: 110px;
  font-weight: 900;
  color: var(--ss-accent);
  line-height: 1;
  letter-spacing: -4px;
}
.error-404 h1 { font-size: 26px; }
.error-404 .search-form { max-width: 430px; margin: 26px auto 0; }

/* =========================================================
   14. Comments
   ========================================================= */
.comments-area {
  margin-top: 44px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  padding: 26px;
}
.comments-area .comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.comments-area .comment-list .comment {
  border-bottom: 1px solid var(--ss-border);
  padding: 16px 0;
}
.comments-area .comment-list .children {
  list-style: none;
  padding-left: 26px;
}
.comment-author img { border-radius: 50%; margin-right: 8px; }
.comment-metadata { font-size: 12.5px; color: var(--ss-muted); }
.comment-content { font-size: 15px; margin-top: 6px; }
.reply a {
  font-size: 13px;
  font-weight: 700;
  color: var(--ss-accent);
}
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--ss-border-strong);
  border-radius: 8px;
  background: var(--ss-bg);
  color: var(--ss-text);
  padding: 10px 14px;
}
.comment-form .submit { background: var(--ss-accent-strong); color: #fff; border: 0; border-radius: 8px; padding: 11px 22px; font-weight: 700; cursor: pointer; }

/* =========================================================
   15. Widgets
   ========================================================= */
.widget-area .widget {
  background: var(--ss-surface);
  border: 1px solid var(--ss-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}
.widget-area .widget-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}
.widget-area ul { list-style: none; margin: 0; padding: 0; }
.widget-area li { padding: 7px 0; border-bottom: 1px solid var(--ss-border); font-size: 14.5px; }
.widget-area li:last-child { border-bottom: 0; }

/* =========================================================
   16. Responsive
   ========================================================= */
@media (max-width: 1120px) {
  .front-layout { grid-template-columns: minmax(0, 1fr); }
  .front-sidebar { position: static; order: 2; }
  .archive-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .header-left { gap: 14px; }
  .primary-nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--ss-surface);
    border-bottom: 1px solid var(--ss-border);
    box-shadow: var(--ss-shadow);
    padding: 16px 24px 20px;
    display: none;
  }
  body.nav-open .primary-nav { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .primary-nav li { border-bottom: 1px solid var(--ss-border); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: 12px 2px; font-size: 16px; }
  .mobile-only { display: block; margin-top: 14px; }
  .header-search { display: none; }
  .signin-link span { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 10px; min-height: 60px; }
  .section-head { flex-wrap: wrap; row-gap: 2px; }
  .site-logo svg, .site-logo img.custom-logo { height: 32px; }
  .btn-primary { padding: 9px 14px; }
  .theme-toggle { display: none; }
  .front-layout { padding: 18px 0 50px; gap: 34px; }
  .section-head h2 { font-size: 19px; }
  .title-card { flex-direction: row; gap: 16px; padding: 14px; }
  .title-card .poster-link { flex: 0 0 110px; }
  .title-card .poster-img, .poster-placeholder { width: 110px; }
  .poster-placeholder { font-size: 26px; }
  .title-card h3 { font-size: 16.5px; }
  .sub-row { font-size: 13px; padding: 9px 12px; }
  .title-meta { font-size: 13px; }
  .recent-item { font-size: 14px; padding: 12px 14px; flex-wrap: wrap; }
  .title-hero { flex-direction: column; }
  .title-hero .poster-link { flex: 0 0 auto; width: 150px; }
  .title-hero h1 { font-size: 21px; }
  .error-404 .code { font-size: 76px; }
  .footer-nav ul { gap: 8px 20px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}
