/* ========== CSS VARIABLES ========== */
:root {
  /* Base */
  --bg-color: #121212;
  --bg-primary: #121212;
  --bg-secondary: #1d1d1d;
  --bg-tertiary: #292929;
  --text-color: #ffffff;
  --text-primary: #e8e8e8;
  --text-secondary: #ddd;
  --border-color: rgba(255, 255, 255, 0.08);
  --footer-bg: #111;
  
  /* Accent (Brand) */
  --accent-color: #8a5b00;
  --ss-accent: #8a5b00;
  --accent-light: #a56f00;
  --accent-dark: #6a1000;
  --accent-glow: rgba(138, 91, 0, 0.15);
  
  /* Tagging */
  --tag-bg-light: #fbe8ed;
  --tag-text-light: #8a5b00;
  --tag-border-light: #8a5b00;
  --tag-hover-bg-light: #8a5b00;
  --tag-hover-txt-light: #fff;
  --tag-label-light: #8a5b00;
  --tag-bg-dark: #35101a;
  --tag-text-dark: #ffe7ec;
  --tag-border-dark: #b23b58;
  --tag-hover-bg-dark: #8a5b00;
  --tag-hover-txt-dark: #fff;
  --tag-label-dark: #fff;
  
  /* Effects */
  --shadow-color: rgba(0, 0, 0, 0.3);
  --glass-effect: rgba(21, 21, 21, 0.85);
  
  /* Navigation */
  --nav-bg: rgba(138, 91, 0, 0.08);
  --nav-accent: #8a5b00;
  --nav-accent-light: #9d6a18;
  --nav-accent-dark: #674300;
  --nav-text: #ffffff;
  --nav-inactive: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e0e0e0;
  --text-color: #333333;
  --text-primary: #333333;
  --text-secondary: #555;
  --border-color: rgba(0, 0, 0, 0.08);
  --footer-bg: #f9f9f9;
  --glass-effect: rgba(240, 236, 232, 0.9);
  --shadow-color: rgba(0, 0, 0, 0.08);
  --accent-glow: rgba(138, 91, 0, 0.1);
  
  --nav-bg: rgba(138, 91, 0, 0.05);
  --nav-text: #2d2a24;
  --nav-inactive: rgba(45, 42, 36, 0.7);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

ol, ul, .ss-steps { list-style: none; }
table { border-collapse: collapse; }

body {
  font: 500 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
        Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  padding-top: 60px !important;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100%;
  transition: background-color .3s, color .3s;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color .2s;
  word-break: break-word;
  overflow-wrap: break-word;
}

a:hover { color: #fe7702; }

h1, h2, h3, h4, h5, .rels-t {
  font-weight: 400;
  margin-bottom: 15px;
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

/* ========== NAVIGATION ========== */
.btn-menu {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font: 700 15px/1 sans-serif;
  cursor: pointer;
  user-select: none;
  transition: background .25s, transform .25s;
  animation: pulse 2s infinite;
}

.btn-menu:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-menu.opened {
  background: #8a0c1c;
  border-color: #8a0c1c;
  color: #fff;
}

.btn-menu .fa-bars {
  position: relative;
  width: 20px;
  height: 2px;
  background: #ffae3d;
  font-size: 0;
  border-radius: 2px;
  transition: .3s;
}

.btn-menu .fa-bars::before,
.btn-menu .fa-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #ffae3d;
  border-radius: 2px;
  transition: .3s;
}

.btn-menu .fa-bars::before { top: -6px; }
.btn-menu .fa-bars::after { top: 6px; }

.btn-menu.opened .fa-bars { background: transparent; }
.btn-menu.opened .fa-bars::before { top: 0; transform: rotate(45deg); background: #fff; }
.btn-menu.opened .fa-bars::after { top: 0; transform: rotate(-45deg); background: #fff; }

.menu-label { letter-spacing: .5px; }

.xf-mini-nav, .top-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0 25px;
  padding: 10px 0;
}

.xf-mini-nav a, .top-btn {
  background: var(--bg-secondary);
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text-primary);
  transition: all .3s ease;
}

.xf-mini-nav a:hover, .top-btn:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.top-btn {
  display: flex;
  gap: 6px;
  font-weight: 600;
}

.top-rated { color: #ffcf7d; }
.top-views { color: #ff7d7d; }

/* ========== THEME SWITCHER ========== */
.theme-switch-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  font-size: 18px;
}

.theme-switch {
  display: inline-block;
  height: 26px;
  width: 50px;
  margin-right: 8px;
}

.theme-switch input { display: none; }

.slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  cursor: pointer;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background: #fff;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background: #888; }
input:checked + .slider:before { transform: translateX(24px); }

.theme-toggle-floating {
  position: fixed;
  top: 0.6rem;
  right: 1.4rem;
  z-index: 1005;
  width: 2.8rem;
  height: 2.8rem;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--header-text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
  transition: all .25s ease;
}

.theme-toggle-floating:hover {
  background: rgba(255,255,255,.2);
  transform: scale(1.1);
}

.theme-label {
  font-weight: 700;
  font-size: 1.2em;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #eee;
  transition: color .2s, background .2s;
}

[data-theme="dark"] .theme-label {
  background: #222;
  border-color: #333;
  color: #fff;
}

/* ========== SIDEBAR ========== */
.usp-sidebar-panels {
  position: relative;
  width: 230px;
  padding: 16px;
  background: var(--bg-color);
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

@media (max-width: 1024px) {
  .usp-sidebar-panels {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 200px;
    height: 100vh;
    padding: 20px 0;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 9999;
    overflow-y: auto;
  }
  .usp-sidebar-panels.open { transform: translateX(0); }
  body.no-scroll { overflow: hidden; }
}

/* ========== TRENDING BLOCK ========== */
.ds-trending-block {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  width: 100%;
  backdrop-filter: blur(10px);
}

[data-theme="light"] .ds-trending-block {
  background: #f9f9f9;
  border-color: #eee;
}

.ds-trending-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.ds-trending-icon {
  font-size: 1.3rem;
  color: #ff9800;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,152,0,0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.ds-geo-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-color);
  line-height: 1.3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 16px;
}

.geo-country {
  color: #ff9800;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.geo-flag {
  margin-left: 4px;
  font-size: 1.1em;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.ds-trending-subtitle {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
}

[data-theme="light"] .ds-trending-subtitle {
  color: rgba(0,0,0,0.55);
}

.ds-trending-scroll {
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding: 8px 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,152,0,0.5) transparent;
  mask-image: linear-gradient(to right, transparent 0%, black 10px, black calc(100% - 10px), transparent 100%);
}

.ds-trending-scroll::-webkit-scrollbar {
  height: 6px;
}

.ds-trending-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  margin: 0 8px;
}

.ds-trending-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,152,0,0.5);
  border-radius: 3px;
}

[data-theme="light"] .ds-trending-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,152,0,0.4);
}

.ds-trending-tags {
  display: inline-flex;
  gap: 6px;
  min-width: min-content;
}

.ds-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-color);
  transition: all .2s ease;
  white-space: nowrap;
  text-decoration: none;
  min-height: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-weight: 500;
}

.ds-pill:hover {
  background: rgba(255,152,0,0.9);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,152,0,0.3);
}

[data-theme="light"] .ds-pill {
  background: rgba(0,0,0,0.04);
  color: #333;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

[data-theme="light"] .ds-pill:hover {
  background: rgba(255,152,0,0.9);
  color: #fff;
  border-color: rgba(0,0,0,0.1);
}

.ds-pill-emoji {
  margin-right: 6px;
  font-size: 0.95em;
  transition: transform 0.2s ease;
}

.ds-pill:hover .ds-pill-emoji {
  transform: scale(1.15);
}

/* ========== TAGS ========== */
.vidoser-tags {
  font-size: .95rem;
  margin: 2rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: .375rem;
  overflow: hidden;
}

.vidoser-header { margin-bottom: 20px; padding: 0 12px; }

.vidoser-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  font-size: .95rem;
  color: var(--text-color);
  border-top: 1px solid rgba(100,100,100,0.15);
  flex-wrap: nowrap;
}

.vidoser-info-category {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vidoser-info-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.vidoser-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-color);
}

/* ========== COMMENTS ========== */
.vidoser-comms {
  padding: 10px;
  background: var(--bg-color);
  margin-top: 30px;
}

.comms-title {
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 40px;
}

.comms-title > span { font-size: 16px; }

.add-comm-form {
  position: relative;
  margin: 20px 0;
  display: none;
}

.ac-soc {
  position: absolute;
  right: 0;
  top: -8px;
}

.ac-soc:before {
  content: attr(data-label);
  display: inline-block;
  vertical-align: top;
  line-height: 30px;
  margin-right: 5px;
}

.ac-soc a {
  display: inline-block;
  margin: 0 0 0 3px;
  vertical-align: top;
}

.ac-soc img {
  display: block;
  width: 30px;
}

.ac-inputs,
.ac-textarea { margin-bottom: 15px; }

.ac-av {
  width: 40px;
  height: 40px;
  float: left;
  margin-right: 10px;
  background: #fff url(/templates/ScatLab/dleimages/noavatar.png) no-repeat;
  background-size: contain;
}

.ac-title {
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.ac-inputs input {
  width: 49%;
  background: #ffffff;
  box-shadow: 0 0 0 1px #EDEDED, inset 1px 1px 3px 0 rgba(0,0,0,0.1);
}

.ac-textarea textarea {
  height: 85px;
  resize: vertical;
}

.sec-answer + .sec-label { margin-top: 10px; }

.ac-protect {
  margin-top: -10px;
  display: none;
}

.ac-protect .label { font-size: 12px; }
.ac-protect .sep-input { padding: 10px 10px 10px 160px; }
.ac-protect input { background: var(--bg-color); }

.mass_comments_action {
  text-align: right;
  padding: 5px 15px;
  background: #f0f0f0;
  margin: 20px 0 0;
}

.last-comm-link {
  font-size: 16px;
  margin-bottom: 10px;
}

.last-comm-link a { text-decoration: underline; }

.comm {
  background: var(--bg-color);
  padding: 10px 10px 10px 60px;
  margin-top: 10px;
}

.comm-av {
  width: 40px;
  height: 40px;
  float: left;
  margin-left: -50px;
}

.comm-meta { margin-bottom: 8px; }
.comm-meta span + span { margin-left: 10px; opacity: .8; }
.comm-author { font-weight: 700; }
.comm-text { font: 14px/18px Arial, Helvetica, sans-serif; }

.add-comm-btn {
  cursor: pointer;
  background: #901c31;
  color: var(--bg-color);
  padding: 6px 12px;
  border-radius: 4px;
}

/* ========== LOGIN BOX ========== */
.login-box {
  background: var(--bg-color);
  padding: 20px;
  display: none;
}

.lb-user {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  margin: -20px -20px 20px;
  padding: 20px;
  background: var(--bg-color);
}

.lb-ava {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-right: 20px;
}

.lb-name div { font-size: 18px; }
.lb-name a { margin-top: 10px; }

.lb-menu a {
  display: block;
  line-height: 30px;
  padding: 0 10px;
  background: var(--bg-color);
}

.lb-menu a:hover,
.lb-menu a:hover .fa {
  background: #e13d7a;
  color: var(--bg-color);
}

.lb-menu a .fa { color: #593136; }

.login-box input[type="text"],
.login-box input[type="password"],
.login-box button,
.lb-check {
  display: block;
  width: 100%;
  margin-bottom: 20px;
}

.lb-check input { display: none; }

.lb-check input + label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  cursor: pointer;
  position: relative;
  top: 3px;
  border-radius: 3px;
  border: 1px solid #ccc;
  background: #888;
}

.lb-check input:checked + label::before { background: #e5050b; }

.lb-soc {
  margin: 20px -20px -20px;
  padding: 20px;
  background: #f6f6f6;
  text-align: center;
}

.lb-soc a {
  display: inline-block;
  margin: 10px 3px 0;
  vertical-align: top;
}

.lb-soc img { display: block; width: 30px; }

/* ========== SHARE ========== */
.video-share-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: .95rem;
  border-radius: 999px;
  background: #333;
  color: var(--text-color);
  text-decoration: none;
  transition: background .3s, transform .3s;
  white-space: nowrap;
}

.share-icon:hover {
  background: #901c31;
  transform: scale(1.05);
}

.share-icon.tg { background: #0088cc; }
.share-icon.vb { background: #665cac; }
.share-icon.wa { background: #25D366; }
.share-icon.x { background: #000; }

.scat-share-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  margin: 24px auto;
  padding: 18px 15px;
  background: var(--bg-color);
  border: 1.5px solid rgba(140,140,140,0.08);
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(40,40,40,0.09);
}

.scat-share-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 1.13rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-color);
}

.scat-social-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.scat-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.13rem;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(40,40,40,0.07);
  transition: transform .19s, box-shadow .18s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scat-social-btn:focus-visible { outline: 2px solid #ffd700; }
.scat-social-btn.scat-tg { background: #2196f3; }
.scat-social-btn.scat-vb { background: #6f55c2; }
.scat-social-btn.scat-wa { background: #25d366; }
.scat-social-btn.scat-tw { background: #191919; }

[data-theme="dark"] .scat-social-btn.scat-tw { background: #fff; color: #222 !important; }

.scat-social-btn:hover,
.scat-social-btn:focus {
  transform: scale(1.07);
  box-shadow: 0 4px 16px rgba(40,40,40,0.13);
  filter: brightness(1.07);
}

.scat-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ========== EMOJI ========== */
.emoji-search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #6a1008;
  box-shadow: 0 2px 8px rgba(80,20,10,0.14);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
  z-index: 2;
}

.emoji-search-btn:hover,
.emoji-search-btn:focus {
  transform: scale(1.13) rotate(-6deg);
  background: #901c31;
  box-shadow: 0 6px 18px rgba(106,16,8,0.23);
  border: 1.5px solid #fff;
}

/* ========== TOP LINKS (Telegram) ========== */
.top-links a {
  flex: 1 1 calc(50% - 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  transition: 0.25s;
  background-color: #353434;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-links a:hover {
  background: #444;
  border-color: #fff;
}

.top-btn-telegram {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: #353434;
}

.top-btn-telegram:hover {
  background: rgba(0, 0, 0, 0.75);
}

.tg-ico svg {
  width: 20px;
  height: 20px;
}

.tg-name-main {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.2px;
  line-height: 1;
}

.tg-hub-box {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  background: #ff9000;
  border-radius: 1px;
  height: 20px;
}

.hub-text {
  font-weight: 700;
  font-size: 15px;
  color: #000;
  line-height: 1;
}

.tg-emoji {
  font-size: 14px;
  line-height: 1;
}

[data-theme="light"] .top-links a {
  background-color: #f1f1f1;
  color: #222;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .top-links a:hover {
  background-color: #e4e4e4;
  border-color: #000;
}

[data-theme="light"] .top-btn-telegram {
  background: #f1f1f1;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .top-btn-telegram:hover {
  background: #e4e4e4;
}

[data-theme="light"] .tg-name-main {
  color: #111;
}

[data-theme="light"] .tg-ico svg {
  filter: brightness(0.2);
}

[data-theme="light"] .hub-text {
  color: #111;
}

/* ========== MEDIA QUERIES ========== */
@media (min-width: 900px) {
  .top-links a {
    flex: 1 1 calc(25% - 10px);
    max-width: 240px;
  }
}

@media (max-width: 768px) {
  .ds-trending-block { margin: 1rem 0; padding: 0.9rem; border-radius: 8px; }
  .ds-trending-header { margin-bottom: 0.9rem; }
  .ds-trending-icon { width: 32px; height: 32px; font-size: 1.1rem; }
  .ds-geo-title { font-size: 0.95rem; padding: 0 12px; margin-bottom: 10px; }
  .ds-trending-subtitle { font-size: 0.72rem; }
  .ds-trending-scroll { padding: 0 12px 6px; }
  .ds-trending-tags { gap: 0.4rem; }
  .ds-pill { padding: 0.45rem 0.8rem; font-size: 0.8rem; min-height: 30px; border-radius: 14px; }
  .ds-trending-scroll::-webkit-scrollbar { height: 4px; }
  .ds-trending-scroll::-webkit-scrollbar-thumb { background: rgba(255,152,0,0.7); }
}

@media (max-width: 600px) {
  .top-links a {
    padding: 8px 10px;
    font-size: 12px;
  }
  .tg-ico svg {
    width: 17px;
    height: 17px;
  }
  .tg-name-main {
    font-size: 13px;
  }
  .tg-hub-box {
    height: 18px;
  }
  .hub-text {
    font-size: 13.5px;
  }
  .tg-emoji {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .ds-trending-block { padding: 0.8rem; margin: 0.8rem 0; border-radius: 10px; }
  .ds-trending-icon { width: 28px; height: 28px; font-size: 1rem; }
  .ds-geo-title { font-size: 0.9rem; padding: 0 10px; margin-bottom: 8px; }
  .ds-trending-subtitle { font-size: 0.68rem; }
  .ds-trending-scroll { padding: 0 10px 4px; }
  .ds-trending-tags { gap: 0.35rem; }
  .ds-pill { padding: 0.4rem 0.7rem; font-size: 0.75rem; min-height: 28px; border-radius: 12px; }
}

@media (min-width: 1024px) {
  .ds-trending-block { margin: 2rem 0; padding: 1.5rem 2rem; border-radius: 14px; }
  .ds-geo-title { padding: 0 20px; font-size: 1.05rem; }
  .ds-trending-subtitle { font-size: 0.82rem; }
  .ds-trending-scroll { padding: 0 20px 8px; }
  .ds-trending-tags { gap: 0.7rem; }
  .ds-pill { padding: 0.6rem 1.1rem; font-size: 0.9rem; min-height: 36px; border-radius: 16px; }
}
/* ========== UTILITIES ========== */
.nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Flex utilities */
.fx-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.fx-center { justify-content: center; }
.fx-between { justify-content: space-between; }
.fx-stretch { align-items: stretch; }
.fx-top { align-items: flex-start; }
.fx-middle { align-items: center; }
.fx-bottom { align-items: flex-end; }
.fx-col { 
  display: flex; 
  flex-direction: column; 
}
.fx-wrap { flex-wrap: wrap; }

.showfull-uniq {
  min-height: 320px;
  margin-bottom: 32px;
  padding-bottom: 1px;
  overflow: visible;
}

/* ========== LAYOUT ========== */
.wrap { 
  min-width: 320px; 
  overflow: hidden; 
}

.center {
  max-width: 1800px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
}

/* Header Bars */
.topchik-one,
.topchik-two {
  height: 60px;
  padding: 0 2010px;
  margin: 0 -2000px;
  box-shadow: 0 20px 20px -20px rgba(0,0,0,0.2);
}

.topchik-one { background: #252018; }
.topchik-two {
  background: var(--bg-color);
  box-shadow: 0 20px 20px -20px rgba(0,0,0,0.2);
}

.cols { 
  margin: 20px 0; 
  padding: 0 10px; 
}

/* Grid System */
.bochello { 
  width: 240px; 
  background: #f5f5f5; 
}

.contello {
  width: calc(100% - 240px);
  margin-top: 30px;  
  padding-left: 20px;
  min-height: 600px;
}

.footer {
  background: #3b3b3b;
  padding: 20px 2010px;
  margin: 0 -2000px;
  color: #fff;
  text-align: center;
  box-shadow: 0 -20px 20px -20px rgba(0,0,0,0.2);
}

/* ========== HEADER ========== */
.logo {
  display: block;
  float: left;
  width: 240px;
  height: 60px;
  margin-left: 45px;
  margin-right: 60px;
}

@media (max-width: 768px) {
  .logo { margin-left: 0; }
}

/* Search */
.search-box {
  width: 400px;
  float: left;
  margin-top: 10px;
}

.search-field {
  width: 100%;
  position: relative;
}

.search-field input {
  width: 100%;
  height: 40px;
  padding: 0 50px 0 10px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 7px;
  line-height: 40px;
  box-shadow: none;
}

[data-theme="light"] .search-field input {
  background: #fff;
  color: #333;
  border-color: #ddd;
}

.search-field input::placeholder { 
  color: var(--text-secondary); 
  opacity: .8; 
}

.search-box button {
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent !important;
  color: #888 !important;
  font-size: 18px;
  line-height: 40px !important;
}

/* Auth Buttons */
.btns-log {
  float: right;
  height: 60px;
  line-height: 60px;
  white-space: nowrap;
}

.btns-log a {
  display: inline-block;
  padding: 0 20px;
  color: var(--bg-color);
}

.show-login {
  background: #888;
  color: var(--bg-color);
  cursor: pointer;
  display: inline-block;
  padding: 0 20px;
  border-radius: 8px;
}

.btns-log a:hover,
.show-login:hover { text-decoration: underline; }

/* Navigation */
.topchik-menu,
.topchik-menu li { float: left; }

.topchik-menu a {
  display: block;
  line-height: 30px;
  padding: 0 10px;
  background: #f2f2f2;
  margin: 10px 10px 0 0;
}

.topchik-menu a span {
  display: inline-block;
  vertical-align: top;
  height: 20px;
  line-height: 20px;
  padding: 0 5px;
  margin: 5px 0 0 10px;
  background: #fa5800;
  color: var(--bg-color);
}

/* Sorter */
.sorter {
  float: right;
  position: relative;
  cursor: pointer;
  margin-top: 10px;
  padding: 0 10px;
  line-height: 30px;
}

.sorter:before {
  content: attr(data-label);
  float: left;
  padding-right: 10px;
}

.sorter form {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  width: 160px;
  background: var(--bg-color);
  padding: 10px;
  line-height: 26px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  z-index: 999;
}

/* ========== PREVIEW CARDS ========== */
.vidos {
  float: left;
  width: 33.33%;
  padding: 0 5px 10px;
}

.preview-in {
  position: relative;
  background: var(--bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.preview-img { 
  display: block; 
  height: 240px; 
}

.preview-img:hover img { opacity: .8; }

.preview-rate,
.preview-time {
  display: inline-block;
  padding: 5px 10px;
  position: absolute;
  top: 10px;
  z-index: 20;
  font-size: 12px;
  white-space: nowrap;
}

.preview-rate {
  right: 0;
  background: rgba(250,88,0,0.8);
  color: var(--bg-color);
}

.preview-time {
  left: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
}

.preview-text { padding: 15px 10px; }

.preview-title {
  display: block;
  font-size: 20px;
  line-height: 1.1; /* чуть плотнее */
  font-weight: 400; /* regular — золотая середина */
  height: 44px;
  overflow: hidden;
  color: var(--text-color);
}

/* ========== SIDEBAR ========== */
.bochello-box { padding: 10px; }

.bochello-bt {
  font-size: 18px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #888;
}

.bochello-nav { 
  background: #888; 
  color: var(--bg-color); 
}

.bochello-nav .bochello-bt {
  border-bottom: 0;
  margin: -10px -10px 10px;
  padding: 10px;
  background: #888;
  color: var(--bg-color);
}

.bochello-nav a {
  position: relative;
  display: block;
  padding: 10px 50px 10px 0;
  border-bottom: 1px solid #888;
  box-shadow: 0 1px #888;
  color: var(--bg-color);
  font-size: 14px;
}

.bochello-nav li:last-child a { 
  border-bottom: 0; 
  box-shadow: none; 
}

.bochello-nav a:hover { color: #888; }

.bochello-nav li span {
  position: absolute;
  right: 10px;
  top: 10px;
  opacity: .8;
}

/* ========== FOOTER ========== */
.podvalchik-menu {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
  justify-content: center;
}

.podvalchik-menu a,
.podvalchik-menu span {
  display: inline-block;
  padding: .3rem .6rem;
  font-size: .875rem;
  border-radius: 1.2rem;
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  transition: all .2s ease;
}

.podvalchik-menu a:hover,
.podvalchik-menu span:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-1px);
}

.podvalchik-copyr {
  margin-bottom: 10px;
  font-size: 18px;
}

.counter {
  position: absolute;
  left: 0;
  bottom: 20px;
  margin-left: 2010px;
  height: 31px;
  background: #86636f;
}



/* ========== VIDEO PAGE ========== */
.vidoser-in {
  background: var(--bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.player-box { background: #000; }
.player-box .video-box { 
  max-width: 700px; 
  margin: 0 auto; 
}

.vidoser h1 a {
  color: var(--accent-color);
  margin-left: 10px;
}

.vidoser-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: .9rem;
}

.vidoser-meta .icon-l {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
}

.vidoser-meta .icon-l span.fa { color: #5a5a5a; }

/* Video Tags */
.vidoser-tags__label {
  color: var(--tag-label-light);
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  padding-left: 4px;
  margin-bottom: .5rem;
  letter-spacing: .3px;
}

[data-theme="dark"] .vidoser-tags__label { 
  color: var(--tag-label-dark); 
}

.vidoser-tags__scroll,
.ds-trending-wrapper {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) transparent;
  padding-bottom: 4px;
}

.vidoser-tags__scroll::-webkit-scrollbar,
.ds-trending-wrapper::-webkit-scrollbar { height: 6px; }

.vidoser-tags__scroll::-webkit-scrollbar-track,
.ds-trending-wrapper::-webkit-scrollbar-track { background: transparent; }

.vidoser-tags__scroll::-webkit-scrollbar-thumb,
.ds-trending-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

.vidoser-tags__scroll a,
.vidoser-tags__scroll span {
  display: inline-block;
  background: #f0f0f0;
  color: #111;
  padding: .375rem .75rem;
  margin-right: .5rem;
  border-radius: .375rem;
  font-size: .89rem;
  line-height: 1.4;
  transition: all .2s ease;
}

.vidoser-tags__scroll a:hover,
.vidoser-tags__scroll span:hover { 
  background: var(--accent-color); 
  color: #fff; 
}

.vidoser-tags__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  padding-bottom: 8px;
}

.vidoser-tags__grid a,
.vidoser-tags__grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 10px 18px;
  margin: 6px 6px 6px 0;
  background: var(--tag-bg-light);
  color: var(--tag-text-light);
  border: 1px solid var(--tag-border-light);
  border-radius: .375rem;
  font-size: 1rem;
  font-weight: 600;
  transition: all .18s ease;
}

.vidoser-tags__grid a:hover,
.vidoser-tags__grid span:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: #3b3b3b;
  box-shadow: 0 2px 8px rgba(138, 91, 0, 0.1);
}

[data-theme="dark"] .vidoser-tags__grid a,
[data-theme="dark"] .vidoser-tags__grid span {
  background: var(--accent-color);
  color: var(--tag-text-dark);
  border-color: #3b3b3b;
}

[data-theme="dark"] .vidoser-tags__grid a:hover,
[data-theme="dark"] .vidoser-tags__grid span:hover {
  color: #fff;
  border-color: var(--accent-color);
}

/* Video Meta Actions */
.vmeta-fav,
.btn-scr,
.btn-dl,
.vmeta-time,
.vmeta-views {
  float: left;
  margin-left: 20px;
  line-height: 40px;
  cursor: pointer;
}

.vmeta-time,
.vmeta-views { float: right; }

.vmeta-desc { background: var(--bg-color); }

.vmeta-screens {
  display: none;
  padding: 10px 5px 0;
  background: #f2f2f2;
  border: 1px solid #f0f0f0;
  text-align: center;
  margin-bottom: 10px;
}

.vmeta-screens a,
.vmeta-screens > img {
  display: inline-block;
  vertical-align: top;
  margin: 0 5px 10px;
  max-width: 250px;
  max-height: 150px;
  overflow: hidden;
}

.btn-dl ul {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 100;
  width: 200px;
  background: rgba(0,0,0,0.8);
  color: var(--bg-color);
  padding: 5px 0;
  display: none;
}

.btn-dl ul li {
  padding: 5px 10px;
  line-height: normal;
  text-transform: none;
}

.btn-dl ul li a { color: var(--bg-color); }
.btn-dl li:hover { background: var(--accent-color); }

/* ========== RATING ========== */
.vmeta-rate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  float: left;
  white-space: nowrap;
  text-align: center;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 0 0 1px #e3e3e3;
  width: 246px;
}

.rate-data,
.vmeta-rate .rate-data { display: none; }

.rate-counts {
  width: 160px;
  padding: 3px 10px 0;
  height: 40px;
}

.rate-plus,
.rate-minus {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 40px;
  height: 40px;
  font-size: 24px;
  background: linear-gradient(to bottom, #fff 0%, #e6e6e6 100%);
  line-height: 40px;
}

.rate-plus {
  color: #1e9b05;
  border-right: 1px solid #e3e3e3;
}

.rate-minus {
  color: #d00707;
  border-left: 1px solid #e3e3e3;
}

.rate-plus:hover,
.rate-minus:hover {
  background: linear-gradient(to top, #fff 0%, #e6e6e6 100%);
}

.rate-bar {
  width: 100%;
  height: 6px;
  min-height: 6px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: #ef4559;
}

.rate-fill {
  width: 50%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background: #7bbc00;
  transition: width 1s linear;
}

.rate-perc {
  margin-right: 5px;
  font-size: 18px;
  color: #1e9b05;
}

.rate-action {
  display: inline-flex;
  padding: 4px;
  font-size: 1.1rem;
  color: #666;
  transition: color .2s;
}

.rate-action:hover { color: #888; }
.rate-action.active[data-type="plus"] { color: #888; }
.rate-action.active[data-type="minus"] { color: #333; }
.rate-counts .rate-num {
  font-weight: bold;
  min-width: 24px;
  text-align: center;
}

/* Related Videos */
.vidoser .vidos { padding: 10px 5px 0; }

/* ========== VIDEO PLAYER ========== */
.video-box embed,
.video-box object,
.video-box video,
.video-box iframe,
.mejs-container {
  max-width: 100% !important;
  display: block;
  width: 100%;
  height: 400px;
}

/* ========== TYPOGRAPHY ========== */
.vidoser-text {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-color);
}

.vidoser-text img:not(.emoji) {
  max-width: 100%;
  margin: 10px 0;
}

.vidoser-text > img[style*="left"],
.vidoser-text > .highslide img[style*="left"] { margin: 0 10px 10px 0; }

.vidoser-text > img[style*="right"],
.vidoser-text > .highslide img[style*="right"] { margin: 0 0 10px 10px; }

.vidoser-text a {
  text-decoration: underline;
  color: #3366cc;
}

.vidoser-text a:hover { text-decoration: none; }

.vidoser-text h2,
.vidoser-text h3,
.vidoser-text h4,
.vidoser-text h5 {
  margin: 10px 0;
  font-weight: 600;
}

.vidoser-text h2 { font-size: 1.5em; }
.vidoser-text h3 { font-size: 1.25em; }
.vidoser-text h4 { font-size: 1.125em; }
.vidoser-text h5 { font-size: 1em; }

.vidoser-text p { margin-bottom: 10px; }

.vidoser-text ul li,
.vidoser-text ol li { margin-left: 40px; }

.vidoser-text ul li { list-style: disc; }
.vidoser-text ol li { list-style: decimal; }

.vidoser-taglist { margin-top: 20px; }
.vidoser-taglist a { color: #e13d7a; }

.vidoser-taglist span:not(.fa):not(:last-child)::after {
  content: ",";
  display: inline;
}
/* ========== XFSEARCH (Filter Tags) - Фикс отступов ========== */
.xf-bottom-box,
.xf-bottom-links {
  /* Гарантированное отделение от float-карточек */
  clear: both !important;
  float: none !important;
  display: block;
  width: 100%;
  
  /* Агрессивные отступы сверху */
  margin: 70px 0 20px !important; /* Было 30px - увеличил */
  padding: 40px clamp(18px, 4vw, 22px) 22px; /* Добавил padding-top */
  
  /* Визуальная линия-разделитель (как в пагинации) */
  border-top: 2px solid var(--border-color);
  border-radius: 0 0 16px 16px; /* Убираем округление сверху */
  
  background: var(--glass-effect);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px var(--shadow-color), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease-out;
}

/* Золотой акцент сверху (как в пагинации) */
.xf-bottom-box::before,
.xf-bottom-links::before {
  content: '';
  position: absolute;
  top: -2px; /* На границе border-top */
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--accent-color);
  opacity: 1;
}

/* Убираем старую полоску сверху, заменяем на новую */
.xf-bottom-box::after,
.xf-bottom-links::after {
  display: none; /* Отключаем старый ::before если был */
}

.xf-bottom-title {
  font-size: clamp(1.05rem, 2.8vw, 1.15rem);
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-bottom: 10px;
  position: relative;
  letter-spacing: -0.01em;
}

.xf-bottom-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
  border-radius: 2px;
}

.xf-bottom-group { 
  margin-bottom: 20px; 
  padding: 0 4px; 
  position: relative; 
}

.xf-bottom-group::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  opacity: 0.3;
}

.xf-bottom-group h4 {
  font-size: clamp(0.92rem, 2.2vw, 0.98rem);
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.xf-bottom-group h4::before {
  content: '';
  width: 4px;
  height: 14px;
  background: var(--accent-color);
  border-radius: 2px;
  opacity: 0.7;
}

.xf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

.xf-tags a,
.xf-tag {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: clamp(0.82rem, 1.9vw, 0.88rem);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.xf-tags a::before,
.xf-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  transition: left 0.6s ease;
  z-index: -1;
}

.xf-tags a:hover::before,
.xf-tag:hover::before { left: 100%; }

.xf-tags a.xf-accent,
.xf-tag.xf-accent {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-color));
  border: none;
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.xf-tags a:hover,
.xf-tag:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-color));
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow), 0 0 0 1px rgba(144, 28, 49, 0.1);
}

.xf-row {
  margin: 20px 0;
  padding: 16px 20px;
  background: linear-gradient(90deg, rgba(144, 28, 49, 0.08) 0%, rgba(144, 28, 49, 0.03) 50%, transparent 100%);
  border-left: 4px solid var(--accent-color);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.xf-row::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
}

.xf-row h4 {
  margin-bottom: 10px;
  color: var(--accent-color);
  font-weight: 600;
  font-size: clamp(0.98rem, 2.4vw, 1.05rem);
  position: relative;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
  .xf-bottom-box,
  .xf-bottom-links {
    margin: 50px 0 20px !important; /* Меньше на планшетах */
    padding: 30px 20px 20px;
    border-radius: 0 0 14px 14px;
  }
}

@media (max-width: 768px) {
  .xf-bottom-box,
  .xf-bottom-links {
    margin: 40px -10px 20px !important; /* На всю ширину экрана с отступами */
    padding: 25px 16px 18px;
    border-left: none;
    border-right: none;
    border-radius: 0;
    border-top: 2px solid var(--border-color);
  }
  
  .xf-bottom-box::before,
  .xf-bottom-links::before {
    width: 60px; /* Короче линия на мобиле */
  }
  
  .xf-bottom-title {
    font-size: 1rem;
  }
  
  .xf-tags {
    gap: 6px;
  }
  
  .xf-tags a,
  .xf-tag {
    padding: 7px 14px;
    min-height: 38px;
    flex-grow: 1;
    min-width: calc(50% - 6px);
    border-radius: 10px;
    font-size: 0.85rem;
  }
  
  .xf-row {
    margin: 16px -8px;
    padding: 14px 16px;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .xf-bottom-box,
  .xf-bottom-links {
    margin: 35px -10px 15px !important;
    padding: 20px 12px 15px;
  }
  
  .xf-tags a,
  .xf-tag {
    min-width: 100%;
    margin-bottom: 5px;
    font-size: 0.9rem;
    justify-content: center;
  }
  
  .xf-bottom-title::after {
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
  }
}
/* ========== IMAGES ========== */
.img-box, .img-wide, .img-resp-h, .img-resp-v {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 9px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.img-resp-h { padding-top: 56.25%; }
.img-resp-v { padding-top: 130%; }

.img-box img, .img-wide img, .img-resp-h img, .img-resp-v img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-wide img { position: static; }

.img-square img {
  width: 150%;
  max-width: 150%;
  margin-left: -25%;
}

img {
  aspect-ratio: attr(width) / attr(height);
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== FORMS ========== */
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  font-size: 1rem;
  padding: .65em 1em;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  color: inherit;
  transition: border-color .2s, background .2s;
  outline: none;
  box-shadow: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-color);
}

textarea { resize: vertical; min-height: 90px; }
select { min-height: 44px; }

/* ========== UI COMPONENTS ========== */
/* Back to Top */
#gotop {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 1111;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(145deg, var(--accent-dark) 60%, #59131e 100%);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, background .2s, box-shadow .2s;
}

#gotop.visible {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#gotop svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  filter: drop-shadow(0 1px 1px #0002);
  transition: fill .2s;
}

#gotop:hover {
  background: linear-gradient(145deg, #a12c42 60%, var(--accent-dark) 100%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

#gotop:active svg { fill: #ffd700; }

/* Reading Progress */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.1);
  z-index: 9999;
}

#reading-progress__bar {
  width: 0%;
  height: 100%;
  background: #5bdd32;
  transition: width .1s ease-out;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  z-index: 10000;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  border-radius: 4px;
}

/* Carousel */
.my-carousel { margin: 40px 0; }

.my-carousel__wrap {
  position: relative;
  overflow: hidden;
  border: 2px solid #888;
  border-radius: 8px;
  padding: 16px 0;
  background: var(--bg-color);
}

.my-carousel__list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 48px;
  margin: 0;
  scrollbar-width: none;
}

.my-carousel__list::-webkit-scrollbar { display: none; }

.my-carousel__list .recommended-item {
  flex: 0 0 auto;
  width: 140px;
  background: #f9f9f9;
  border-radius: 6px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.my-carousel__list .recommended-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.my-carousel__list .recommended-thumb {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #ddd;
}

.my-carousel__list .recommended-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  padding: 14px;
  width: 0;
  height: 0;
}

.my-carousel__arrow--left { left: 30px; }
.my-carousel__arrow--left::before {
  content: "";
  display: block;
  border-top: 21px solid transparent;
  border-bottom: 21px solid transparent;
  border-right: 32px solid #ff0707;
}

.my-carousel__arrow--left:hover::before { border-right-color: #cf711f; }

.my-carousel__arrow--right { right: 30px; }
.my-carousel__arrow--right::before {
  content: "";
  display: block;
  border-top: 21px solid transparent;
  border-bottom: 21px solid transparent;
  border-left: 32px solid #ff0707;
}

.my-carousel__arrow--right:hover::before { border-left-color: #cf711f; }

/* ========== VIDEO LAYOUT ========== */
.video-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.video-main-area {
  contain: layout style paint;
}

.video-rightbar {
  position: sticky;
  top: 90px;
  padding-right: 5px;
  overflow: visible;
  contain: strict;
  height: 1600px;
  overflow: hidden;
}

.vr-title {
  font-size: 1rem;
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--text-color);
  contain: layout;
}

.vr-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  contain: content;
}

.vr-list .vidos {
  background: rgba(25, 25, 25, 0.85);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  contain: layout;
}

.vr-list img {
  border-radius: 6px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.vr-list .vidos img {
   float: none;
   width: 100%;
   height: auto;
}

.vidoser-title {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  margin: 20px 0;
  color: var(--text-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  padding: 0 15px;
  font-display: swap;
  contain: layout;
}

.vidoser-in {
  color: var(--text-color);
  contain: layout style paint;
}

/* ========== POSTER & META (Fullstory) ========== */
.poster-meta-row {
  display: flex;
  height: 400px;  
  align-items: stretch;
  gap: 25px;
  margin: 25px 0;
  contain: strict !important;
  position: relative;
}

.poster-meta-row .video-meta {
  flex: 1;
  height: 100%;
  overflow: hidden;
  contain: strict;
  padding: 10px;
  background: var(--bg-color);
  border: 1px solid #1f1f1f;
  border-radius: 6px;
}

.video-meta .meta-line {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  display: flex;
  gap: 10px;
  font-size: 14px;
  contain: layout;
}

.video-meta strong {
  min-width: 92px;
  font-weight: 600;
  color: var(--text-color);
  flex-shrink: 0;
}

.meta-text {
  flex: 1;
  min-width: 0;
  contain: layout;
}

.meta-text a {
  display: inline-block;
  padding: 3px 8px;
  background: var(--bg-color);
  border: 1px solid #2b2b2b;
  border-radius: 5px;
  font-size: 13px;
  color: var(--accent-color);
  text-decoration: none;
  transition: background 0.15s;
  margin: 1px 3px 1px 0;
}

.meta-text a:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.meta-text a::after {
  content: "↗";
  opacity: 0.6;
  margin-left: 4px;
  font-size: 11px;
}

/* ===== POSTER GALLERY (FULL REPLACEMENT) ===== */
.poster-gallery {
  width: 600px;
  height: 337px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  display: flex;           /* Центрирование */
  align-items: center;
  justify-content: center;
  contain: strict;
}

/* Базовые стили картинки */
#gallery-img {
  display: block;
  border-radius: 8px;
  border: 1px solid #222;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

/* 🔥 Обычные широкие картинки: на весь контейнер (обрезка по краям) */
#gallery-img.is-landscape {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 🔥 Вертикальные картинки: полностью видны, по центру, черные поля */
#gallery-img.is-portrait {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Стрелки навигации */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-color);
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
  user-select: none;
  line-height: 1;
  transition: background 0.2s;
}

.gallery-arrow:hover {
  background: rgba(138, 91, 0, 0.7);
}

.gallery-arrow.left { left: 10px; }
.gallery-arrow.right { right: 10px; }

/* Адаптивность */
@media (max-width: 640px) {
  .poster-gallery {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
/* ========== TITLES ========== */
.rels-t {
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
  margin: 15px 0;
  padding-left: 15px;
  font-size: 1.5rem;
  border-left: 5px solid var(--accent-color);
  padding-left: 20px;
}

h3.rels-t {
  color: var(--accent-color);
  font-size: 1.7rem;
}

h4.rels-t {
  color: #ffcc00;
  font-size: 1.5rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 1400px) { .preview-img { height: 200px; } }

@media (max-width: 1220px) {
  .center { max-width: 1000px; }
  .preview-img { height: 202px; }
  .vidos { width: 49.33%; }
}

@media (max-width: 1024px) {
  .btn-menu { display: flex; flex-direction: row-reverse; }
  .btns-log a, .topchik-menu, .bochello { display: none; }
  .contello { width: 100%; padding-left: 0; }
  .counter { position: static; margin: 10px 0 0; }
}

@media (max-width: 950px) {
  .center { max-width: 768px; }
  .search-box { width: 250px; }
}

@media (max-width: 768px) {
  .center { max-width: 100%; }
  .vidos { width: 50%; }
  .search-box {
    width: auto;
    float: none;
    margin-top: 0;
    position: absolute;
    top: 60px;
    left: 2010px;
    right: 2010px;
  }
  .search-field input, .search-field input:focus {
    height: 30px;
    line-height: 30px;
  }
  .search-box button {
    width: 30px;
    height: 30px;
    line-height: 30px;
  }
  .vmeta-fav, .btn-scr, .btn-dl, .vmeta-time, .vmeta-views { margin-left: 10px; }
  
  .rels-t {
    font-size: 1.2rem;
    padding-left: 10px;
    margin: 10px 0;
  }
  
  .vidoser-title {
    font-size: 18px;
    line-height: 1.25;
    margin: 12px 0;
    padding: 0 8px;
  }
  
  .xf-bottom-box, .xf-bottom-links {
    margin: 20px -12px;
    padding: 18px 16px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .xf-bottom-group { margin-bottom: 18px; }
  .xf-tags { gap: 6px; }
  .xf-tags a, .xf-tag {
    padding: 7px 14px;
    min-height: 38px;
    flex-grow: 1;
    min-width: calc(50% - 6px);
    border-radius: 10px;
  }
  .xf-row {
    margin: 16px -8px;
    padding: 14px 16px;
    border-radius: 6px;
  }
}

@media (max-width: 590px) {
  .center2 { max-width: 320px; }
  .show-login {
    padding: 0 5px;
    font-size: 12px;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .vidos { width: 100%; float: none; padding: 0 10px 20px; }
  .site-desc { display: none; }
  .preview-img { height: 190px; }
  .add-comm-btn { padding: 0 10px; }
  .comms-title2 {
    text-align: center;
    display: block !important;
  }
  .video-box embed, .video-box object, .video-box video, .video-box iframe { height: 250px; }
  .ac-soc { position: static; }
  .ac-inputs input {
    width: 100%;
    margin-top: 10px;
  }
  .ac-protect {
    width: 100%;
    float: none;
    margin: 0;
  }
  .ui-dialog { width: 100% !important; }
  .upop-left, .upop-right {
    float: none !important;
    width: 100% !important;
    margin: 0;
    padding: 0 20px;
  }
  .upop-left {
    margin-bottom: 10px;
    text-align: center;
  }
  .ui-dialog-buttonset button {
    display: block;
    margin: 0 0 5px 0;
    width: 100%;
  }
  #dofullsearch, #searchsuggestions span.seperator { display: none !important; }
  .attach .download-link {
    margin: 0 -15px 0 0;
    float: none;
    display: block;
    padding: 0 10px;
  }
  .attach-info { float: none; }
}

@media (max-width: 540px) {
  .scat-share-box {
    max-width: 98vw;
    padding: 9px 3px;
  }
  .scat-social-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .scat-icon {
    width: 18px;
    height: 18px;
  }
  .scat-share-heading { font-size: 1rem; }
  .scat-social-buttons { gap: 8px; }
}

@media (max-width: 480px) {
  .xf-bottom-title { font-size: 18px; }
  .xf-row h4 { font-size: 14px; }
  .top-links { gap: 6px; }
  .top-btn {
    font-size: .85rem;
    padding: 8px 12px;
  }
  .rels-t { font-size: 1.2rem; }
  .vidoser-title {
    font-size: 18px;
    margin: 12px 0;
    padding: 0 8px;
  }
}

@media (max-width: 420px) {
  .ds-geo-title {
    font-size: 16.5px;
    gap: 6px;
  }
  .ds-geo-title .geo-flag { font-size: 16px; }
  .ds-pill {
    font-size: 12.5px;
    padding: 6px 10px;
  }
}

@media (max-width: 400px) {
  .theme-label {
    font-size: .9em;
    padding: 1px 3px;
    border-radius: 3px;
  }
}

@media (max-width: 375px) {
  .xf-mini-nav a { flex: 1 1 100%; }
  .top-links { flex-direction: column; }
  .top-btn { width: 100%; }
  .vidoser-title {
    font-size: 16px;
    margin: 10px 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .xf-bottom-box, .xf-bottom-links {
    margin: 25px 0 20px;
    padding: 20px;
    border-radius: 16px;
  }
  .xf-tags a, .xf-tag {
    min-width: calc(33.333% - 8px);
  }
}

@media (min-width: 1025px) {
  .xf-tags a, .xf-tag {
    min-width: auto;
    flex-grow: 0;
  }
  .xf-bottom-box:hover, .xf-bottom-links:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-color), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

@media (min-width: 1200px) {
  .rels-t { font-size: 1.5rem; }
}

@media (max-width: 992px) {
  .rels-t { font-size: 1.2rem; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: no-preference) {
  .xf-tags a, .xf-tag {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .xf-bottom-box, .xf-bottom-links, .xf-row {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (hover: none) and (pointer: coarse) {
  .xf-tags a:active, .xf-tag:active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-color));
    border-color: transparent;
    color: #ffffff;
    transform: scale(0.96);
  }
  .xf-tags a, .xf-tag {
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Light Theme Adjustments */
[data-theme="light"] .xf-bottom-box,
[data-theme="light"] .xf-bottom-links {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px var(--shadow-color), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .xf-tags a.xf-accent,
[data-theme="light"] .xf-tag.xf-accent {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Color Scheme Dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):not(.theme-light) .xf-bottom-box,
  :root:not([data-theme]):not(.theme-light) .xf-bottom-links {
    border: 1px solid rgba(42, 42, 42, 0.7);
  }
}
/* ========== DOWNLOAD BUTTON ========== */
#download-btn-wrap {
  margin: 14px 0 22px;
  text-align: center;
  min-height: 60px;
  contain: layout;
}

.dl-btn-uni {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 900px;
  margin: 15px auto 25px;
  padding: 17px 22px;
  background: var(--accent-color);
  border: 1px solid #1B6991;
  box-shadow: 0 0 0 1px #1B6991;
  border-radius: 10px;
  text-decoration: none;
  color: #fff !important;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
  contain: layout;
}

.dl-btn-uni:hover {
  background: #af7300;
  box-shadow: 0 0 10px rgba(138, 91, 0, 0.45);
}

.dl-btn-uni::before {
  content: "";
  width: 26px;
  height: 26px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M11 3h2v10l3.29-3.29 1.42 1.42L12 17l-5.71-5.71 1.42-1.42L11 13V3zm-6 14h14v2H5v-2z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M11 3h2v10l3.29-3.29 1.42 1.42L12 17l-5.71-5.71 1.42-1.42L11 13V3zm-6 14h14v2H5v-2z"/></svg>') center/contain no-repeat;
}

.dl-btn-uni.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #808080;
  border: 1px solid #5f5f5f;
}

/* ========== STICKY BOTTOM BAR ========== */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sticky-bar--visible {
  transform: translateY(0%);
}

.sticky-bar__thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.sticky-bar__title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sticky-bar__btn {
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.sticky-bar__btn--download {
  background: var(--accent-color);
  color: #fff;
}

.sticky-bar__btn--download:hover {
  background: rgba(138, 91, 0, 0.66);
}

.sticky-bar__btn--next {
  background: #333;
  color: #fff;
}

.sticky-bar__btn--next:hover {
  background: #555;
}

/* ========== ZOOM MODAL ========== */
#zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  contain: strict;
}

#zoom-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

/* ========== VIDEO EMBED PLACEHOLDER ========== */
#video-embed-placeholder {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 0;
  overflow: hidden;
  contain: strict;
}

.video-iframe-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  contain: strict;
}

.video-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* ========== BREADCRUMBS (Speedbar) ========== */
.speedbar {
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: var(--nav-text);
  margin: 0 0 clamp(20px, 3vw, 25px) 0;
  padding: clamp(12px, 2vw, 16px) clamp(12px, 2vw, 20px);
  background: var(--nav-bg);
  border: 1px solid rgba(138, 91, 0, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 91, 0, 0.6) transparent;
  min-height: 52px;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 40px,
    black calc(100% - 40px),
    transparent 100%
  );
  animation: navSlideIn 0.4s ease-out;
}

.speedbar::-webkit-scrollbar {
  height: 5px;
}

.speedbar::-webkit-scrollbar-track {
  background: rgba(138, 91, 0, 0.1);
  border-radius: 3px;
}

.speedbar::-webkit-scrollbar-thumb {
  background: linear-gradient(
    90deg,
    var(--nav-accent-dark),
    var(--nav-accent),
    var(--nav-accent-light)
  );
  border-radius: 3px;
}

.speedbar a {
  color: var(--nav-text) !important;
  font-weight: 600;
  padding: clamp(5px, 0.8vw, 8px) clamp(10px, 1.5vw, 16px);
  background: rgba(138, 91, 0, 0.15);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.speedbar a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(138, 91, 0, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

.speedbar a:hover::before {
  left: 100%;
}

.speedbar a:first-of-type {
  background: linear-gradient(
    135deg,
    var(--nav-accent-dark),
    var(--nav-accent)
  );
  color: white !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(138, 91, 0, 0.3);
}

.speedbar a:first-of-type:hover {
  background: linear-gradient(
    135deg,
    var(--nav-accent),
    var(--nav-accent-light)
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 91, 0, 0.4);
}

.speedbar a:not(:first-of-type):hover {
  background: rgba(138, 91, 0, 0.25);
  border-color: var(--nav-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 91, 0, 0.2);
}

.speedbar span:not(.separator) {
  color: var(--nav-inactive);
  font-weight: 500;
  padding: 5px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: rgba(138, 91, 0, 0.08);
  border-radius: 6px;
}

.speedbar .separator,
.speedbar .fa-angle-right {
  margin: 0 clamp(4px, 0.8vw, 8px);
  color: var(--nav-inactive) !important;
  opacity: 0.6;
  font-size: 0.9em;
  flex-shrink: 0;
}

.speedbar svg {
  width: clamp(20px, 2.5vw, 24px) !important;
  height: clamp(20px, 2.5vw, 24px) !important;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.speedbar svg:first-of-type {
  fill: #ffffff !important;
}

.speedbar svg:not(:first-of-type) {
  fill: var(--nav-accent-light);
}

.speedbar a:hover svg {
  transform: scale(1.1) translateY(-1px);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

/* ========== FIXED HEADER ========== */
.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  height: 60px !important;
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.search-btn-header {
  position: fixed;
  top: 12px;
  right: 80px;
  z-index: 10002;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(138, 91, 0, 0.3);
}

.search-btn-header:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

.search-dropdown {
  position: fixed;
  top: 60px;
  right: 12px;
  z-index: 10001;
  width: 320px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-dropdown.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-dropdown form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-dropdown input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
}

.emoji-search-btn-inline {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.emoji-search-btn-inline:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

@keyframes navSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== INSTRUCTION BLOCK ========== */
.ss-howto {
  --ss-bg: var(--bg-secondary);
  --ss-bg-light: var(--bg-tertiary);
  --ss-text: var(--text-primary);
  --ss-text-soft: var(--text-secondary);
  --ss-border: var(--border-color);
  margin: 20px 0 40px;
  padding: 0;
  color: var(--ss-text);
  line-height: 1.55;
}

.ss-howto__lead {
  background: var(--ss-bg);
  padding: 18px 20px;
  border: 1px solid var(--ss-border);
  border-radius: 14px;
  margin-bottom: 22px;
  font-size: 1.05rem;
}

.ss-howto__lead a {
  color: var(--ss-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ss-howto__card {
  background: var(--ss-bg);
  border: 1px solid var(--ss-border);
  padding: 20px 22px;
  border-radius: 14px;
  margin-bottom: 26px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.ss-howto__h2 {
  margin: 0 0 14px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}

.ss-howto__list {
  padding-left: 22px;
  margin: 12px 0 18px;
}

.ss-howto__list li { margin: 6px 0; color: var(--ss-text); }

.ss-howto__note {
  margin-top: 14px;
  font-size: .95rem;
  color: var(--ss-text-soft);
}

.ss-howto__note a { color: var(--ss-accent); }

.ss-instr__logo {
  width: 160px;
  margin: 0 auto 16px;
  display: block;
}

.ss-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--ss-border);
}

.ss-step:last-child { border-bottom: none; }

.ss-step__num {
  background: var(--ss-accent);
  color: #fff;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-top: 4px;
  font-weight: 700;
}

.ss-step__text { line-height: 1.55; }

.ss-instr__figure { margin: 14px 0; }
.ss-instr__figure img {
  width: 100%;
  border: 1px solid var(--ss-border);
  border-radius: 10px;
}

.ss-instr__cap {
  font-size: .85rem;
  opacity: .75;
  margin-bottom: 4px;
}

.ss-faq { margin-bottom: 12px; }

.ss-faq summary {
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ss-bg-light);
  border: 1px solid var(--ss-border);
  font-weight: 600;
  color: var(--ss-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ss-faq__a {
  padding: 14px 14px 4px;
  color: var(--ss-text-soft);
  line-height: 1.55;
}

.ss-howto__links {
  margin-top: 20px;
  font-size: .95rem;
}

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

.ss-howto__links a:hover { text-decoration: underline; }

.ss-howto__seo {
  margin-top: 20px;
  font-size: .9rem;
  opacity: .8;
}



/* ========== MEDIA QUERIES ========== */
@media (max-width: 1024px) {
  .speedbar {
    padding: 14px 16px;
    margin: 0 0 20px 0;
    border-radius: 10px;
  }
  .speedbar::-webkit-scrollbar {
    height: 6px;
  }
  .speedbar a {
    padding: 7px 14px;
    font-size: 0.95rem;
  }
  .speedbar svg {
    width: 22px !important;
    height: 22px !important;
  }
}

@media (max-width: 900px) {
  /* Дополнение к .video-layout из Части 3 */
  .video-layout {
    grid-template-columns: 1fr;
  }
  .video-rightbar {
    display: none;
  }
  .poster-meta-row {
    flex-direction: column;
    gap: 15px;
    height: auto !important;
    min-height: auto;
    contain: layout !important;
  }
  .poster-gallery {
    width: 100% !important;
    max-width: 600px;
    height: auto !important;
    aspect-ratio: 16/9;
    margin: 0 auto;
  }
  .poster-gallery img {
    position: relative;
    height: auto;
  }
  .poster-meta-row .video-meta {
    height: auto;
    contain: layout;
  }
}

@media (max-width: 768px) {
  .speedbar a {
    padding: 8px 12px;
    font-size: 0.9rem;
    background: rgba(138, 91, 0, 0.2);
    min-width: fit-content;
  }
  .speedbar svg {
    width: 20px !important;
    height: 20px !important;
    margin-right: 6px;
  }
  .speedbar .separator,
  .speedbar .fa-angle-right {
    margin: 0 6px;
    font-size: 1em;
  }
  
  .sticky-bar {
    padding: 15px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .sticky-bar__thumb img {
    width: 40px;
    height: 40px;
  }
  .sticky-bar__title {
    font-size: 13px;
    max-width: 100%;
    flex: 1 1 100%;
    margin-bottom: 4px;
  }
  .sticky-bar__btn {
    padding: 6px 10px;
    font-size: 13px;
    flex: 1 1 auto;
    text-align: center;
  }
  .sticky-bar__btn--download {
    flex: 1;
  }
  .sticky-bar__btn--next {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: auto;
  }
  .gallery-arrow {
    padding: 6px 10px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .speedbar {
    padding: 10px 12px;
    min-height: 46px;
    gap: 4px;
  }
  .speedbar a {
    padding: 6px 10px;
    font-size: 0.85rem;
    gap: 4px;
  }
  .speedbar svg {
    width: 18px !important;
    height: 18px !important;
    margin-right: 4px;
  }
  .speedbar .separator,
  .speedbar .fa-angle-right {
    margin: 0 4px;
    font-size: 0.9em;
    min-width: 8px;
  }
  .speedbar a:first-of-type:not([href*="/"])::after {
    content: 'Home';
    font-size: 0;
    opacity: 0;
  }
}

@media (max-width: 375px) {
  .speedbar {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  .speedbar a {
    padding: 5px 8px;
  }
  .speedbar svg {
    width: 16px !important;
    height: 16px !important;
    margin-right: 3px;
  }
  .speedbar a:first-of-type svg {
    width: 18px !important;
    height: 18px !important;
    fill: #ffffff !important;
    background: var(--nav-accent);
    padding: 3px;
    border-radius: 5px;
    box-shadow: 0 0 0 2px rgba(138, 91, 0, 0.5);
  }
}

@media (min-width: 1025px) {
  .speedbar {
    padding: 16px 24px;
  }
  .speedbar:hover {
    background: rgba(138, 91, 0, 0.12);
    border-color: rgba(138, 91, 0, 0.3);
    box-shadow: 0 6px 24px rgba(138, 91, 0, 0.15);
  }
  .speedbar a {
    padding: 8px 18px;
  }
  .speedbar svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* Light Theme */
[data-theme="light"] .speedbar {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .speedbar svg {
  fill: var(--nav-accent);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
[data-theme="light"] .speedbar svg:first-of-type {
  fill: #ffffff !important;
}

@media (prefers-color-scheme: dark) {
  .speedbar svg:not(:first-of-type) {
    fill: var(--nav-accent-light);
    opacity: 0.9;
  }
}
/* ====== ФИКС ФУТЕРА (Footer) ====== */
.ds-footer {
  margin-top: 40px;
  padding: 40px 0 30px;
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 15px;
  clear: both; /* Важно! Чтобы не лез на сетку */
}

.ds-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-direction: row;
}

.ds-footer__col {
  flex: 1 1 auto;
}

.ds-footer__col h3.ds-footer__title {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-color);
  font-weight: 600;
}

.ds-footer__col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.ds-footer__col a:hover {
  color: var(--accent-color);
}

.ds-footer__copy {
  margin-top: 35px;
  text-align: center;
  opacity: .5;
  font-size: 14px;
  color: var(--text-color);
}

/* Старый футер на всякий случай */
.footer {
  background: var(--footer-bg);
  padding: 20px 2010px;
  margin: 0 -2000px;
  color: var(--text-color);
  text-align: center;
  border-top: 1px solid var(--border-color);
  clear: both;
}

@media (max-width: 768px) {
  .ds-footer__inner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 28px !important;
  }
  
  .ds-footer__col h3.ds-footer__title {
    font-size: 15px;
  }
  
  .ds-footer__col a {
    font-size: 14px;
  }
}

/* ====== ФИКС КНОПКИ ТЕЛЕГИ (Fullstory) ====== */
.top-btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 10px 16px;
  background: rgba(138, 91, 0, 0.1);
  border: 1px solid rgba(138, 91, 0, 0.2);
  border-radius: 10px;
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
  contain: layout;
  transition: all 0.2s ease;
}

.top-btn-telegram:hover {
  background: rgba(138, 91, 0, 0.2);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 91, 0, 0.15);
}

.tg-ico svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.tg-name-main {
  font-weight: 700;
  font-size: 15px;
  color: inherit;
  letter-spacing: 0.2px;
  line-height: 1;
}

.tg-hub-box {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: #ff9000;
  border-radius: 3px;
  height: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hub-text {
  font-weight: 700;
  font-size: 14px;
  color: #000;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tg-emoji {
  font-size: 14px;
  line-height: 1;
}

/* Темная тема для телеги */
[data-theme="light"] .top-btn-telegram {
  background: rgba(0, 0, 0, 0.04);
  color: #222;
  border-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .top-btn-telegram:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: #222;
}

[data-theme="light"] .tg-ico svg {
  filter: brightness(0.2);
}

[data-theme="light"] .hub-text {
  color: #111;
}

/* Адаптив под мобилы */
@media (max-width: 480px) {
  .top-btn-telegram {
    padding: 8px 12px;
    margin-top: 10px;
  }
  
  .tg-ico svg {
    width: 20px;
    height: 20px;
  }
  
  .tg-name-main {
    font-size: 13px;
  }
  
  .hub-text {
    font-size: 12px;
  }
}

/* ====== ФИКС ГАМБУРГЕРА (Burger Animation) ====== */
.btn-menu {
  display: none; /* На десктопе скрыта */
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font: 700 15px/1 sans-serif;
  cursor: pointer;
  user-select: none;
  transition: background .25s, transform .25s;
  /* Если нужна пульсация */
  animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(138, 91, 0, 0.4); 
  }
  50% { 
    box-shadow: 0 0 0 6px rgba(138, 91, 0, 0); 
  }
}

/* Показываем на мобилках */
@media (max-width: 1024px) {
  .btn-menu {
    display: flex !important;
    flex-direction: row-reverse;
  }
}

.btn-menu:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-menu.opened {
  background: #8a0c1c !important;
  border-color: #8a0c1c !important;
  color: #fff !important;
  animation: none; /* Останавливаем пульсацию при открытии */
}

/* Полоски бургера */
.btn-menu .fa-bars {
  position: relative;
  width: 20px;
  height: 2px;
  background: #ffae3d;
  font-size: 0;
  border-radius: 2px;
  transition: .3s;
  display: inline-block;
}

.btn-menu .fa-bars::before,
.btn-menu .fa-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #ffae3d;
  border-radius: 2px;
  transition: .3s;
}

.btn-menu .fa-bars::before { top: -6px; }
.btn-menu .fa-bars::after { top: 6px; }

/* Анимация в крестик */
.btn-menu.opened .fa-bars { 
  background: transparent !important; 
}

.btn-menu.opened .fa-bars::before { 
  top: 0 !important; 
  transform: rotate(45deg); 
  background: #fff !important; 
}

.btn-menu.opened .fa-bars::after { 
  top: 0 !important; 
  transform: rotate(-45deg); 
  background: #fff !important; 
}

.menu-label { 
  letter-spacing: .5px; 
  font-weight: 700;
}
