/* spreee.cc — design system. Palette and type drawn from the brand mark: a
   bold red slab-serif wordmark over a dark charcoal tagline. Distinct on
   purpose from the sibling redesigns (hornywombat.pro's amber/sans,
   itsmyfetish.com's pink-red/sans) — a serif display face gives this one an
   editorial/tabloid character the other two don't have. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/OpenSans-Regular.woff") format("woff");
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/OpenSans-SemiBold.woff") format("woff");
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/OpenSans-ExtraBold.woff") format("woff");
}

:root {
  --ink: #140d0b;
  --surface: #1e1512;
  --surface-2: #291c18;
  --surface-3: #362520;
  --paper: #f2ece5;
  --muted: #b6a89d;
  --faint: #7a6c62;
  --red: #de2b2b;
  --red-strong: #ff5c46;
  --rose: #ff8a70;
  --gold: #ffb648;
  --moss: #7ed08a;
  --line: rgba(242, 236, 229, 0.09);
  --shadow: rgba(0, 0, 0, 0.5);

  /* No self-hosted serif in this repo yet, and adding a new font file is out
     of scope here — a system serif stack still reads as a deliberate,
     distinct choice next to the sans-only sibling sites. */
  --font-display: Georgia, "Noto Serif", "Times New Roman", serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --gap: 1.25rem;
  --container: 1360px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--red-strong);
  text-decoration: none;
}

a:hover {
  color: var(--rose);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--paper);
}

hr {
  border: none;
  border-top: 1px solid var(--line);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  margin: 2.5rem 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h1,
.section-head h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-head h1 a,
.section-head h2 a {
  color: inherit;
}

.home-title {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
}

.home-title a {
  color: var(--paper);
}

.home-title a:hover {
  color: var(--red-strong);
}

.sub-title {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.sub-title.active-title {
  color: var(--red-strong);
}

.recommend-div {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.info-title .big {
  font-size: 1.3rem;
}

.text {
  color: var(--muted);
  max-width: 72ch;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(23, 7, 9, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 32px;
  width: auto;
  transition: transform 180ms ease;
}

.brand:hover img {
  transform: rotate(-2deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.main-nav > a,
.nav-dropdown > summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-s);
  color: var(--paper);
  font-size: 0.95rem;
  white-space: nowrap;
}

.main-nav > a:hover,
.nav-dropdown > summary:hover {
  background: var(--surface-2);
  color: var(--red-strong);
  cursor: pointer;
}

.main-nav .fa-fire {
  color: var(--red);
}

/* Native <details> dropdown: zero JS for menus, works on touch and desktop alike. */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "";
  border: 4px solid transparent;
  border-top-color: var(--muted);
  margin-top: 4px;
  margin-left: 2px;
}

.nav-dropdown[open] > summary::after {
  border-top-color: transparent;
  border-bottom-color: var(--muted);
  margin-top: -2px;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 12px 32px var(--shadow);
  padding: 0.4rem;
  z-index: 50;
}

.nav-dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-s);
  color: var(--paper);
  font-size: 0.92rem;
}

.nav-dropdown-panel a:hover {
  background: var(--surface-2);
  color: var(--red-strong);
}

.nav-dropdown-panel hr {
  margin: 0.4rem 0;
}

.search-form {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-form .field {
  position: relative;
  margin: 0;
}

.search-form input[type="text"] {
  width: 220px;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
}

.search-form .field .fa-search,
.search-form .field .glyphicon-search {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 0.85rem;
}

.header-burger {
  display: none;
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    flex-direction: column;
    align-items: stretch;
    background: var(--ink);
    padding: 1rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .main-nav > a,
  .nav-dropdown > summary {
    padding: 0.85rem 0.75rem;
    font-size: 1.05rem;
  }

  .nav-dropdown-panel {
    position: static;
    box-shadow: none;
    margin: 0.25rem 0 0.5rem 0.5rem;
  }

  .search-form {
    order: -1;
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
  }

  .search-form .field,
  .search-form input[type="text"] {
    width: 100%;
  }

  .header-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-s);
    background: transparent;
    border: 1px solid var(--line);
    color: var(--paper);
    font-size: 1.1rem;
    flex-shrink: 0;
  }
}

/* ---------- Buttons & form controls ---------- */

.btn,
.btn-default,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-s);
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--paper);
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn:hover,
.btn-default:hover,
.btn-primary:hover {
  background: var(--surface-3);
  color: var(--paper);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary,
.btn-primary {
  background: var(--red);
  color: var(--ink);
}

.btn--primary:hover,
.btn-primary:hover {
  background: var(--red-strong);
  color: var(--ink);
}

.btn--danger {
  background: var(--rose);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.btn-icon,
.btn.myaction,
.btn-default.myaction {
  padding: 0.5rem;
  width: 2.4rem;
  height: 2.4rem;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
  width: auto;
  height: auto;
}

label,
.label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select,
.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--paper);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--red);
  outline: none;
}

.field,
.form-group {
  margin-bottom: 1rem;
}

.form-narrow {
  max-width: 420px;
  margin: 0 auto;
}

/* ---------- Tags / breadcrumbs / pagination ---------- */

.tag,
ul.tags li.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.82rem;
}

.tag a,
ul.tags li.tag a {
  color: inherit;
}

.tag:hover,
ul.tags li.tag:hover {
  background: var(--surface-3);
}

ul.tags {
  list-style: none;
  margin: 0.4rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--faint);
  font-size: 0.9rem;
  margin: 1.25rem 0;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--faint);
}

.breadcrumbs,
.breadcrumbs ul {
  padding: 0;
  margin-left: 0;
}

.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-s);
  color: var(--muted);
}

.pagination a:hover {
  background: var(--surface-2);
  color: var(--paper);
}

.pagination .is-current {
  background: var(--red);
  color: var(--ink);
  font-weight: 700;
}

.pagination ul {
  display: contents;
  list-style: none;
}

/* ---------- Video grid & card ---------- */
/* Targets the existing markup/ids in video/item.html (id="video-{pk}", id="wl-{pk}",
   id="fv-{pk}", id="scr-{pk}", id="spin-{pk}", id="v-thumb-{pk}") — those hooks are
   read by inline onclick handlers and the hover-preview script in build.js/utils.js,
   so they're kept as-is and only get new classes layered on top of them. */

.video-grid,
.top-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--gap);
}

/* video/rvideo-item.html emits a bare <a name="..."> anchor before its item
   markup (old-style same-page jump target) — display:contents keeps it out
   of grid placement so it doesn't eat an empty cell. */
.video-grid > a[name],
.top-videos > a[name] {
  display: contents;
}

.video_item_wrapper {
  color: inherit;
  display: block;
}

.image_wrapper {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 16 / 9;
}

.image_wrapper img,
.image_wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image_wrapper img.screenshot {
  position: absolute;
  inset: 0;
}

.image_wrapper video.video-thumb {
  position: absolute;
  inset: 0;
}

.image_wrapper img.spinner {
  width: 32px !important;
  height: 32px;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.video-card__time {
  position: absolute;
  z-index: 3;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
}

.watch-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.5);
}

.watch-progress span {
  display: block;
  height: 100%;
  background: var(--red);
}

.item-action-btn {
  position: absolute;
  z-index: 3;
  top: 0.5rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(23, 7, 9, 0.75);
  color: var(--paper);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.video_item_wrapper:hover .item-action-btn {
  opacity: 1;
}

.item-action-btn:hover {
  background: var(--red);
  color: var(--ink);
}

.item-action-btn .wl,
.item-action-btn .fv {
  display: none;
}

.watch-later-div {
  right: 0.5rem;
}

.fav-video-div {
  right: 0.5rem;
  top: 2.6rem;
}

.video_description {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--paper);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video_item_wrapper:hover .video_description {
  color: var(--red-strong);
}

.video_item__staff-tools {
  display: inline-flex;
  gap: 0.4rem;
  float: right;
}

.video-signs {
  display: inline-flex;
  gap: 0.25rem;
  vertical-align: middle;
}

.v-sign img {
  display: inline-block;
  vertical-align: middle;
}

.video_info {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
}

.video_info__row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.video_info__date {
  margin-top: 0.15rem;
}

.admin-panel {
  font-weight: 700;
}

.video_info .glyphicon-thumbs-up {
  color: var(--gold);
}

img.spinner {
  width: 32px;
  margin: 2.5rem auto;
}

.tag-cloud {
  text-align: center;
  line-height: 2.2;
}

.tag-cloud a {
  display: inline-block;
  margin: 0 0.5rem;
  color: var(--muted);
}

.tag-cloud a:hover {
  color: var(--red-strong);
}

.current-video {
  outline: 2px solid var(--red);
  border-radius: var(--radius-m);
}

.empty-state,
.info-title {
  text-align: center;
  padding: 3rem 1rem 0.5rem;
  color: var(--muted);
  font-size: 1.3rem;
}

.message-box {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
}

.message-box .btn {
  margin: 0 0.25rem;
}

/* ---------- Category grid ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gap);
}

.category-card {
  display: block;
  text-align: center;
  color: inherit;
}

.category-card__image {
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
}

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

.category-card h4 {
  margin-top: 0.6rem;
  font-size: 1rem;
}

.category-card:hover h4 {
  color: var(--red-strong);
}

.public-playlist-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.public-playlist-image-wrapper {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.public-playlist-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Watch page ---------- */

.player-wrap,
#video {
  position: relative;
  background: #000;
  border-radius: var(--radius-m);
  overflow: hidden;
}

/* video.js's own stylesheet sets `.video-js { height: 100% !important }`, so the
   player needs a real ancestor height to resolve against — without this the whole
   player collapses to zero height (same fix applied on hornywombat.pro). */
#video_container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  border-radius: var(--radius-m);
  overflow: hidden;
}

#player_a,
#video_container .video-js {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.video-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1rem;
}

.video-title h1,
.video-title {
  font-size: 1.5rem;
  max-width: 60ch;
  margin-top: 0;
}

.video-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.video-markers-box {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  margin-top: 0.75rem;
}

#video_info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.video_info_sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.video_info_sub .inf {
  color: var(--paper);
}

.like_links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
}

#rate-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 3ch;
  text-align: center;
}

#resize-buttons {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

#resize-min {
  display: none;
}

#video_description {
  margin-top: 1.25rem;
}

.production_box {
  display: inline-block;
  margin-right: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.production_box button {
  border: none;
  background: var(--surface-2);
  color: var(--paper);
  border-radius: var(--radius-s);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.production_box button.marked {
  background: var(--red);
  color: var(--ink);
}

.tags_cats {
  margin-top: 1rem;
  width: 100%;
}

.tags-more {
  display: inline;
}

.tags-more summary {
  display: inline;
  color: var(--muted);
  cursor: pointer;
}

.tags-more summary::-webkit-details-marker {
  display: none;
}

.tags-more summary::before {
  content: "more \2026 ";
}

.tags-more[open] summary::before {
  content: "";
}

#download_div a {
  display: inline-block;
  margin-top: 0.5rem;
}

/* ---------- Alerts ---------- */

.alert,
#report {
  border-radius: var(--radius-s);
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.alert--success,
.alert-success {
  color: var(--moss);
  border-color: var(--moss);
}

.alert--danger,
.alert-danger {
  color: var(--rose);
  border-color: var(--rose);
}

#result:empty {
  display: none;
}

.auto-hide {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.6rem 1rem;
  z-index: 60;
  box-shadow: 0 12px 32px var(--shadow);
}

/* ---------- Table (my videos) ---------- */

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data-table th,
table.data-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

table.data-table img {
  border-radius: var(--radius-s);
}

/* ---------- Playlists ---------- */

.tmp_hide {
  display: none;
}
/* No !important — jQuery .show()/.hide()/.toggle() sets inline style="display"
   directly on #playlist-save (see user/save-playlist.html). */

#playlist-save {
  position: fixed;
  top: 20%;
  left: 50%;
  width: 300px;
  margin-left: -150px;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 20px 48px var(--shadow);
  z-index: 100;
}

#playlist-save .playlist-save-title {
  font-weight: 700;
  padding-bottom: 0.6rem;
}

#playlist-save input[type="text"] {
  margin-bottom: 0.5rem;
}

#playlist-save input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: var(--radius-s);
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--red);
  color: var(--ink);
}

#playlist-list {
  overflow-y: auto;
  max-height: 300px;
}

.playlist-item {
  width: 100%;
  margin-bottom: 3px;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  cursor: pointer;
}

.playlist-item:hover {
  background: var(--surface-3);
}

.playlist-item.green {
  color: var(--moss) !important;
}

.playlist-el {
  margin-top: 0.5rem;
}

.playlist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playlist-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius-s);
  padding: 0.6rem 0.9rem;
}

.playlist-actions {
  display: flex;
  gap: 0.4rem;
}

/* ---------- Upload ---------- */

.upload-panel {
  max-width: 520px;
  margin: 2rem auto;
  text-align: center;
}

.upload-input-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-m);
  border: 1px dashed var(--line);
  color: var(--red-strong);
  cursor: pointer;
  font-weight: 600;
}

.upload-input-label:hover {
  border-color: var(--red);
  background: var(--surface);
}

#progressbar {
  margin-top: 1rem;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
  position: relative;
}

#progressbar .progress {
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 0.2s ease;
}

#progress-val {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  color: var(--muted);
}

/* ---------- Stamp badge (HD / verified marks) ---------- */

.badge-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.4rem;
  border: 1.5px solid var(--red);
  border-radius: 3px;
  color: var(--red-strong);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  transform: rotate(-2deg);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--red-strong);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-grid h5 {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin: 0 0 0.75rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  margin-top: 1.5rem;
}

.footer-brand img {
  height: 26px;
  width: auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-switch img {
  display: inline;
}

/* ---------- Bootstrap-grid compatibility shim ---------- */
/* A lot of lower-traffic account/admin templates still use Bootstrap 3's
   row/col-sm-N/pull-left utility classes. Rather than rewrite every one of
   those templates' markup, a light shim keeps them laid out sanely now that
   the full Bootstrap CSS is gone. */

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

.w100 {
  width: 100%;
}

.text-center {
  text-align: center;
}

.pointer {
  cursor: pointer;
}

.is-hidden,
.hidden {
  display: none;
}
/* No !important: several pages still toggle visibility via jQuery
   .show()/.hide()/.toggle(), which sets the inline style="display" property
   directly — an !important class rule would permanently defeat that. */

.break {
  clear: both;
  height: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.6rem;
}

.row::after {
  content: "";
  display: table;
  clear: both;
}

[class^="col-"],
[class*=" col-"] {
  padding: 0 0.6rem;
  width: 100%;
}

@media (min-width: 768px) {
  .col-sm-1 { width: 8.333%; }
  .col-sm-2 { width: 16.666%; }
  .col-sm-3 { width: 25%; }
  .col-sm-4 { width: 33.333%; }
  .col-sm-5 { width: 41.666%; }
  .col-sm-6 { width: 50%; }
  .col-sm-7 { width: 58.333%; }
  .col-sm-8 { width: 66.666%; }
  .col-sm-9 { width: 75%; }
  .col-sm-10 { width: 83.333%; }
  .col-sm-11 { width: 91.666%; }
  .col-sm-12 { width: 100%; }
  .col-sm-12.pull-left,
  .col-sm-8.pull-left,
  .col-sm-6.pull-left,
  .col-sm-4.pull-left {
    float: left;
  }
}

@media (min-width: 992px) {
  .col-md-1 { width: 8.333%; }
  .col-md-2 { width: 16.666%; }
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.333%; }
  .col-md-5 { width: 41.666%; }
  .col-md-6 { width: 50%; }
  .col-md-7 { width: 58.333%; }
  .col-md-8 { width: 66.666%; }
  .col-md-9 { width: 75%; }
  .col-md-10 { width: 83.333%; }
  .col-md-11 { width: 91.666%; }
  .col-md-12 { width: 100%; }
}

@media (max-width: 730px) {
  .site-header .container {
    height: 56px;
  }

  .container {
    padding: 0 0.9rem;
  }

  .brand img {
    height: 26px;
  }

  .video-grid,
  .top-videos {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .video-title h1,
  .video-title {
    font-size: 1.2rem;
  }
}
