/* ============================================================
   EmpireKINO.RU — Modern Theme v5.0
   DLE 19.1 Compatible | Consolidated Override
   Eliminates conflicts with style.css, engine.css, components.css
   ============================================================ */

/* ======================== CSS VARIABLES ====================== */
:root {
  --ek-bg: #f0f2f5;
  --ek-bg-card: #ffffff;
  --ek-bg-header: #1a1f2e;
  --ek-bg-input: #ffffff;
  --ek-bg-hover: #f8f9fa;
  --ek-bg-stripe: #f9f8f8;
  --ek-text: #1c2333;
  --ek-text-sec: #5a6577;
  --ek-text-muted: #8b95a5;
  --ek-accent: #2bb42b;
  --ek-accent-hover: #24a024;
  --ek-accent-rgb: 43,180,43;
  --ek-blue: #3b82f6;
  --ek-red: #ef4444;
  --ek-orange: #f59e0b;
  --ek-purple: #8b5cf6;
  --ek-border: rgba(0,0,0,.08);
  --ek-border-solid: #e5e7eb;
  --ek-shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --ek-shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --ek-radius: 10px;
  --ek-radius-lg: 14px;
  --ek-gradient: linear-gradient(135deg,#2bb42b 0%,#06b6d4 100%);
}

/* ======================== DARK MODE VARIABLES ================ */
html[data-theme="dark"] {
  --ek-bg: #0f1117;
  --ek-bg-card: #1a1d27;
  --ek-bg-header: #12141c;
  --ek-bg-input: #23262f;
  --ek-bg-hover: #252830;
  --ek-bg-stripe: #1e2029;
  --ek-text: #e4e7ed;
  --ek-text-sec: #9aa1b1;
  --ek-text-muted: #6b7280;
  --ek-border: rgba(255,255,255,.08);
  --ek-border-solid: #2d3039;
  --ek-shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --ek-shadow-md: 0 4px 16px rgba(0,0,0,.4);
}

/* ======================== DARK BODY & GLOBALS ================ */
html[data-theme="dark"] body { background: var(--ek-bg) !important; color: var(--ek-text) !important; }
html[data-theme="dark"] .container { background: var(--ek-bg-card) !important; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: var(--ek-text) !important; }
html[data-theme="dark"] a { color: #4ade80; }
html[data-theme="dark"] a:hover { color: #86efac; }
html[data-theme="dark"] p, html[data-theme="dark"] li, html[data-theme="dark"] td,
html[data-theme="dark"] th, html[data-theme="dark"] label, html[data-theme="dark"] b,
html[data-theme="dark"] strong, html[data-theme="dark"] code, html[data-theme="dark"] pre { color: inherit; }
html[data-theme="dark"] span:not(.rating_count):not(.count):not(.fn_rating_post_count) { color: inherit; }
html[data-theme="dark"] .grey { color: var(--ek-text-muted) !important; }

/* ======================== DARK INPUTS ======================== */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: var(--ek-bg-input) !important;
  color: var(--ek-text) !important;
  border-color: var(--ek-border-solid) !important;
}

/* ============================================================
   1. STICKY HEADER — Override style.css .header
   ============================================================ */
.header {
  background: var(--ek-bg-header) !important;
  border-radius: 5px 5px 0 0;
  padding: 10px 25px;
  transition: box-shadow .3s, border-radius .3s;
  z-index: 1000;
}
.header.is-sticky {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  border-radius: 0 !important;
  max-width: 1370px;
  margin: 0 auto !important;
  background: #1a1f2e !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,0,0,.35) !important;
  z-index: 9999 !important;
}
html[data-theme="dark"] .header { background: var(--ek-bg-header) !important; }
html[data-theme="dark"] .header.is-sticky {
  background: #12141c !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.6) !important;
}
body.header-stuck { padding-top: 60px; }

/* Header text always white */
.header a, .header span, .header .logo a,
.header.is-sticky a, .header.is-sticky span { color: #fff !important; }
/* Exclude dropdown from header white text */
.header .dropdown-menu a,
.header .dropdown-menu span,
.header .dropdown-menu-right a,
.header .dropdown-menu-right span { color: #334155 !important; }
.header .st_panel_user a,
.header .st_panel_user span,
.header .st_panel_user ul li a { color: #334155 !important; }
.header .st_panel_user ul li a:hover { color: var(--ek-accent) !important; }
.header .st_panel_user ul li a i,
.header .st_panel_user ul li a [class*="fa-"] { color: var(--ek-accent) !important; }
html[data-theme="dark"] .header .dropdown-menu a,
html[data-theme="dark"] .header .dropdown-menu span,
html[data-theme="dark"] .header .dropdown-menu-right a,
html[data-theme="dark"] .header .dropdown-menu-right span { color: #e2e8f0 !important; }
html[data-theme="dark"] .header .st_panel_user a,
html[data-theme="dark"] .header .st_panel_user span,
html[data-theme="dark"] .header .st_panel_user ul li a { color: #e2e8f0 !important; }
html[data-theme="dark"] .header .st_panel_user ul li a:hover { color: #4ade80 !important; }
.header .logo a span {
  background: #fff !important; color: var(--ek-accent) !important;
  padding: 4px 7px; border-radius: 5px; line-height: 1;
}
html[data-theme="dark"] .search form { background: var(--ek-bg-input) !important; }
html[data-theme="dark"] .search input { color: var(--ek-text) !important; }

/* ======================== THEME TOGGLE ======================= */
.ek-theme-toggle {
  position: relative; width: 44px; height: 24px;
  background: rgba(255,255,255,.2); border: none; border-radius: 12px;
  cursor: pointer; margin: 0 12px;
  transition: background .3s; display: inline-flex; align-items: center; padding: 0;
}
.ek-theme-toggle::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform .3s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
html[data-theme="dark"] .ek-theme-toggle { background: rgba(74,222,128,.25); }
html[data-theme="dark"] .ek-theme-toggle::before { transform: translateX(20px); background: #4ade80; }
.ek-theme-toggle i { position: absolute; font-size: 10px; color: #fff; top: 50%; transform: translateY(-50%); pointer-events: none; }
.ek-theme-toggle .fa-moon { right: 6px; }
.ek-theme-toggle .fa-sun { left: 6px; }

/* ======================== USER PANEL ==================== */
.user_panel .dropdown-menu-right { z-index: 10001 !important; }

/* ============================================================
   2. RIGHT SIDEBAR — Override style.css/media.css
   ============================================================ */
.content { min-width: 0; overflow: hidden; }
.aside_r { flex-shrink: 0 !important; }
.content img, .short_item_load img { max-width: 100%; height: auto; }

/* ======================== SIDEBAR DARK ======================= */
.menu_aside .main_nav { background: var(--ek-bg-header) !important; padding-bottom: 10px; }
.menu_aside .main_nav > li > a { color: rgba(255,255,255,.85) !important; border-left: 3px solid transparent; transition: all .2s; }
.menu_aside .main_nav > li > a:hover { background: rgba(255,255,255,.07); border-left-color: var(--ek-accent) !important; padding-left: 18px; }
.menu_aside .main_nav > li > a i { color: var(--ek-accent) !important; opacity: .8 !important; width: 22px; text-align: center; }
.sub_nav { background: rgba(0,0,0,.2) !important; }
.sub_nav li a { color: rgba(255,255,255,.7) !important; font-size: 12px !important; }
.sub_nav li a:hover { color: #fff !important; background: rgba(255,255,255,.05) !important; }
html[data-theme="dark"] .aside_bl { background: var(--ek-bg-card) !important; }
html[data-theme="dark"] .aside_title { background: var(--ek-bg-header) !important; }
html[data-theme="dark"] .sub_nav { background: rgba(0,0,0,.3) !important; }
html[data-theme="dark"] .inf_2 { border-color: var(--ek-border) !important; }
html[data-theme="dark"] .inf_2 .inf_content h4 a { color: var(--ek-text) !important; }

/* ======================== CAROUSEL DARK ====================== */
html[data-theme="dark"] .global_promo { background: var(--ek-bg-header) !important; }

/* ============================================================
   3. CARDS — Override style.css .short_item_load, .box_in
   ============================================================ */
.short_item_load {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 28px !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.box_in {
  background: var(--ek-bg-card) !important;
  border-radius: var(--ek-radius-lg) !important;
  border: 1px solid var(--ek-border-solid) !important;
  box-shadow: var(--ek-shadow-sm) !important;
  padding: 20px 22px !important;
  margin-bottom: 24px !important;
  border-bottom: none !important;
  transition: box-shadow .3s, border-color .3s;
  overflow: hidden;
}
.box_in:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); border-color: rgba(var(--ek-accent-rgb),.2) !important; }
html[data-theme="dark"] .short_item_load { background: transparent !important; border-color: transparent !important; }
html[data-theme="dark"] .box_in { border-color: var(--ek-border-solid) !important; }

/* Poster */
.short_item_top_content .poster img { max-width: 100%; height: auto; object-fit: contain !important; border-radius: 8px; }
.short_item_top_content .poster.mr-25 img { width: 200px !important; height: auto !important; object-fit: contain !important; }
html[data-theme="dark"] .short_item_load h3 a { color: var(--ek-text) !important; }
html[data-theme="dark"] .short_item_load h3 a:hover { color: var(--ek-accent) !important; }
html[data-theme="dark"] .reads, html[data-theme="dark"] .add_user { color: var(--ek-text-muted) !important; }
html[data-theme="dark"] .inf_3 { border-color: var(--ek-border) !important; color: var(--ek-text) !important; }

/* ============================================================
   4. CATEGORIES — Override style.css commas and visibility
   ============================================================ */
.category { font-size: 0 !important; }
.category > span { font-size: 14px !important; }
.category a {
  display: inline-flex !important; align-items: center;
  padding: 5px 14px !important; margin: 3px 4px 3px 0 !important;
  font-size: 11px !important; font-weight: 600 !important;
  color: var(--ek-accent) !important;
  background: rgba(var(--ek-accent-rgb),.08) !important;
  border: 1px solid rgba(var(--ek-accent-rgb),.2) !important;
  border-radius: 50px !important; text-transform: uppercase;
  letter-spacing: .02em; transition: all .2s; white-space: nowrap;
  text-decoration: none !important;
}
.category a:hover { background: var(--ek-accent) !important; color: #fff !important; text-decoration: none !important; }
/* Kill commas from style.css */
.short_item_bottom_info.block .reads div a::after { content: '' !important; display: none !important; }

/* ============================================================
   5. BUTTONS — Override components.css a.btn, button
   ============================================================ */
a.btn, .btn, button.btn {
  background: var(--ek-accent) !important; color: #fff !important;
  border: none !important; border-radius: 8px !important;
  padding: 8px 18px !important; font-size: 13px !important; font-weight: 600 !important;
  transition: filter .2s, box-shadow .2s !important; text-decoration: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; line-height: 1.4 !important;
}
a.btn:hover, .btn:hover, button.btn:hover {
  filter: brightness(1.1) !important;
  box-shadow: 0 2px 10px rgba(var(--ek-accent-rgb),.3) !important;
  transform: none !important;
}
/* Form submit areas */
.form_submit {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--ek-border);
}
/* Combo fields (side-by-side inputs) */
.combo, .form-group.combo {
  display: flex !important; gap: 10px; flex-wrap: wrap;
}
.combo_field { flex: 1; min-width: 180px; }
.combo_field input { width: 100%; }
/* Prevent .btn styles from leaking into DLEPush notifications */
.DLEPush-notification .DLEPush-close {
  background: none !important; background-image: none !important;
  border: none !important; box-shadow: none !important;
  transform: none !important; padding: 0 !important;
  min-width: 0 !important; border-radius: 0 !important;
  display: inline !important;
}
.DLEPush-notification .DLEPush-close:hover {
  transform: none !important; box-shadow: none !important;
  background: none !important;
}

/* ============================================================
   6. SPOILERS — DLE 19.1: SVG icons + native <details>
   Override engine.css and style.css .title_spoiler
   ============================================================ */
.title_spoiler {
  display: flex !important; align-items: center; gap: 8px;
  padding: 12px 18px !important;
  background: linear-gradient(135deg, rgba(var(--ek-accent-rgb),.1), rgba(59,130,246,.08)) !important;
  border: 1px solid rgba(var(--ek-accent-rgb),.2) !important;
  border-radius: var(--ek-radius) !important; cursor: pointer;
  font-weight: 600 !important; font-size: 14px; color: var(--ek-text);
  transition: background .2s, border-color .2s; user-select: none;
  margin-top: 4px;
}
.title_spoiler:hover {
  background: linear-gradient(135deg, rgba(var(--ek-accent-rgb),.18), rgba(59,130,246,.12)) !important;
  border-color: var(--ek-accent) !important;
}
/* DLE 19.1 SVG icons in spoilers */
.title_spoiler svg {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--ek-accent); transition: transform .2s;
  vertical-align: middle; margin-top: -2px; margin-right: 4px;
}
/* Hide old GIF icons */
.title_spoiler img,
.title_spoiler img[src*="spoiler"],
img[id^="image-spoiler"] {
  display: none !important; width: 0 !important; height: 0 !important;
  visibility: hidden !important; position: absolute !important;
}
/* CSS chevron for old-style spoilers without SVG */
.title_spoiler:not(:has(svg))::before {
  content: '\f054'; font-family: 'Font Awesome 5 Pro','Font Awesome 5 Free'; font-weight: 900;
  font-size: 11px; color: var(--ek-accent); transition: transform .15s; flex-shrink: 0;
}
/* Spoiler content */
.text_spoiler {
  margin-top: 4px !important; margin-bottom: 4px; padding: 14px 18px !important;
  background: var(--ek-bg-hover) !important;
  border: 1px solid var(--ek-border-solid) !important;
  border-radius: var(--ek-radius) !important;
}

/* Spoiler dark mode */
html[data-theme="dark"] .title_spoiler,
html[data-theme="dark"] details.dle-spoiler > summary {
  background: linear-gradient(135deg, rgba(var(--ek-accent-rgb),.12), rgba(59,130,246,.08)) !important;
  border-color: rgba(var(--ek-accent-rgb),.25) !important; color: var(--ek-text) !important;
}
html[data-theme="dark"] .text_spoiler,
html[data-theme="dark"] details.dle-spoiler > .text_spoiler {
  background: var(--ek-bg-hover) !important; border-color: var(--ek-border-solid) !important; color: var(--ek-text) !important;
}
html[data-theme="dark"] .quote, html[data-theme="dark"] blockquote {
  background: var(--ek-bg-stripe) !important; color: var(--ek-text) !important; border-color: var(--ek-border) !important;
}

/* ============================================================
   7. DLE 19.1 NEW CLASSES
   ============================================================ */
/* Code copy button (DLE 19.0+) */
.clipboard-copy-link { display: inline-flex; align-items: center; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background .2s; }
.clipboard-copy-link:hover { background: rgba(var(--ek-accent-rgb),.1); }
.clipboard-copy-link svg { color: #6c838e; vertical-align: middle; margin-top: -3px; width: 16px; height: 16px; }
html[data-theme="dark"] .clipboard-copy-link svg { color: var(--ek-text-muted); }

/* Quote link (DLE 18.1+) */
.quote_link { float: right; }
.quote_link svg { color: #6c838e; vertical-align: middle; width: 16px; height: 16px; }
html[data-theme="dark"] .quote_link svg { color: var(--ek-text-muted); }

/* Image styles (DLE 19.0+) */
.image-bordered { border: 1px solid var(--ek-border-solid); border-radius: 4px; }
.image-shadows { box-shadow: rgb(9 30 66 / 25%) 0 4px 8px -2px, rgb(9 30 66 / 8%) 0 0 0 1px; border-radius: 4px; }
.image-padded { padding: 0.5rem; }

/* Profile link in comments (DLE 19.0+) */
.comments-user-profile { font-weight: bold; cursor: pointer; color: var(--ek-accent); }
html[data-theme="dark"] .comments-user-profile { color: #4ade80; }

/* Hidden text block (DLE 19.1) */
.dle-hidden-text {
  padding: 14px 18px; margin: 8px 0;
  background: rgba(var(--ek-accent-rgb),.06);
  border: 1px dashed rgba(var(--ek-accent-rgb),.3);
  border-radius: var(--ek-radius);
}
html[data-theme="dark"] .dle-hidden-text {
  background: rgba(var(--ek-accent-rgb),.08);
  border-color: rgba(var(--ek-accent-rgb),.2);
}

/* MathML / LaTeX formulas (DLE 19.1) */
.MathJax, .MathJax_Display { overflow-x: auto; overflow-y: hidden; }

/* Quick edit dialog fixes for jQuery 4 (DLE 19.0+) */
.dle-popup-quickedit .ui-dialog-titlebar-close,
.ui-dialog-titlebar .ui-button-text { text-indent: -200px; }
.ui-dialog-titlebar .ui-button-text::before {
  content: "\f00d"; font-family: 'Font Awesome 5 Pro'; font-weight: 900;
  text-indent: 0; position: absolute; inset: 0; display: grid; place-items: center;
}
.dle-popup-quickedit .ui-dialog-content { height: calc(100vh - 170px) !important; }
.quick-edit-text { width: 100%; }
.xfieldsrow::after { content: ''; clear: both; display: table; }

/* ============================================================
   8. FULLSTORY — Override style.css info table
   ============================================================ */
.short_item_top h1 { font-size: 20px !important; line-height: 1.4; }
.short_item_bottom_info.block .reads {
  display: flex !important; flex-direction: column !important; width: 100%;
}
.short_item_bottom_info.block .reads > div {
  display: flex !important; align-items: center; flex-wrap: wrap;
  padding: 10px 20px !important; border-bottom: 1px solid var(--ek-border);
  font-size: 14px; color: var(--ek-text) !important; transition: background .2s;
}
.short_item_bottom_info.block .reads > div:last-child { border-bottom: none; }
.short_item_bottom_info.block .reads > div:hover { background: rgba(var(--ek-accent-rgb),.04); }
.short_item_bottom_info.block .reads > div:nth-child(2n+1) { background: var(--ek-bg-stripe) !important; }
.short_item_bottom_info.block .reads > div > span:first-child {
  font-weight: 600; min-width: 160px; color: var(--ek-text-sec) !important;
}
html[data-theme="dark"] .short_item_bottom_info.block .reads > div { color: var(--ek-text) !important; }
html[data-theme="dark"] .short_item_bottom_info.block .reads > div:nth-child(2n+1) { background: var(--ek-bg-stripe) !important; }
.short_item_bottom.block .inf_3 { text-align: center; border: none !important; padding: 10px 0 !important; }

/* ======================== TAGS =============================== */
.ek-tags-block {
  text-align: center; padding: 16px 20px; margin: 16px 0;
  background: var(--ek-bg-hover); border: 1px solid var(--ek-border-solid); border-radius: var(--ek-radius);
}
.ek-tags-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--ek-text-sec); margin-right: 4px; }
.ek-tags-label i { color: var(--ek-purple); }
.ek-tags-block a {
  display: inline-flex !important; padding: 4px 12px; margin: 3px;
  font-size: 11px !important; font-weight: 500; color: var(--ek-purple) !important;
  background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.2);
  border-radius: 50px; text-decoration: none !important; transition: all .2s;
}
.ek-tags-block a:hover { background: var(--ek-purple); color: #fff !important; }
html[data-theme="dark"] .ek-tags-block { background: var(--ek-bg-stripe); border-color: var(--ek-border-solid); }

/* ======================== INFO BLOCKS ======================== */
.ek-info-block {
  display: flex; align-items: stretch; gap: 0;
  padding: 0; margin: 10px 0;
  border-radius: var(--ek-radius); border: 1px solid var(--ek-border-solid);
  background: var(--ek-bg-card); font-size: 13px; line-height: 1.5;
  overflow: hidden;
}
.ek-info-icon {
  flex-shrink: 0; width: 44px; min-height: 100%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.ek-info-block.info .ek-info-icon { background: rgba(59,130,246,.15); color: var(--ek-blue); }
.ek-info-block.warning .ek-info-icon { background: rgba(245,158,11,.15); color: var(--ek-orange); }
.ek-info-block.danger .ek-info-icon { background: rgba(239,68,68,.15); color: var(--ek-red); }
.ek-info-block.purple .ek-info-icon { background: rgba(139,92,246,.15); color: var(--ek-purple); }
.ek-info-text-center { padding: 12px 16px; flex: 1; min-width: 0; }
.ek-info-block.warning .ek-info-text-center { line-height: 1.35; }
.ek-info-block.warning .ek-info-text-center br { display: block; content: ''; margin: 2px 0; }

/* ======================== DOWNLOAD CARDS ===================== */
.ek-download-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin: 8px auto; max-width: 520px;
  background: var(--ek-bg-card); border: 1px solid var(--ek-border-solid);
  border-radius: var(--ek-radius); transition: all .3s;
}
.ek-download-card:hover { border-color: var(--ek-accent); box-shadow: 0 4px 16px rgba(var(--ek-accent-rgb),.12); transform: translateY(-2px); }
.ek-dl-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0;
}
.ek-dl-icon.torrent { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.ek-dl-icon.telegram-vip { background: linear-gradient(135deg,#f59e0b,#f97316); }
.ek-dl-icon.telegram-boosty { background: linear-gradient(135deg,#06b6d4,#0ea5e9); }
.ek-dl-icon.telegram { background: linear-gradient(135deg,#0088cc,#229ED9); }
.ek-dl-icon.cloud { background: linear-gradient(135deg,#10b981,#059669); }
.ek-dl-icon.mega { background: linear-gradient(135deg,#d93025,#ea4335); }
.ek-dl-icon.default { background: linear-gradient(135deg,#6b7280,#9ca3af); }
.ek-dl-info { flex: 1; min-width: 0; }
.ek-dl-title { font-weight: 700; font-size: 14px; color: var(--ek-text); }
.ek-dl-sub { font-size: 12px; color: var(--ek-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ek-download-card .btn { padding: 6px 18px !important; font-size: 12px !important; white-space: nowrap; flex-shrink: 0; }

/* Override style.css download_file */
.download_file {
  text-align: center; padding: 16px; margin: 8px auto; max-width: 520px;
  background: var(--ek-bg-hover) !important; color: var(--ek-text) !important;
  border: 1px dashed var(--ek-border-solid) !important; border-radius: var(--ek-radius) !important;
  display: block !important;
}
.download_file div { font-size: 13px; color: var(--ek-text-sec); margin-bottom: 10px; }
html[data-theme="dark"] .download_file { background: var(--ek-bg-stripe) !important; border-color: var(--ek-border-solid) !important; }

/* TeraBox expandable info */
.ek-terabox-info {
  display: none; padding: 10px 14px; margin-top: 8px;
  background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.2);
  border-radius: 8px; font-size: 12px; line-height: 1.6; text-align: center; color: var(--ek-text);
}
.ek-terabox-info.active { display: block; }

/* ============================================================
   9. RATING — Override style.css .fn_post_rate
   ============================================================ */
.fn_post_rate { text-align: center; margin: 20px auto !important; max-width: 520px; }
.fn_post_rate .rate_like-dislike {
  display: inline-flex !important; gap: 0; border: 2px solid var(--ek-border-solid);
  border-radius: 50px; overflow: hidden; background: var(--ek-bg-card);
  justify-content: center !important; flex-wrap: wrap;
}
.fn_post_rate .rate_like-dislike a {
  display: inline-flex !important; align-items: center; gap: 6px;
  padding: 10px 20px !important; font-size: 13px !important; font-weight: 600 !important;
  transition: background .2s !important; text-decoration: none !important;
  background: transparent !important; border: none !important;
  border-radius: 0 !important; transform: none !important;
  box-shadow: none !important; flex: none !important;
}
.fn_post_rate .rate_like-dislike a:hover { transform: none !important; box-shadow: none !important; }
.fn_post_rate .rate_like-dislike a:first-child {
  color: var(--ek-red) !important;
  border-right: 1px solid var(--ek-border-solid) !important;
}
.fn_post_rate .rate_like-dislike a:first-child:hover { background: rgba(239,68,68,.12) !important; }
.fn_post_rate .rate_like-dislike a:last-child { color: var(--ek-accent) !important; }
.fn_post_rate .rate_like-dislike a:last-child:hover { background: rgba(var(--ek-accent-rgb),.12) !important; }
.fn_post_rate .rate_like-dislike .fn_rating_post_count { font-weight: 700; font-size: 15px; }
.fn_post_rate .rate_like-dislike a [class*="fa-"] { box-shadow: none !important; background: transparent !important; padding: 0 !important; }
html[data-theme="dark"] .fn_post_rate .rate_like-dislike { border-color: var(--ek-border-solid); background: var(--ek-bg-card); }

/* Rating badge on poster — Override style.css position */
.rating_count {
  position: absolute; top: 8px; left: 8px; right: auto !important;
  padding: 3px 10px; background: rgba(0,0,0,.65); color: #fff;
  font-size: 12px; font-weight: 700; border-radius: 6px; z-index: 2;
  width: auto !important; height: auto !important;
}

/* ======================== SOCIAL SIDEBAR ===================== */
.ek-social-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin: 6px 10px;
  border-radius: var(--ek-radius); border: 1px solid var(--ek-border-solid);
  text-decoration: none !important; font-weight: 600; font-size: 13px;
  transition: all .3s; color: var(--ek-text) !important;
}
.ek-social-btn:hover { transform: translateY(-2px); box-shadow: var(--ek-shadow-md); }
.ek-social-btn i { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; flex-shrink: 0; }
.ek-social-btn .icon-max { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.ek-social-btn .icon-tg { background: linear-gradient(135deg,#0088cc,#229ED9); }
.ek-social-btn .icon-vk { background: linear-gradient(135deg,#2787f5,#0077ff); }
.ek-social-btn .icon-boosty { background: linear-gradient(135deg,#f97316,#ef4444); }
html[data-theme="dark"] .ek-social-btn { border-color: var(--ek-border-solid); color: var(--ek-text) !important; }

/* ============================================================
   10. USER PROFILE — Override style.css .usinf
   ============================================================ */
/* ============================================================
   12. FOOTER — From improvements.css (now consolidated)
   ============================================================ */
.site-footer {
  background: var(--ek-bg-header); color: #c8cdd3;
  padding: 0; margin-top: 0; border-radius: 0 0 5px 5px;
}
.footer-col h4 {
  color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: .5px; position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 30px; height: 2px; background: var(--ek-accent); border-radius: 1px;
}
.footer-col p { font-size: 13px; line-height: 1.7; margin-bottom: 8px; color: #8a919a; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #9ea5ae; text-decoration: none; font-size: 13px; font-weight: 400; transition: color .2s, padding-left .2s; display: inline-block; }
.footer-col ul li a:hover { color: var(--ek-accent); padding-left: 4px; }
.footer-col .footer-email a { color: var(--ek-accent); font-weight: 500; }
.footer-col .footer-logo { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; display: inline-block; }
.footer-col .footer-logo span { background: var(--ek-accent); color: #fff; display: inline-block; margin-left: 4px; line-height: 1; padding: 4px 6px; border-radius: 4px; font-size: 16px; }
.footer-bottom p { font-size: 12px; color: #6b727b; margin-bottom: 6px; line-height: 1.7; }
.footer-age-warning { color: #ff6b6b !important; font-weight: 600; font-size: 12px !important; }
.footer-copyright { color: #555b64 !important; font-size: 11px !important; }

html[data-theme="dark"] .site-footer { background: var(--ek-bg-header) !important; }

/* ============================================================
   13. BREADCRUMBS — From improvements.css
   ============================================================ */
.speedbar { padding: 0 25px; }
.breadcrumb-nav { display: flex; flex-wrap: wrap; list-style: none; padding: 10px 0; margin: 0; font-size: 13px; color: #7c848d; }
.breadcrumb-nav a { color: var(--ek-accent); text-decoration: none; font-weight: 500; transition: color .2s; }
.breadcrumb-nav a:hover { color: #1e8a1e; text-decoration: underline; }
.speedbar .over { font-size: 13px; color: #7c848d; padding: 10px 0; }
.speedbar .over a { color: var(--ek-accent); }
.speedbar .over a:hover { text-decoration: underline; }
html[data-theme="dark"] .breadcrumb-nav { color: var(--ek-text-muted); }
html[data-theme="dark"] .speedbar .over { color: var(--ek-text-muted); }

/* ============================================================
   14. AD BLOCKS — From improvements.css
   ============================================================ */
.ad-label { display: inline-block; font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 4px; background: rgba(0,0,0,.04); padding: 2px 8px; border-radius: 3px; }

/* ============================================================
   15. PD AGREEMENT — From improvements.css
   ============================================================ */
.pd-agreement { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; color: #555; margin: 8px 0; cursor: pointer; padding: 12px 14px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; transition: border-color .2s; }
.pd-agreement:hover { border-color: var(--ek-accent); }
.pd-agreement input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--ek-accent); cursor: pointer; }
.pd-agreement a { color: var(--ek-accent); font-weight: 500; text-decoration: underline; }
.pd-agreement-error { border-color: var(--ek-red) !important; background: #fff5f5; }

/* ============================================================
   16. MISC DARK OVERRIDES
   ============================================================ */
html[data-theme="dark"] .section_title span { color: var(--ek-accent) !important; }
html[data-theme="dark"] .seo, html[data-theme="dark"] .seo p { color: var(--ek-text-sec) !important; }
html[data-theme="dark"] .content_wrap { background: transparent; }
html[data-theme="dark"] .fn_comment_item { border-color: var(--ek-border) !important; }
html[data-theme="dark"] .fn_comm_item_top a { color: var(--ek-text) !important; }
html[data-theme="dark"] .fn_dash_comm .dropdown-menu { background: var(--ek-bg-card) !important; border-color: var(--ek-border) !important; }
html[data-theme="dark"] .fn_dash_comm .dropdown-menu a { color: var(--ek-text) !important; }
html[data-theme="dark"] .fn_dash_comm .dropdown-menu a:hover { background: var(--ek-bg-hover) !important; }

.screens_cash { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 15px 0; }
.screens_cash a img { border-radius: 8px !important; }

/* ============================================================
   17. RESPONSIVE — Supplements media.css
   ============================================================ */
@media (max-width: 992px) {
  .short_item_bottom_info.block .reads > div > span:first-child { min-width: 130px; }
  .ui-c1 { flex: 0 0 150px; }
}
@media (max-width: 768px) {
  .short_item_top_content { flex-direction: column; }
  .ek-download-card { max-width: 100%; }
  .usinf > li { flex-direction: column; }
  .ui-c1 { flex: none; margin-bottom: 4px; }
  body.header-stuck { padding-top: 54px; }
  .footer-main { grid-template-columns: repeat(2, 1fr); padding: 28px 16px 16px; gap: 24px; }
  .speedbar { padding: 0 16px; }
  .fn_post_rate .rate_like-dislike a { padding: 8px 14px !important; font-size: 13px !important; }
}
@media (max-width: 480px) {
  .footer-main { grid-template-columns: 1fr; gap: 20px; }
}

/* ======================== PERFORMANCE ======================== */
.short_item_load:nth-child(n+6) { content-visibility: auto; contain-intrinsic-size: 0 280px; }

/* ============================================================
   v5.2 — COMPREHENSIVE FULLSTORY + SHORTSTORY + FIXES
   ============================================================ */

/* ====================== FULLSTORY HERO ====================== */
.ek-full-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }

/* --- Poster card --- */
.ek-poster-card { position: relative; flex: 0 0 220px; max-width: 220px; }
.ek-poster-link {
  display: block; position: relative; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); transition: transform .35s ease, box-shadow .35s;
}
.ek-poster-link:hover { transform: scale(1.03); box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.ek-poster-link img { display: block; width: 100%; height: auto; border-radius: 14px; }
.ek-poster-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; font-size: 28px; color: #fff;
}
.ek-poster-link:hover .ek-poster-overlay { opacity: 1; }

/* Rating badge — top-left */
.ek-poster-card .rating_count {
  position: absolute !important; top: 10px !important; left: 10px !important; right: auto !important;
  z-index: 5; padding: 4px 10px !important; border-radius: 8px !important;
  background: linear-gradient(135deg, #f59e0b, #f97316) !important;
  color: #fff !important; font-size: 12px !important; font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(245,158,11,.4);
  width: auto !important; height: auto !important; display: inline-flex !important; align-items: center;
  line-height: 1.2 !important;
}

/* Size — displayed UNDER poster, not overlaying */
.ek-size-under {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 8px; padding: 5px 12px;
  background: var(--ek-bg-hover); border: 1px solid var(--ek-border-solid);
  color: var(--ek-text-sec); font-size: 12px; font-weight: 700;
  border-radius: 8px; text-align: center;
}
.ek-size-under i { font-size: 11px; opacity: .6; }
html[data-theme="dark"] .ek-size-under { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }

/* --- Like/dislike under poster --- */
.ek-poster-rate { display: flex; justify-content: center; margin-top: 12px; }
.ek-rate-compact {
  display: inline-flex; align-items: center; gap: 0;
  border: 2px solid var(--ek-border-solid); border-radius: 50px;
  overflow: hidden; background: var(--ek-bg-card);
}
.ek-rate-compact i { cursor: pointer; padding: 7px 10px; transition: all .2s; font-size: 14px; }
.ek-rate-compact span { padding: 4px 6px; font-weight: 700; font-size: 13px; min-width: 20px; text-align: center; }
.ek-rate-compact .ek-rate-num { cursor: pointer; }
html[data-theme="dark"] .ek-rate-compact { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }

/* --- Info table --- */
.ek-full-info { flex: 1; min-width: 0; }
.ek-info-table {
  display: flex; flex-direction: column;
  border: 1px solid var(--ek-border-solid); border-radius: 12px;
  overflow: hidden; background: var(--ek-bg-card);
}
.ek-info-row {
  display: flex; align-items: center; padding: 10px 18px;
  border-bottom: 1px solid var(--ek-border); font-size: 14px;
}
.ek-info-row:last-child { border-bottom: none; }
.ek-info-row:nth-child(even) { background: var(--ek-bg-stripe); }
.ek-info-label {
  font-weight: 600; min-width: 150px; color: var(--ek-text-sec);
  display: inline-flex; align-items: center; gap: 8px;
}
.ek-info-label i { color: var(--ek-accent); opacity: .7; font-size: 13px; width: 16px; text-align: center; }
.ek-info-value { color: var(--ek-text); }
html[data-theme="dark"] .ek-info-table { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ek-info-row { border-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .ek-info-row:nth-child(even) { background: rgba(255,255,255,.03); }

/* Category row — pills */
.ek-cat-row { flex-wrap: wrap; gap: 4px; padding: 10px 16px !important; }
.ek-cat-row .category,
.ek-cat-row > .category { font-size: 0 !important; display: flex; flex-wrap: wrap; gap: 4px; }
.ek-cat-row .category a,
.ek-cat-row a {
  display: inline-block !important; padding: 3px 10px !important;
  font-size: 11px !important; font-weight: 700 !important; color: #fff !important;
  background: var(--ek-accent) !important; border: none !important; border-radius: 50px !important;
  text-transform: uppercase; letter-spacing: .03em; text-decoration: none !important;
  transition: all .2s; white-space: nowrap; line-height: 1.5;
}
.ek-cat-row .category a:hover,
.ek-cat-row a:hover { opacity: .85; transform: translateY(-1px); }
.ek-cat-row .category > span:first-child { display: none !important; }
.ek-cat-row .category a::after { display: none !important; }

/* ===================== КИНОПОИСК BUTTON ===================== */
.ek-kp-btn {
  display: flex !important; align-items: center; gap: 12px;
  padding: 10px 18px !important; margin-top: 12px; width: 100%;
  background: linear-gradient(135deg, #ff6b00, #ff8534) !important;
  border-radius: 12px !important; color: #fff !important;
  text-decoration: none !important; font-weight: 700 !important; font-size: 14px !important;
  transition: all .3s !important; box-shadow: 0 4px 16px rgba(255,107,0,.3);
}
.ek-kp-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(255,107,0,.45) !important;
}
.ek-kp-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.2); display: flex;
  align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.ek-kp-text { flex: 1; }
.ek-kp-arrow { font-size: 12px; opacity: .7; }

/* ===================== STORY TEXT ===================== */
.ek-story-text {
  text-align: left !important; line-height: 1.75; word-wrap: break-word;
  overflow-wrap: break-word; font-size: 14px;
}
.ek-story-text p { margin-bottom: 10px; }
.ek-story-text img { border-radius: 8px; max-width: 100%; height: auto; }
/* Kill any centering inside story */
.short_item_bottom .ek-story-text,
.short_item_bottom .ek-story-text * { text-align: left !important; }
.short_item_bottom .ek-story-text center,
.short_item_bottom .ek-story-text [align="center"] { text-align: left !important; }

/* ===================== SPOILERS — INSTANT ===================== */
.ek-spoiler-wrap { margin: 15px 0; }
.ek-spoiler { border: 1px solid var(--ek-border-solid); border-radius: 12px; overflow: hidden; }
.ek-spoiler-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; cursor: pointer; user-select: none;
  background: var(--ek-bg-hover); font-size: 14px; font-weight: 600; color: var(--ek-text);
  transition: background .15s;
}
.ek-spoiler-head:hover { background: rgba(var(--ek-accent-rgb),.08); }
.ek-spoiler-chevron { font-size: 11px; color: var(--ek-accent); transition: transform .15s; }
.ek-spoiler.open .ek-spoiler-chevron { transform: rotate(90deg); }
/* INSTANT open/close — no max-height animation */
.ek-spoiler-body { display: none; background: var(--ek-bg-card); }
.ek-spoiler.open .ek-spoiler-body { display: block; }
html[data-theme="dark"] .ek-spoiler { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ek-spoiler-head { background: rgba(255,255,255,.04); color: var(--ek-text); }
html[data-theme="dark"] .ek-spoiler-body { background: rgba(255,255,255,.02); }
html[data-theme="dark"] .ek-spoiler-body code { color: #a5f3fc; }

/* Also fix native DLE <details> spoilers */
details.dle-spoiler { border: 1px solid var(--ek-border-solid); border-radius: 12px; overflow: hidden; margin: 12px 0; }
details.dle-spoiler summary.title_spoiler {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; cursor: pointer; user-select: none;
  background: var(--ek-bg-hover); font-size: 14px; font-weight: 600;
  list-style: none;
}
details.dle-spoiler summary.title_spoiler::-webkit-details-marker { display: none; }
details.dle-spoiler summary.title_spoiler::before {
  content: '\f054'; font-family: 'Font Awesome 5 Pro','Font Awesome 5 Free'; font-weight: 900;
  font-size: 11px; color: var(--ek-accent); transition: transform .15s; display: inline-block;
}
details.dle-spoiler[open] summary.title_spoiler::before { transform: rotate(90deg); }
details.dle-spoiler summary.title_spoiler img { display: none !important; }
details.dle-spoiler .text_spoiler { padding: 14px 18px; }
html[data-theme="dark"] details.dle-spoiler { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] details.dle-spoiler summary.title_spoiler { background: rgba(255,255,255,.04); }

/* ===================== TAGS ===================== */
.ek-tags-wrap {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 14px 0; margin: 12px 0;
  border-top: 1px solid var(--ek-border); border-bottom: 1px solid var(--ek-border);
}
.ek-tags-icon { color: var(--ek-text-muted); font-size: 14px; margin-right: 4px; }
.ek-tags-wrap a {
  display: inline-block !important; padding: 4px 12px !important;
  font-size: 12px !important; font-weight: 500 !important;
  color: var(--ek-text-sec) !important; background: var(--ek-bg-hover) !important;
  border: 1px solid var(--ek-border-solid) !important; border-radius: 8px !important;
  transition: all .2s !important; text-decoration: none !important;
}
.ek-tags-wrap a:hover {
  color: #fff !important; background: var(--ek-accent) !important;
  border-color: var(--ek-accent) !important;
}
html[data-theme="dark"] .ek-tags-wrap { border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .ek-tags-wrap a { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.1) !important; color: rgba(255,255,255,.6) !important; }
html[data-theme="dark"] .ek-tags-wrap a:hover { background: var(--ek-accent) !important; color: #fff !important; }

/* ===================== DOWNLOAD BUTTON ===================== */
.ek-dl-btn {
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 9px 22px !important; min-width: 100px;
  font-size: 12px !important; font-weight: 700 !important;
  color: #fff !important; text-decoration: none !important;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: none !important; border-radius: 10px !important;
  transition: all .25s !important; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(99,102,241,.3);
  letter-spacing: .03em; text-transform: uppercase;
}
.ek-dl-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(99,102,241,.45) !important;
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
}

/* ===================== SCREENSHOTS GRID ===================== */
.ek-screens-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.ek-screens-grid a { display: block; border-radius: 10px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.ek-screens-grid a:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.ek-screens-grid img { display: block; width: 100%; height: 140px; object-fit: cover; }

/* ===================== EDIT NOTICE ===================== */
.ek-edit-notice {
  padding: 10px 18px; margin: 12px 0; font-size: 12px; color: var(--ek-text-muted);
  background: var(--ek-bg-hover); border-radius: 8px; border-left: 3px solid var(--ek-blue);
}
html[data-theme="dark"] .ek-edit-notice { background: rgba(255,255,255,.03); }

/* ===================== RATING BAR (fn_post_rate) ===================== */
.fn_post_rate .ek-rate-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 50px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .25s; border: 2px solid var(--ek-border-solid);
  background: var(--ek-bg-card); color: var(--ek-text);
}
.fn_post_rate .ek-rate-down:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.06); }
.fn_post_rate .ek-rate-up:hover { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.06); }
.fn_post_rate .ek-rate-btn .fn_rating_post_count { font-weight: 800; }
html[data-theme="dark"] .fn_post_rate .ek-rate-btn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: rgba(255,255,255,.8); }
html[data-theme="dark"] .fn_post_rate .ek-rate-down:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.1); }
html[data-theme="dark"] .fn_post_rate .ek-rate-up:hover { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.1); }

/* ===================== AD LABEL HIDE ===================== */
.ad-label, .ad-block .ad-label { display: none !important; }
.ad-block { border: none !important; padding: 0 !important; background: transparent !important; }

   ============================================================ */
.ek-card {
  display: flex !important;
  flex-direction: column !important;
  background: var(--ek-bg-card) !important;
  border: 1px solid var(--ek-border-solid) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  margin-bottom: 28px !important;
  transition: box-shadow .25s, border-color .25s;
  box-shadow: 0 2px 12px rgba(0,0,0,.08) !important;
}
.ek-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12) !important; border-color: rgba(var(--ek-accent-rgb),.25) !important; }
.ek-card-actions i { cursor: pointer; font-size: 14px; color: var(--ek-text-muted); transition: color .2s; }
.ek-card-actions i:hover { color: var(--ek-accent); }
/* Card body: flex row with poster + content */
.ek-card-body { display: flex !important; gap: 16px; align-items: flex-start; }
/* Card content: right column with meta, cats, description */
.ek-card-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
/* Card meta: views, comments, date */
.ek-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ek-text-muted); }
.ek-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ek-card-meta i { font-size: 12px; opacity: .7; }
/* Card description */
.ek-card-desc { font-size: 14px; line-height: 1.6; color: var(--ek-text-sec); }
.ek-card-left { flex: 0 0 130px; display: flex; flex-direction: column; align-items: center; }
.ek-card-left .ek-poster-rate { margin-top: 10px; }
.ek-card-left .ek-size-under { margin-top: 6px; width: 100%; font-size: 11px; padding: 4px 8px; }

/* Compact category pills in shortstory */
.ek-card-cats { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0; flex: 1; min-width: 0; }
.ek-card-cats a {
  display: inline-block; padding: 2px 8px; font-size: 10px; font-weight: 700;
  color: var(--ek-accent); background: rgba(var(--ek-accent-rgb),.08);
  border: 1px solid rgba(var(--ek-accent-rgb),.15); border-radius: 50px;
  text-decoration: none; text-transform: uppercase; letter-spacing: .03em;
  transition: all .2s; white-space: nowrap; line-height: 1.6;
}
.ek-card-cats a:hover { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); }
.ek-card-cats a::after { display: none !important; }
/* hide comma separators */
.ek-card-cats .category { font-size: 0; }
.ek-card-cats .category a { font-size: 10px; }

html[data-theme="dark"] .ek-card { background: var(--ek-bg-card) !important; border-color: rgba(255,255,255,.15) !important; box-shadow: 0 2px 8px rgba(0,0,0,.4) !important; }
html[data-theme="dark"] .ek-card:hover { border-color: rgba(var(--ek-accent-rgb),.35) !important; box-shadow: 0 6px 28px rgba(0,0,0,.5) !important; }
html[data-theme="dark"] .ek-card-desc { color: rgba(255,255,255,.55); }
html[data-theme="dark"] .ek-card-meta { color: rgba(255,255,255,.4); }
html[data-theme="dark"] .ek-card-actions i { color: rgba(255,255,255,.3); }
html[data-theme="dark"] .ek-card-actions i:hover { color: var(--ek-accent); }
html[data-theme="dark"] .ek-card-footer { border-color: rgba(255,255,255,.12) !important; }
html[data-theme="dark"] .ek-card-cats a { color: var(--ek-accent); background: rgba(var(--ek-accent-rgb),.1); border-color: rgba(var(--ek-accent-rgb),.2); }

/* "Подробнее" button */
.ek-more-btn {
  display: inline-flex !important; align-items: center; gap: 8px;
  padding: 7px 18px !important; font-size: 12px !important; font-weight: 700 !important;
  color: var(--ek-accent) !important; text-decoration: none !important;
  background: rgba(var(--ek-accent-rgb),.06) !important;
  border: 2px solid rgba(var(--ek-accent-rgb),.18) !important;
  border-radius: 50px !important; transition: all .25s !important; white-space: nowrap;
}
.ek-more-btn:hover {
  background: var(--ek-accent) !important; color: #fff !important;
  border-color: var(--ek-accent) !important;
  box-shadow: 0 4px 16px rgba(var(--ek-accent-rgb),.3) !important;
}
.ek-more-btn i { font-size: 10px; transition: transform .25s; }
.ek-more-btn:hover i { transform: translateX(3px); }

/* ============================================================
   DROPDOWN / ADMIN PANEL — BOTH THEMES
   ============================================================ */
.user_panel .dropdown-menu-right,
.dropdown-menu.dropdown-menu-right {
  background: #fff !important; border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important; box-shadow: 0 10px 40px rgba(0,0,0,.15) !important;
  padding: 8px !important; min-width: 240px; z-index: 10001;
}
.st_panel_user ul { list-style: none; margin: 0; padding: 0; }
.st_panel_user ul li a {
  display: flex !important; align-items: center; gap: 10px;
  padding: 10px 14px !important; border-radius: 8px; font-size: 14px !important;
  color: #334155 !important; text-decoration: none !important; transition: all .15s;
  font-weight: 500 !important; white-space: nowrap;
}
.st_panel_user ul li a:hover { background: #f1f5f9 !important; color: var(--ek-accent) !important; }
.st_panel_user ul li a i,
.st_panel_user ul li a [class*="fa-"] { 
  width: 20px; text-align: center; color: var(--ek-accent) !important; 
  opacity: .7; font-size: 15px; flex-shrink: 0; margin-right: 0 !important; 
}

html[data-theme="dark"] .user_panel .dropdown-menu-right,
html[data-theme="dark"] .dropdown-menu.dropdown-menu-right {
  background: #1e293b !important; border-color: rgba(255,255,255,.1) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,.5) !important;
}
html[data-theme="dark"] .st_panel_user ul li a { color: #e2e8f0 !important; }
html[data-theme="dark"] .st_panel_user ul li a:hover { background: rgba(255,255,255,.06) !important; color: #4ade80 !important; }
html[data-theme="dark"] .st_panel_user ul li a i,
html[data-theme="dark"] .st_panel_user ul li a [class*="fa-"] { color: #4ade80 !important; }

/* Login form in dropdown */
.dropdown-form input[type="text"],
.dropdown-form input[type="password"] {
  width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; background: #fff; color: #1e293b; transition: border-color .2s;
}
.dropdown-form input:focus { border-color: var(--ek-accent); outline: none; }
.login_form__foot { display: flex; justify-content: space-between; margin-top: 10px; }
.login_form__foot a { font-size: 12px; color: var(--ek-accent); text-decoration: none; }
html[data-theme="dark"] .dropdown-form input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #e2e8f0; }

/* ============================================================
   DARK THEME — COMPREHENSIVE OVERRIDES
   ============================================================ */
html[data-theme="dark"] .short_item_load,
html[data-theme="dark"] .short_item_load.block {
  background: transparent !important; border-color: transparent !important;
}
html[data-theme="dark"] .short_item_top { border-color: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 { color: #f1f5f9 !important; }
html[data-theme="dark"] .section_title { color: #f1f5f9; }
html[data-theme="dark"] .line_section_title { color: #f1f5f9; }
html[data-theme="dark"] .line_section_title span { color: var(--ek-accent); }
html[data-theme="dark"] .short_item_bottom { border-color: rgba(255,255,255,.06) !important; background: transparent !important; }
html[data-theme="dark"] .inf_3 { color: rgba(255,255,255,.7); }
html[data-theme="dark"] .ek-story-text { color: rgba(255,255,255,.75); }
html[data-theme="dark"] .ek-story-text b,
html[data-theme="dark"] .ek-story-text strong { color: rgba(255,255,255,.9); }
html[data-theme="dark"] .comments_bl { background: transparent; border-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .add_form_comm { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .title_section { color: #f1f5f9; }

/* Dark info blocks */
html[data-theme="dark"] .ek-info-block { border-color: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .ek-info-block.info { background: rgba(59,130,246,.08) !important; }
html[data-theme="dark"] .ek-info-block.warning { background: rgba(245,158,11,.08) !important; }
html[data-theme="dark"] .ek-info-block.danger { background: rgba(239,68,68,.08) !important; }
html[data-theme="dark"] .ek-info-block.purple { background: rgba(168,85,247,.08) !important; }
html[data-theme="dark"] .ek-info-block div { color: rgba(255,255,255,.75); }
html[data-theme="dark"] .ek-info-block a { color: var(--ek-accent); }

/* Dark download cards */
html[data-theme="dark"] .ek-download-card { background: rgba(255,255,255,.03) !important; border-color: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .ek-download-card:hover { border-color: rgba(255,255,255,.15); }
html[data-theme="dark"] .ek-dl-title { color: #f1f5f9; }
html[data-theme="dark"] .ek-dl-sub { color: rgba(255,255,255,.4); }

/* Dark story icons */
html[data-theme="dark"] .story_icons i { color: rgba(255,255,255,.4); }
html[data-theme="dark"] .story_icons i:hover { color: var(--ek-accent); }

/* Dark video */
html[data-theme="dark"] .video-inside { background: rgba(0,0,0,.3); }

/* ============================================================
   CAROUSEL — hide section_title inside it
   ============================================================ */
.swiper-container .section_title,
.owl-carousel .section_title,
.carousel .section_title { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .ek-full-hero { flex-direction: column; align-items: center; }
  .ek-poster-card { flex: none; max-width: 200px; }
  .ek-info-label { min-width: 110px; }
  .ek-screens-grid { grid-template-columns: repeat(2, 1fr); }
  .ek-card-body { flex-direction: column; align-items: center; text-align: center; }
  .ek-card-left { flex: none; }
  .ek-card-footer { justify-content: center; }
  .ek-card-cats { justify-content: center; }
}
@media (max-width: 480px) {
  .ek-card { padding: 14px !important; margin-bottom: 20px !important; }
  .ek-card-poster img { width: 110px; }
  .fn_post_rate .ek-rate-btn { padding: 8px 14px; font-size: 13px; }
}

/* ============================================================
   v5.4 — COMPREHENSIVE FIX: ALL CHANGES
   ============================================================ */

/* ===================== GLOBAL PROMO — REDUCE TOP MARGIN ===================== */
.global_promo { padding: 14px 25px 18px !important; }

/* ===================== PROMO SIZE BADGE — ON POSTER TOP-LEFT ===================== */
.ek-promo-size {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  padding: 3px 9px; font-size: 10px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.65);
  border-radius: 6px; display: inline-flex; align-items: center; gap: 4px;
  line-height: 1.3; pointer-events: none;
}
.ek-promo-size i { font-size: 9px; opacity: .8; }

/* ===================== ASIDE SIDEBAR — SPACING FROM CONTENT ===================== */
.aside_l { margin-right: 20px !important; }
.aside_r { margin-left: 20px !important; }
.aside_bl.menu_,
.aside_bl {
  border: 1px solid var(--ek-border-solid) !important;
  border-radius: var(--ek-radius) !important;
  overflow: hidden;
}
html[data-theme="dark"] .aside_bl.menu_,
html[data-theme="dark"] .aside_bl { border-color: var(--ek-border-solid) !important; }

/* ===================== COMPACT FOOTER ===================== */
.footer-compact { max-width: 1200px; margin: 0 auto; }
.footer-compact-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 16px 30px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-compact-top .footer-logo { font-size: 18px; font-weight: 700; color: #fff; }
.footer-compact-top .footer-logo span {
  background: var(--ek-accent); color: #fff; display: inline-block;
  margin-left: 3px; line-height: 1; padding: 3px 5px; border-radius: 4px; font-size: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a {
  color: #8a919a !important; font-size: 12px; font-weight: 500;
  text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--ek-accent) !important; }
.footer-compact-bottom { padding: 14px 30px; text-align: center; }
.footer-disclaimer {
  font-size: 11px; line-height: 1.65; color: #6b727b; max-width: 800px; margin: 0 auto 8px;
}
.footer-disclaimer b { color: #9ea5ae; }
.footer-copy { font-size: 11px; color: #555b64; }
.footer-counters { display: flex; justify-content: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
/* Hide old footer styles */
.footer-main { display: none !important; }
.footer-bottom { display: none !important; }

/* ===================== VK-STYLE SCROLL PROGRESS BAR ===================== */
.ek-scroll-progress {
  position: fixed; left: 0; top: 0; width: 3px; height: 0;
  background: var(--ek-accent);
  z-index: 99999; opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.ek-scroll-strip {
  position: fixed; left: 0; top: 0; width: 8px; height: 100vh;
  z-index: 99998; cursor: pointer; background: transparent;
}
.ek-scroll-strip:hover { background: rgba(var(--ek-accent-rgb),.08); }
.ek-scroll-strip:hover ~ .ek-scroll-progress,
.ek-scroll-progress:hover { width: 5px; }
/* Remove old progress-wrap */
.progress-wrap { display: none !important; }
.switch { display: none !important; }

/* ===================== SHORTSTORY CARD V5.4 ===================== */
/* Title — attractive with glow on hover */
.ek-card-title {
  margin: 0 0 14px 0 !important; padding: 0 !important; font-size: 16px !important; line-height: 1.4;
}
.short_item_load h3.ek-card-title,
.ek-card > h3.ek-card-title,
h3.ek-card-title { margin-top: 0 !important; text-transform: none !important; margin-bottom: 14px !important; }
.ek-card-title a {
  color: var(--ek-text) !important; text-decoration: none !important;
  transition: color .25s, text-shadow .25s !important;
  font-weight: 700 !important;
}
.ek-card-title a:hover {
  color: var(--ek-accent) !important;
  text-shadow: 0 0 20px rgba(var(--ek-accent-rgb),.3), 0 0 40px rgba(var(--ek-accent-rgb),.15) !important;
}
html[data-theme="dark"] .ek-card-title a { color: #f1f5f9 !important; }
html[data-theme="dark"] .ek-card-title a:hover {
  color: #4ade80 !important;
  text-shadow: 0 0 20px rgba(74,222,128,.35), 0 0 40px rgba(74,222,128,.15) !important;
}

/* Card head — bordered block */

/* Categories block under head — bordered */

/* Poster size badge on shortstory poster */
.ek-poster-size {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  padding: 3px 9px; font-size: 10px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.65);
  border-radius: 6px; display: inline-flex; align-items: center; gap: 4px;
  line-height: 1.3; pointer-events: none;
}
.ek-poster-size i { font-size: 9px; opacity: .8; }
.ek-card-poster { position: relative; }
.ek-card-poster a { display: block; position: relative; border-radius: 10px; overflow: hidden; }

/* Footer — rating aligned with "Подробнее" */
.ek-card-footer {
  display: flex !important; align-items: center; justify-content: space-between !important;
  gap: 10px; flex-wrap: wrap; margin-top: 14px !important; padding-top: 14px !important;
  border-top: 1px solid var(--ek-border) !important;
}
.ek-footer-rating { flex: 0 auto; }
.ek-card-footer .ek-more-btn { margin-left: auto !important; }
.ek-rate-mini { font-size: 12px; }
.ek-rate-mini i { padding: 5px 8px !important; font-size: 12px !important; }
.ek-rate-mini span { padding: 3px 5px !important; font-size: 11px !important; min-width: 16px !important; }

/* ===================== FULLSTORY V5.4 ===================== */

/* Favorites — pulsing button */
.ek-full-actions {
  display: flex; align-items: center; gap: 10px;
  float: right; margin-bottom: 10px;
}
/* Edit button — bordered, hover effect, no pulse */
/* Size badge on fullstory poster — instead of rating_count */
.ek-poster-size-badge {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  padding: 5px 12px; font-size: 12px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.65);
  border-radius: 8px; display: inline-flex; align-items: center; gap: 5px;
  line-height: 1.2; pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.ek-poster-size-badge i { font-size: 11px; opacity: .8; }
/* Hide old rating_count on poster */
.ek-poster-card > .rating_count { display: none !important; }

/* Categories centered */
.ek-info-row.ek-cat-row { justify-content: center !important; text-align: center; }

/* Screenshots centered */
.ek-screens-centered {
  display: flex !important; flex-wrap: wrap; justify-content: center !important;
  gap: 10px;
}
.ek-screens-centered a { flex: 0 0 auto; max-width: 200px; }

/* Remove fn_post_rate under tags (rating below tags is removed) */
/* — Already removed from template — */

/* Info blocks centered */
.ek-info-centered { text-align: center; }
.ek-info-centered .ek-info-icon { margin-right: 0; }
.ek-info-text-center { text-align: center; }

/* Download tools buttons */
.ek-download-tools {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 0; margin-bottom: 10px;
}
.ek-tool-btn {
  display: inline-flex !important; align-items: center; gap: 8px;
  padding: 10px 20px !important; font-size: 13px !important; font-weight: 600 !important;
  color: #fff !important; text-decoration: none !important;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  border: none !important; border-radius: 50px !important;
  transition: all .25s !important; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(59,130,246,.3);
}
.ek-tool-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(59,130,246,.45) !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}
.ek-tool-btn i { font-size: 12px; }

/* Torrent download area */
/* ===================== SPOILER FIX — INSTANT TOGGLE ===================== */
/* Override any max-height transition that causes lag */
.ek-spoiler-body { transition: none !important; max-height: none !important; }
.text_spoiler { transition: none !important; max-height: none !important; }

/* ===================== DARK THEME — ADDITIONAL V5.4 FIXES ===================== */
html[data-theme="dark"] .ek-edit-btn:hover { background: #60a5fa; color: #fff; }
html[data-theme="dark"] .ek-poster-size-badge { background: rgba(0,0,0,.75); }
html[data-theme="dark"] .ek-tool-btn { box-shadow: 0 2px 10px rgba(59,130,246,.2); }
html[data-theme="dark"] .ek-torrent-btn { box-shadow: 0 4px 16px rgba(99,102,241,.2); }
html[data-theme="dark"] .footer-compact-top { border-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .footer-disclaimer { color: #555b64; }

/* ===================== RESPONSIVE V5.4 ===================== */
@media (max-width: 768px) {
  .ek-full-actions { float: none; display: flex; margin-bottom: 12px; }
  .ek-download-tools { flex-direction: column; align-items: center; }
  .footer-compact-top { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ============================================================
   v5.4.1 — HOTFIXES
   ============================================================ */

/* ===================== 2. SHORTSTORY CARD — HEAD+CATS INLINE WITH DESC ===================== */
/* Head and cats are now INSIDE ek-card-content (right column) */
.ek-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px !important;
  border: 1px solid var(--ek-border-solid);
  border-radius: 8px;
  background: var(--ek-bg-hover);
}
html[data-theme="dark"] .ek-card-head { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.08); }

.ek-card-cats-block {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--ek-border-solid);
  border-radius: 8px; font-size: 0;
}
.ek-card-cats-block a {
  font-size: 10px; line-height: 1; letter-spacing: .3px; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; text-decoration: none; font-weight: 600;
  color: var(--ek-accent); background: rgba(var(--ek-accent-rgb),.08);
  border: 1px solid rgba(var(--ek-accent-rgb),.15); transition: all .2s; white-space: nowrap;
}
.ek-card-cats-block a:hover { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); }
html[data-theme="dark"] .ek-card-cats-block { border-color: rgba(255,255,255,.08); }

.ek-card-desc-block {
  padding: 10px 12px;
  border: 1px solid var(--ek-border-solid);
  border-radius: 8px;
  background: var(--ek-bg-card);
}
html[data-theme="dark"] .ek-card-desc-block { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.08); }

/* ===================== 3. RATING — HOVER HIGHLIGHTS ENTIRE AREA ===================== */
/* Make clicking area include the number */
.ek-rate-compact a,
.ek-rate-compact [onclick],
.fn_post_rate .ek-rate-btn {
  display: inline-flex !important; align-items: center !important; gap: 4px;
  cursor: pointer; text-decoration: none !important;
}
/* Dislike button + its number */
.ek-rate-compact [rating-minus],
.ek-rate-compact a[onclick*="minus"] {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 8px; border-radius: 50px 0 0 50px;
  transition: background .2s;
}
.ek-rate-compact [rating-minus]:hover,
.ek-rate-compact a[onclick*="minus"]:hover {
  background: rgba(239,68,68,.12);
}
/* Like button + its number */
.ek-rate-compact [rating-plus],
.ek-rate-compact a[onclick*="plus"] {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 8px; border-radius: 0 50px 50px 0;
  transition: background .2s;
}
.ek-rate-compact [rating-plus]:hover,
.ek-rate-compact a[onclick*="plus"]:hover {
  background: rgba(34,197,94,.12);
}
/* Number color always visible */
.ek-rate-num.ek-c-red { color: #ef4444 !important; font-weight: 700; }
.ek-rate-num.ek-c-green { color: #22c55e !important; font-weight: 700; }

/* ===================== 4. FAVORITES BUTTON — DARK MODE VISIBILITY ===================== */
.ek-fav-btn {
  color: #ff6b6b !important; border-color: #ff6b6b !important;
  animation: ek-pulse 2s infinite;
  background: rgba(255,107,107,.08) !important;
}
.ek-fav-btn:hover {
  background: #ff6b6b !important; color: #fff !important;
  animation: none;
}
.ek-fav-active {
  background: #ff6b6b !important; color: #fff !important;
  animation: ek-pulse 2s infinite;
}
.ek-fav-active:hover {
  background: transparent !important; color: #ff6b6b !important;
}
html[data-theme="dark"] .ek-fav-btn {
  color: #ff8a8a !important; border-color: #ff8a8a !important;
  background: rgba(255,138,138,.12) !important;
}
html[data-theme="dark"] .ek-fav-btn:hover {
  background: #ff6b6b !important; color: #fff !important;
}
html[data-theme="dark"] .ek-fav-active {
  background: #ff6b6b !important; color: #fff !important;
  border-color: #ff6b6b !important;
}
@keyframes ek-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,107,107,.5); }
  70% { box-shadow: 0 0 0 12px rgba(255,107,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
}

/* ===================== 5. INLINE BUTTONS FOR INFO BLOCKS ===================== */
.ek-inline-btn {
  display: inline-flex !important; align-items: center; gap: 6px;
  padding: 6px 16px !important; margin: 6px 4px 0 !important;
  font-size: 12px !important; font-weight: 600 !important;
  color: var(--ek-accent) !important; text-decoration: none !important;
  background: rgba(var(--ek-accent-rgb),.08) !important;
  border: 1px solid rgba(var(--ek-accent-rgb),.25) !important;
  border-radius: 50px !important;
  transition: all .25s !important; white-space: nowrap;
}
.ek-inline-btn:hover {
  background: var(--ek-accent) !important; color: #fff !important;
  border-color: var(--ek-accent) !important;
  transform: translateY(-1px);
}
.ek-inline-btn-purple {
  color: var(--ek-purple) !important;
  background: rgba(139,92,246,.08) !important;
  border-color: rgba(139,92,246,.25) !important;
}
.ek-inline-btn-purple:hover {
  background: var(--ek-purple) !important; color: #fff !important;
  border-color: var(--ek-purple) !important;
}
.ek-inline-btn-orange {
  color: #f59e0b !important;
  background: rgba(245,158,11,.08) !important;
  border-color: rgba(245,158,11,.25) !important;
}
.ek-inline-btn-orange:hover {
  background: #f59e0b !important; color: #fff !important;
  border-color: #f59e0b !important;
}
.ek-inline-btn-tg {
  color: #0088cc !important;
  background: rgba(0,136,204,.08) !important;
  border-color: rgba(0,136,204,.25) !important;
}
.ek-inline-btn-tg:hover {
  background: #0088cc !important; color: #fff !important;
  border-color: #0088cc !important;
}
html[data-theme="dark"] .ek-inline-btn { background: rgba(var(--ek-accent-rgb),.1) !important; }
html[data-theme="dark"] .ek-inline-btn-purple { background: rgba(139,92,246,.1) !important; }
html[data-theme="dark"] .ek-inline-btn-orange { background: rgba(245,158,11,.1) !important; }
html[data-theme="dark"] .ek-inline-btn-tg { background: rgba(0,136,204,.1) !important; }

/* MiPony alt button style */
.ek-tool-btn-alt {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  box-shadow: 0 2px 10px rgba(139,92,246,.3);
}
.ek-tool-btn-alt:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
  box-shadow: 0 6px 20px rgba(139,92,246,.45) !important;
}

/* ===================== 6. RESPONSIVE FIX FOR NEW LAYOUT ===================== */
@media (max-width: 768px) {
  .ek-card-body { flex-direction: column; }
  .ek-card-left { flex: none; align-self: center; }
}

/* ============================================================
   v5.4.2 — HOTFIXES
   ============================================================ */

/* ===================== COMPACT TOOL BUTTONS INSIDE INFO BLOCK ===================== */
.ek-download-tools-inline {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 8px;
}
.ek-tool-sm {
  display: inline-flex !important; align-items: center; gap: 5px;
  padding: 5px 14px !important; font-size: 11px !important; font-weight: 600 !important;
  color: #fff !important; text-decoration: none !important;
  background: var(--ek-blue) !important;
  border: none !important; border-radius: 50px !important;
  transition: all .2s !important; white-space: nowrap;
}
.ek-tool-sm:hover { opacity: .85; transform: translateY(-1px); }
.ek-tool-sm i { font-size: 10px; }
.ek-tool-sm-alt { background: var(--ek-purple) !important; }

/* ===================== TORRENT ATTACH INSIDE CARD ===================== */
.ek-dl-attach { flex-shrink: 0; }
.ek-dl-attach .ek-dl-btn {
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 9px 22px !important; min-width: 100px;
}
/* Hide old torrent-attach wrapper and torrent-btn */
.ek-torrent-attach { display: none !important; }
.ek-torrent-download-wrap { display: none !important; }

/* ===================== FAVORITES ICON-ONLY — CIRCLE BUTTONS ===================== */
.ek-fav-btn {
  width: 40px !important; height: 40px !important; padding: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border-radius: 50% !important; font-size: 16px !important;
}
.ek-edit-btn {
  width: 40px !important; height: 40px !important; padding: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border-radius: 50% !important; font-size: 14px !important;
}

/* ===================== FREE DOWNLOAD BUTTON ===================== */
.ek-freedl-btn {
  display: flex !important; align-items: center; gap: 12px;
  padding: 10px 18px !important; margin-top: 8px; width: 100%;
  background: linear-gradient(135deg, var(--ek-accent), #06b6d4) !important;
  border-radius: 12px !important; color: #fff !important;
  text-decoration: none !important; font-weight: 700 !important; font-size: 14px !important;
  transition: all .3s !important; box-shadow: 0 4px 16px rgba(var(--ek-accent-rgb),.3);
}
.ek-freedl-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(var(--ek-accent-rgb),.45) !important;
}

/* ===================== RATING — REMOVE ICON BACKGROUND HIGHLIGHT ===================== */
.ek-rate-compact i.fa-thumbs-down,
.ek-rate-compact i.fa-thumbs-up,
.ek-poster-rate i,
.rate_like-dislike a i,
.rate_like a i,
.fn_post_rate .rate_like-dislike a i {
  background: none !important; box-shadow: none !important;
  padding: 4px !important; border-radius: 0 !important;
}
/* Flat icon colors (no bg, just colored icons) */
.ek-rate-compact i.fa-thumbs-down,
.rate_like-dislike a i.fa-thumbs-down,
.rate_like-dislike i.fa-thumbs-down { color: #ef4444 !important; }
.ek-rate-compact i.fa-thumbs-up,
.rate_like-dislike a i.fa-thumbs-up,
.rate_like-dislike i.fa-thumbs-up,
.rate_like a i.fa-thumbs-up,
.rate_like i.fa-thumbs-up { color: #22c55e !important; }
/* Make rating links clickable and visible */
.rate_like-dislike a,
.rate_like a { cursor: pointer !important; color: inherit !important; font-size: 14px; }
.rate_like-dislike a:hover i.fa-thumbs-down { color: #dc2626 !important; transform: scale(1.15); }
.rate_like-dislike a:hover i.fa-thumbs-up,
.rate_like a:hover i.fa-thumbs-up { color: #16a34a !important; transform: scale(1.15); }
/* Rating number colors */
.ratingminus, .ek-c-red { color: #ef4444 !important; }
.ratingplus, .ek-c-green { color: #22c55e !important; }
.rate_like-dislike .sep { color: var(--ek-text-muted); margin: 0 2px; }

/* ============================================================
   v5.5 — FINAL
   ============================================================ */

/* ===================== 1. DLEPush FIX ===================== */
/* Problem: engine.css uses position:absolute icon + padding-left:60px,
   but style.css uses display:grid. They conflict.
   Fix: reset engine.css conflicts, let style.css grid work properly. */
.DLEPush { top: 70px !important; }
.DLEPush-notification.wrapper {
  padding: 0 !important;
  overflow: visible !important;
}
.DLEPush-notification .DLEPush-icon {
  position: static !important;
  align-self: stretch !important;
}
/* Dark mode colors only */
html[data-theme="dark"] .DLEPush-notification.wrapper { background-color: #1e293b !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .DLEPush-notification.wrapper.push-success { background-color: #0d3331 !important; }
html[data-theme="dark"] .DLEPush-notification.wrapper.push-warning { background-color: #3d2800 !important; }
html[data-theme="dark"] .DLEPush-notification.wrapper.push-error { background-color: #3d1410 !important; }
html[data-theme="dark"] .DLEPush-notification .DLEPush-header { color: #f1f5f9 !important; }
html[data-theme="dark"] .DLEPush-notification .DLEPush-message { color: #cbd5e1 !important; }
html[data-theme="dark"] .DLEPush-notification .DLEPush-close { color: #94a3b8 !important; }
html[data-theme="dark"] .DLEPush-notification .DLEPush-close:hover { color: #fff !important; }

/* ===================== 2. LOADING-LAYER — one spinner only ===================== */
/* Hide ALL children (img, div, span, whatever DLE injects) */
#loading-layer > * {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important; height: 0 !important;
  overflow: hidden !important;
}
#loading-layer {
  position: fixed !important; z-index: 99999 !important;
  top: 50% !important; left: 50% !important;
  right: auto !important; bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important; max-width: none !important; min-width: 0 !important;
  margin: 0 !important; padding: 14px 24px !important;
  background: var(--ek-bg-card, #fff) !important; color: transparent !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,.18) !important;
  border: 1px solid var(--ek-border-solid, #e5e7eb) !important;
  font-size: 0 !important;
  display: -webkit-inline-flex !important; display: inline-flex !important;
  align-items: center !important; justify-content: center !important; gap: 10px !important;
  white-space: nowrap !important;
}
#loading-layer::before {
  content: '' !important; display: inline-block !important; flex-shrink: 0 !important;
  width: 16px !important; height: 16px !important;
  border: 2px solid var(--ek-border, #e5e7eb) !important; border-top-color: var(--ek-accent, #22c55e) !important;
  border-radius: 50% !important; animation: ek-spin .6s linear infinite !important;
  background: none !important; margin: 0 !important; padding: 0 !important;
  visibility: visible !important; font-size: 0 !important;
}
#loading-layer::after {
  content: 'Загрузка...' !important; display: inline !important;
  font-size: 13px !important; font-weight: 500 !important;
  color: var(--ek-text, #333) !important;
  visibility: visible !important;
}
@keyframes ek-spin { to { transform: rotate(360deg); } }
html[data-theme="dark"] #loading-layer { background: #1e293b !important; border-color: rgba(255,255,255,.1) !important; }
html[data-theme="dark"] #loading-layer::after { color: #e2e8f0 !important; }

/* ===================== 3. DROPMENUDIV — DARK MODE ===================== */
html[data-theme="dark"] #dropmenudiv {
  background-color: #1e293b !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.4) !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] #dropmenudiv a { color: #cbd5e1 !important; }
html[data-theme="dark"] #dropmenudiv a:hover { background-color: rgba(255,255,255,.08) !important; color: #fff !important; }

/* ===================== 4. SCROLL PANEL — UP + DOWN ===================== */
.ek-scroll-progress, .ek-scroll-strip, .ek-back-top { display: none !important; }
.ek-scroll-panel {
  position: fixed; left: 0; bottom: 45%; z-index: 9990;
  display: -webkit-flex; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(-100%);
  transition: transform .3s, opacity .3s, visibility .3s;
  -webkit-tap-highlight-color: transparent;
}
.ek-scroll-panel--visible { opacity: 1; visibility: visible; transform: translateX(0); }
.ek-scroll-btn {
  width: 34px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ek-bg-card); color: var(--ek-text);
  border: 1px solid var(--ek-border-solid); border-left: none;
  cursor: pointer; transition: background .2s, color .2s, opacity .3s; font-size: 12px;
}
.ek-scroll-up { border-radius: 0 8px 0 0; }
.ek-scroll-down { border-radius: 0 0 8px 0; border-top: none; }
.ek-scroll-btn:hover { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); }
html[data-theme="dark"] .ek-scroll-btn { background: #1e293b; border-color: rgba(255,255,255,.1); box-shadow: 2px 0 12px rgba(0,0,0,.2); color: #94a3b8; }
html[data-theme="dark"] .ek-scroll-btn:hover { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); box-shadow: 2px 0 16px rgba(34,197,94,.25); }

/* ===================== 5. TITLE ROW ===================== */
.ek-title-row {
  display: -webkit-flex; display: flex;
  align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px;
}
.ek-title-row h1 { flex: 1; min-width: 0; margin: 0 !important; }
.ek-title-row .ek-full-actions { flex-shrink: 0; float: none !important; margin: 4px 0 0 !important; display: flex; gap: 8px; }

/* ===================== 6. PASSWORD BLOCK ===================== */
.ek-pass-value { display: block !important; font-size: 22px !important; font-weight: 800 !important; letter-spacing: .06em; color: #ef4444 !important; margin: 6px 0 2px !important; }

/* ===================== 7. DL-NOTE COLORED BORDERS ===================== */
.ek-dl-note {
  width: 100% !important; padding: 8px 14px !important; font-size: 13px !important; font-weight: 500 !important;
  text-align: center !important; margin-top: 0 !important; border-top: none !important;
  border-radius: 0 0 12px 12px !important; background: rgba(0,0,0,.02) !important;
}
.ek-dl-note b { color: var(--ek-text) !important; }
.ek-dl-note a { color: var(--ek-accent) !important; font-weight: 700 !important; text-decoration: underline !important; }
.ek-dl-note-purple { background: rgba(139,92,246,.06) !important; border-top: 2px solid rgba(139,92,246,.25) !important; }
.ek-dl-note-purple a { color: var(--ek-purple) !important; }
.ek-dl-note-orange { background: rgba(245,158,11,.06) !important; border-top: 2px solid rgba(245,158,11,.25) !important; }
.ek-dl-note-orange a { color: #f59e0b !important; }
.ek-dl-note-tg { background: rgba(0,136,204,.06) !important; border-top: 2px solid rgba(0,136,204,.25) !important; }
.ek-dl-note-tg a { color: #0088cc !important; }
.ek-terabox-info { font-size: 13px !important; font-weight: 500 !important; padding: 8px 14px !important; background: rgba(139,92,246,.06) !important; border-top: 2px solid rgba(139,92,246,.2) !important; border-radius: 0 0 12px 12px !important; text-align: center !important; }
html[data-theme="dark"] .ek-dl-note { background: rgba(255,255,255,.02) !important; }
html[data-theme="dark"] .ek-dl-note b { color: #f1f5f9 !important; }
html[data-theme="dark"] .ek-dl-note-purple { background: rgba(139,92,246,.08) !important; border-color: rgba(139,92,246,.3) !important; }
html[data-theme="dark"] .ek-dl-note-purple a { color: #a78bfa !important; }
html[data-theme="dark"] .ek-dl-note-orange { background: rgba(245,158,11,.08) !important; border-color: rgba(245,158,11,.3) !important; }
html[data-theme="dark"] .ek-dl-note-orange a { color: #fbbf24 !important; }
html[data-theme="dark"] .ek-dl-note-tg { background: rgba(0,136,204,.08) !important; border-color: rgba(0,136,204,.3) !important; }
html[data-theme="dark"] .ek-dl-note-tg a { color: #38bdf8 !important; }
html[data-theme="dark"] .ek-terabox-info { background: rgba(139,92,246,.08) !important; border-color: rgba(139,92,246,.3) !important; }
.ek-copy-code { cursor: pointer; transition: opacity .2s; }
.ek-copy-code:hover { opacity: .7; }

/* ===================== 8. INFO-BLOCK ===================== */
.ek-info-block { display: -webkit-flex !important; display: flex !important; align-items: stretch !important; border-radius: 12px !important; overflow: hidden !important; }
.ek-info-block .ek-info-icon { flex-shrink: 0 !important; margin: 0 !important; }
.ek-download-card { max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; }

/* ===================== 9. ASIDE BLOCKS — margins from content ===================== */
.aside_l, .aside_r { padding: 0 6px; }
.aside_l .aside_bl,
.aside_r .aside_bl {
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--ek-border-solid);
  overflow: hidden;
  background: var(--ek-bg-card);
}
html[data-theme="dark"] .aside_l .aside_bl,
html[data-theme="dark"] .aside_r .aside_bl {
  border-color: rgba(255,255,255,.06);
  background: var(--ek-bg-card);
}

/* ===================== 10. PROFILE / USERINFO ===================== */
/* Checkboxes — DLE generates bare <input> text without <label>, gap doesn't work on text nodes */
.checkbox {
  display: flex !important; align-items: center !important;
  padding: 8px 0; line-height: 1.4;
}
.checkbox input[type="checkbox"],
.ui-form input[type="checkbox"],
input[type="checkbox"] {
  -webkit-appearance: checkbox !important; appearance: checkbox !important;
  width: 18px !important; height: 18px !important; min-width: 18px !important;
  accent-color: var(--ek-accent); cursor: pointer; flex-shrink: 0;
  margin: 0 8px 0 0 !important; vertical-align: middle;
}
.checkbox label, .checkbox a { cursor: pointer; font-size: 14px; }
/* PM page checkbox (bare, no .checkbox wrapper) */
li > input[type="checkbox"] { margin: 0 8px 0 0 !important; vertical-align: middle; }
li > input[type="checkbox"] + label { vertical-align: middle; cursor: pointer; }
.ui-form .form-group { margin-bottom: 16px; }
.ui-form .form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--ek-text); font-size: 14px; }
.ui-form input.wide, .ui-form textarea.wide, .ui-form select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--ek-border-solid);
  border-radius: 8px; background: var(--ek-bg-hover); color: var(--ek-text); font-size: 14px; transition: border-color .2s;
}
.ui-form input.wide:focus, .ui-form textarea.wide:focus { border-color: var(--ek-accent); outline: none; }
html[data-theme="dark"] .ui-form input.wide, html[data-theme="dark"] .ui-form textarea.wide, html[data-theme="dark"] .ui-form select { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #e2e8f0; }
.form-sep { border-top: 1px solid var(--ek-border-solid); padding-top: 16px !important; margin-top: 8px; }
html[data-theme="dark"] .form-sep { border-color: rgba(255,255,255,.08); }
.usinf { list-style: none; padding: 0; margin: 0; }
.usinf li { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ek-border); gap: 12px; }
.usinf .ui-c1 { min-width: 180px; font-weight: 500; color: var(--ek-text-sec); font-size: 14px; }
.usinf .ui-c2 { color: var(--ek-text); font-size: 14px; }
html[data-theme="dark"] .usinf li { border-color: rgba(255,255,255,.06); }
.xfields { width: 100%; border-collapse: collapse; }
.xfields td { padding: 8px 4px; vertical-align: top; }
html[data-theme="dark"] .ban-info { background: rgba(205,10,10,.12) !important; border-color: #cd0a0a !important; color: #fca5a5 !important; }

/* ===================== 11. PM PAGE ===================== */
.pm-box { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
#pm-menu { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
#pm-menu span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .2s;
  background: var(--ek-bg-hover); color: var(--ek-text);
  border: 1px solid var(--ek-border-solid);
}
#pm-menu span i { font-size: 11px; opacity: .7; }
#pm-menu span:hover { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); }
#pm-menu span:hover i { opacity: 1; }
#pm-menu .pm-new { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); }
.pm_status { font-size: 12px; color: var(--ek-text-muted); margin: 0; white-space: nowrap; }
html[data-theme="dark"] #pm-menu span { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] #pm-menu .pm-new { background: var(--ek-accent); border-color: var(--ek-accent); }
.pmlist { margin: 0; padding: 0; }

/* Compact buttons for PM and forms */
.ek-btn-compact {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  background: var(--ek-accent); color: #fff;
  border: 1px solid var(--ek-accent);
  cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.ek-btn-compact:hover { filter: brightness(1.1); box-shadow: 0 2px 8px rgba(34,197,94,.3); }
.ek-btn-compact i { font-size: 11px; }
.ek-btn-outline {
  background: transparent; color: var(--ek-text);
  border-color: var(--ek-border-solid);
}
.ek-btn-outline:hover { background: var(--ek-bg-hover); border-color: var(--ek-accent); color: var(--ek-accent); box-shadow: none; }
html[data-theme="dark"] .ek-btn-outline { color: #cbd5e1; border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .ek-btn-outline:hover { background: rgba(255,255,255,.06); }

/* ===================== 11b. SEARCH ===================== */
/* Live search dropdown */
#searchsuggestions {
  border-radius: 12px !important;
  border: 1px solid var(--ek-border-solid) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.15) !important;
  overflow: hidden;
  max-height: 70vh; overflow-y: auto;
}
#searchsuggestions a {
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--ek-border) !important;
  font-size: 13px; line-height: 1.4;
  transition: background .15s;
}
#searchsuggestions a:hover { background: rgba(var(--ek-accent-rgb),.06) !important; }
#searchsuggestions span.searchheading {
  font-size: 13px !important; font-weight: 600 !important;
  color: var(--ek-text) !important;
  margin-bottom: 3px !important;
  display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ek-search-desc {
  font-size: 12px !important; color: var(--ek-text-muted) !important;
  display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4;
}
#searchsuggestions span.notfound { padding: 14px 16px !important; font-size: 13px; color: var(--ek-text-muted); }
#searchsuggestions span.seperator a { font-size: 12px !important; color: var(--ek-accent) !important; padding: 8px 16px !important; }
html[data-theme="dark"] #searchsuggestions {
  background: #1e293b !important; border-color: rgba(255,255,255,.1) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.4) !important;
}
html[data-theme="dark"] #searchsuggestions a { border-color: rgba(255,255,255,.06) !important; color: #e2e8f0 !important; }
html[data-theme="dark"] #searchsuggestions a:hover { background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] #searchsuggestions span.searchheading { color: #f1f5f9 !important; }

/* Advanced search form (DLE generated #searchtable) */
.ek-search-page { max-width: 800px; }
#searchtable { font-size: 13px; }
#searchtable input[type="text"],
#searchtable input[type="search"],
#searchtable select,
#searchtable textarea,
#searchuser, #searchinput {
  width: 100% !important; padding: 8px 12px !important;
  border: 1px solid var(--ek-border-solid) !important;
  border-radius: 8px !important;
  background: var(--ek-bg-hover) !important; color: var(--ek-text) !important;
  font-size: 13px !important; margin-bottom: 8px;
  transition: border-color .2s;
}
#searchtable input:focus, #searchtable select:focus { border-color: var(--ek-accent) !important; outline: none; }
#searchtable td { padding: 4px 6px; vertical-align: middle; }
#searchtable .bbcodes,
#fullsearch .bbcodes {
  padding: 6px 14px !important; border-radius: 8px !important;
  font-size: 12px !important; font-weight: 600;
  background: var(--ek-accent) !important; color: #fff !important;
  border: none !important; cursor: pointer; transition: filter .2s;
}
#searchtable .bbcodes:hover, #fullsearch .bbcodes:hover { filter: brightness(1.1); }
html[data-theme="dark"] #searchtable input[type="text"],
html[data-theme="dark"] #searchtable select,
html[data-theme="dark"] #searchuser,
html[data-theme="dark"] #searchinput {
  background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.12) !important; color: #e2e8f0 !important;
}
.ek-search-msg { padding: 12px 0; font-size: 13px; color: var(--ek-text-sec); }
/* Search result cards */
.searchtable + .search_result_num { font-size: 13px; color: var(--ek-text-muted); padding: 8px 0; }

/* ===================== 12. GLOBAL FORMS & UI POLISH ===================== */

/* Global input/textarea/select styling (light mode) */
input[type="text"], input[type="password"], input[type="email"],
input[type="search"], input[type="url"], input[type="tel"],
input[type="number"], textarea, select {
  padding: 8px 12px; border: 1px solid var(--ek-border-solid);
  border-radius: 8px; background: var(--ek-bg-hover); color: var(--ek-text);
  font-size: 13px; transition: border-color .2s; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--ek-accent) !important; }
input::placeholder, textarea::placeholder { color: var(--ek-text-muted); opacity: .7; }
/* .wide inputs in forms */
input.wide, textarea.wide, select.wide { width: 100%; box-sizing: border-box; }

/* Beefup toggle .btn — icon-only, not green button */
.title_section .btn, .beefup-head .btn {
  background: none !important; border: none !important; padding: 4px 8px !important;
  color: var(--ek-text-muted) !important; font-size: 14px !important;
  box-shadow: none !important; border-radius: 6px !important; min-width: 0 !important;
}
.title_section .btn:hover, .beefup-head .btn:hover {
  background: var(--ek-bg-hover) !important; color: var(--ek-accent) !important;
  box-shadow: none !important; filter: none !important;
}

/* Pagination */
.pagination { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin: 20px 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all .2s;
  border: 1px solid var(--ek-border-solid);
  background: var(--ek-bg-card); color: var(--ek-text);
}
.pagination a:hover { background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); }
.pagination span.nav_ext { border: none; background: none; color: var(--ek-text-muted); min-width: auto; }
.pagination span:not(.nav_ext) {
  background: var(--ek-accent); color: #fff; border-color: var(--ek-accent); font-weight: 700;
}
html[data-theme="dark"] .pagination a { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); color: #e2e8f0; }
html[data-theme="dark"] .pagination a:hover { background: var(--ek-accent); color: #fff; }

/* Login dropdown form */
.st_panel_user .login_form li { list-style: none; }
.st_panel_user .login_form input[type="text"],
.st_panel_user .login_form input[type="password"] {
  width: 100%; box-sizing: border-box; padding: 9px 12px;
  border-radius: 8px; border: 1px solid var(--ek-border-solid);
  background: var(--ek-bg-hover); font-size: 13px;
}
.st_panel_user .btn { width: 100%; justify-content: center; margin-top: 4px; }

/* Registration form improvements */
.registration .form-group { margin-bottom: 14px; }
.registration label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 13px; }
.check_name { font-size: 12px; margin-left: 4px; }

/* Tags cloud — page /tags/ (.tag_list) and inline (.tags_cloud) */
.tag_list {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; line-height: 1;
}
.tag_list a,
.tags_cloud a {
  display: inline-block; padding: 7px 14px;
  font-size: 13px !important; /* override DLE inline font-size */
  font-weight: 500; text-decoration: none; line-height: 1.4;
  color: var(--ek-text) !important;
  background: var(--ek-bg-hover);
  border: 1px solid var(--ek-border-solid);
  border-radius: 50px;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .15s;
}
.tags_cloud a { margin: 3px; }
.tag_list a:hover,
.tags_cloud a:hover {
  background: var(--ek-accent); color: #fff !important;
  border-color: var(--ek-accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(34,197,94,.2);
}
html[data-theme="dark"] .tag_list a,
html[data-theme="dark"] .tags_cloud a {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8) !important;
}
html[data-theme="dark"] .tag_list a:hover,
html[data-theme="dark"] .tags_cloud a:hover {
  background: var(--ek-accent); color: #fff !important;
  border-color: var(--ek-accent);
  box-shadow: 0 3px 12px rgba(34,197,94,.25);
}

/* Captcha inline */
.c-captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.c-captcha img { border-radius: 6px; }
.c-captcha input { max-width: 200px; }

/* Form submit dark mode */
html[data-theme="dark"] .form_submit { border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .combo_field input { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.12) !important; color: #e2e8f0 !important; }

/* Search result meta section */
.meta { font-size: 12px; padding: 8px 0; color: var(--ek-text-muted); }
.meta ul { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.meta a { color: var(--ek-accent); text-decoration: none; }
html[data-theme="dark"] .meta { color: var(--ek-text-muted); }
html[data-theme="dark"] .meta .grey { color: var(--ek-text-muted) !important; }
html[data-theme="dark"] .meta svg { color: var(--ek-text-muted); }

/* ===================== 13. PRE / CODE / MEDIAINFO — OVERFLOW FIX ===================== */
pre, .scriptcode, .code-toolbar, [class*="language-"] {
  max-width: 100% !important; overflow-x: auto !important;
  box-sizing: border-box !important; word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}
pre code {
  display: block !important; overflow-x: auto !important;
  white-space: pre-wrap !important; word-break: break-all !important;
  max-width: 100% !important;
}
.short_item_load pre,
.short_item_load .code-toolbar,
.short_item_load .scriptcode {
  max-width: 100% !important; overflow-x: auto !important; border-radius: 8px;
}
.text_spoiler {
  max-width: 100% !important; overflow-x: auto !important;
  overflow-wrap: break-word !important; word-break: break-word !important;
}
.text_spoiler pre { margin: 0 !important; }
.text_spoiler pre code {
  white-space: pre-wrap !important; word-break: break-all !important;
  font-size: 12px !important; line-height: 1.5 !important;
}
html[data-theme="dark"] pre code {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #e2e8f0 !important;
}

/* ===================== 14. PERFORMANCE & MOBILE ===================== */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
a, button, [onclick], .ek-fav-btn, .ek-edit-btn, .ek-dl-btn, .ek-more-btn { touch-action: manipulation; }
.ek-scroll-panel, #loading-layer, .is-sticky { will-change: transform; -webkit-backface-visibility: hidden; }
html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
  .ek-title-row { flex-direction: column; gap: 8px; }
  .ek-title-row .ek-full-actions { align-self: flex-end; }
  .ek-full-hero { flex-direction: column !important; }
  .ek-poster-card { max-width: 250px !important; margin: 0 auto 14px !important; }
  .ek-info-block { border-radius: 10px !important; }
  .ek-info-text-center { padding: 10px 12px !important; }
  .ek-download-tools-inline { flex-direction: column !important; align-items: stretch !important; gap: 4px !important; }
  .ek-download-card { padding: 10px !important; gap: 8px !important; }
  .footer-compact-top { flex-direction: column !important; align-items: center !important; }
  .footer-links { justify-content: center !important; flex-wrap: wrap !important; }
  .ek-card-body { flex-direction: column !important; }
  .ek-card-left { flex: none !important; align-self: center !important; max-width: 200px !important; }
  .ek-card-content { margin-left: 0 !important; }
  .content_wrap { padding: 0 !important; }
  .usinf .ui-c1 { min-width: 120px; font-size: 12px; }
  #pm-menu { gap: 4px; }
  #pm-menu span { padding: 5px 10px; font-size: 11px; }
  .ek-btn-compact { padding: 6px 12px; font-size: 11px; }
  #searchsuggestions { max-width: calc(100vw - 20px) !important; }
  .aside_l, .aside_r { padding: 0 2px; }
}
@media (max-width: 480px) {
  h1 { font-size: 18px !important; }
  .ek-card-title a { font-size: 15px !important; }
  .ek-poster-card { max-width: 180px !important; }
  .usinf li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .usinf .ui-c1 { min-width: 0; }
}

.ek-info-block, .ek-download-card, .ek-full-actions, .ek-card-body { display: -webkit-flex; display: -ms-flexbox; display: flex; }
.ek-card-poster img, .ek-poster-card img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ===================== PERFORMANCE OPTIMIZATIONS ===================== */
/* GPU acceleration for animated elements */
.header.is-sticky,
.ek-scroll-panel,
.owl-carousel .owl-stage,
.ek-poster-link,
.ek-download-card,
.ek-fav-btn,
.ek-more-btn { will-change: transform; }

/* Content-visibility for off-screen items */
.short_item_load:nth-child(n+4),
.ek-card:nth-child(n+4),
article.box:nth-child(n+4) {
  content-visibility: auto;
  contain-intrinsic-size: 0 320px;
}
.aside_bl:nth-child(n+3) {
  content-visibility: auto;
  contain-intrinsic-size: 0 200px;
}

/* Contain for layout isolation */
.ek-card, .box_in, .aside_bl { contain: layout style; }
.ek-download-card, .ek-info-block { contain: layout; }

/* Font rendering optimization */
body {
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reduce paint on large images */
img { image-rendering: auto; }
img[loading="lazy"] { background: var(--ek-bg-hover); }

/* ============================================================
   VIP SECTION — LANDING, CATEGORIES, SEARCH
   ============================================================ */

/* --- VIP Landing Container --- */
.vip-landing { margin-bottom: 28px; }

/* --- VIP Banner --- */
.vip-banner {
  position: relative; overflow: hidden; border-radius: 16px;
  padding: 40px 32px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  box-shadow: 0 8px 32px rgba(15,52,96,.35);
}
.vip-banner-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,215,0,.12) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,215,0,.08) 0%, transparent 50%);
  pointer-events: none;
}
.vip-banner-content { position: relative; z-index: 1; }
.vip-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 16px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1a2e; font-size: 28px;
  box-shadow: 0 4px 20px rgba(255,215,0,.4);
  animation: vipPulse 2s ease-in-out infinite;
}
@keyframes vipPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255,215,0,.4); }
  50% { box-shadow: 0 4px 30px rgba(255,215,0,.65); }
}
.vip-banner-title {
  font-size: 28px; font-weight: 800; margin: 0 0 10px;
  background: linear-gradient(90deg, #ffd700, #fff, #ffd700);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; color: transparent;
}
.vip-banner-desc { font-size: 15px; color: rgba(255,255,255,.75); max-width: 500px; margin: 0 auto 20px; line-height: 1.6; }
.vip-get-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  background: linear-gradient(135deg, #ffd700, #ffaa00); color: #1a1a2e;
  font-weight: 700; font-size: 14px; border-radius: 50px; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(255,170,0,.35);
}
.vip-get-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,170,0,.5); }

/* --- VIP Search --- */
.vip-search-block { margin: 16px 0 24px; position: relative; }
.vip-search-form { width: 100%; }
.vip-search-row {
  display: flex; align-items: center;
  background: var(--ek-bg-card); border: 2px solid var(--ek-border-solid);
  border-radius: 50px; padding: 5px 5px 5px 18px;
  transition: border-color .25s, box-shadow .25s;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.vip-search-row:focus-within {
  border-color: #ffd700; box-shadow: 0 0 0 4px rgba(255,215,0,.12), 0 4px 16px rgba(255,215,0,.08);
}
.vip-search-icon {
  color: #cba135; font-size: 16px; flex-shrink: 0; margin-right: 10px;
  transition: color .2s;
}
.vip-search-row:focus-within .vip-search-icon { color: #ffd700; }
.vip-search-input {
  flex: 1; border: none; background: transparent; padding: 8px 0;
  font-size: 14px; color: var(--ek-text); outline: none; min-width: 0;
}
.vip-search-input::placeholder { color: var(--ek-text-muted); }
.vip-search-btn {
  flex-shrink: 0; padding: 9px 22px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #ffd700, #f0a800); color: #1a1a2e;
  font-weight: 700; font-size: 13px; border-radius: 50px; margin-left: 10px;
  transition: transform .15s, box-shadow .15s;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 8px rgba(255,168,0,.25);
}
.vip-search-btn:hover { transform: scale(1.03); box-shadow: 0 4px 14px rgba(255,168,0,.35); }
.vip-search-btn:active { transform: scale(.97); }
.vip-search-btn i { font-size: 12px; }

/* --- Live Search Dropdown --- */
.vip-live-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 9999;
  background: var(--ek-bg-card); border: 1px solid var(--ek-border-solid);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.12);
  max-height: 420px; overflow-y: auto; display: none;
  scrollbar-width: thin; scrollbar-color: var(--ek-border-solid) transparent;
}
.vip-live-results.active { display: block; }
.vip-live-item {
  display: flex; gap: 14px; align-items: center; padding: 12px 18px;
  text-decoration: none; color: var(--ek-text); transition: background .15s;
  border-bottom: 1px solid var(--ek-border);
}
.vip-live-item:last-child { border-bottom: none; }
.vip-live-item:hover { background: var(--ek-bg-hover); }
.vip-live-item:first-child { border-radius: 16px 16px 0 0; }
.vip-live-item:last-child { border-radius: 0 0 16px 16px; }
.vip-live-item:only-child { border-radius: 16px; }
.vip-live-thumb {
  width: 44px; height: 64px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: var(--ek-bg-hover);
}
.vip-live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vip-live-info { flex: 1; min-width: 0; }
.vip-live-title {
  font-size: 14px; font-weight: 600; color: var(--ek-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vip-live-desc {
  font-size: 12px; color: var(--ek-text-muted); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vip-live-empty {
  padding: 20px; text-align: center; color: var(--ek-text-muted); font-size: 14px;
}
.vip-live-loading {
  padding: 18px; text-align: center; color: #cba135; font-size: 13px;
}
.vip-live-all {
  display: block; text-align: center; padding: 14px; font-weight: 600;
  font-size: 13px; color: #b8860b; text-decoration: none;
  background: rgba(255,215,0,.05); border-top: 1px solid var(--ek-border);
  border-radius: 0 0 16px 16px; transition: background .15s;
}
.vip-live-all:hover { background: rgba(255,215,0,.1); }

/* --- VIP Categories Grid --- */
.vip-cats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0;
}
.vip-cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 16px; border-radius: 14px; text-decoration: none;
  background: var(--ek-bg-card); border: 1px solid var(--ek-border-solid);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.vip-cat-card:hover {
  border-color: #ffd700; box-shadow: 0 4px 20px rgba(255,215,0,.15);
  transform: translateY(-3px);
}
.vip-cat-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(255,215,0,.1), rgba(255,170,0,.05));
  color: #ffaa00; transition: background .2s;
}
.vip-cat-card:hover .vip-cat-icon {
  background: linear-gradient(135deg, rgba(255,215,0,.2), rgba(255,170,0,.12));
}
.vip-cat-name { font-size: 14px; font-weight: 600; color: var(--ek-text); }

/* --- VIP Benefits --- */
.vip-benefits {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 20px 0;
}
.vip-benefit {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: 50px; font-size: 13px; font-weight: 500;
  background: rgba(255,215,0,.08); color: #b8860b;
  border: 1px solid rgba(255,215,0,.15);
}
.vip-benefit i { font-size: 14px; color: #ffd700; }

/* --- VIP Divider --- */
.vip-divider {
  text-align: center; margin: 28px 0 8px; position: relative;
}
.vip-divider::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--ek-border-solid);
}
.vip-divider span {
  position: relative; padding: 0 20px; font-size: 14px; font-weight: 600;
  color: var(--ek-text-sec); background: var(--ek-bg);
}

/* --- VIP Sidebar Menu Highlight --- */
.vip-menu-section > .beefup-head .sub {
  color: #ffaa00 !important; font-weight: 600 !important;
}
.vip-menu-section > .beefup-head .sub i {
  color: #ffd700 !important;
}

/* --- VIP Dark Mode --- */
html[data-theme="dark"] .vip-banner {
  background: linear-gradient(135deg, #0d0d1a 0%, #111827 40%, #0c2340 100%);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
html[data-theme="dark"] .vip-search-row { background: var(--ek-bg-card); border-color: var(--ek-border-solid); }
html[data-theme="dark"] .vip-search-row:focus-within { border-color: #ffd700; box-shadow: 0 0 0 4px rgba(255,215,0,.08), 0 4px 16px rgba(255,215,0,.05); }
html[data-theme="dark"] .vip-live-results { background: var(--ek-bg-card); border-color: var(--ek-border-solid); box-shadow: 0 12px 40px rgba(0,0,0,.4); }
html[data-theme="dark"] .vip-live-item:hover { background: var(--ek-bg-hover); }
html[data-theme="dark"] .vip-live-all { background: rgba(255,215,0,.04); }
html[data-theme="dark"] .vip-live-all:hover { background: rgba(255,215,0,.08); }
html[data-theme="dark"] .vip-cat-card { background: var(--ek-bg-card); border-color: var(--ek-border-solid); }
html[data-theme="dark"] .vip-cat-card:hover { border-color: #ffd700; box-shadow: 0 4px 20px rgba(255,215,0,.1); }
html[data-theme="dark"] .vip-cat-icon { background: linear-gradient(135deg, rgba(255,215,0,.08), rgba(255,170,0,.04)); }
html[data-theme="dark"] .vip-cat-card:hover .vip-cat-icon { background: linear-gradient(135deg, rgba(255,215,0,.15), rgba(255,170,0,.08)); }
html[data-theme="dark"] .vip-benefit { background: rgba(255,215,0,.06); border-color: rgba(255,215,0,.1); color: #daa520; }
html[data-theme="dark"] .vip-divider span { background: var(--ek-bg); }

/* --- VIP Mobile --- */
@media (max-width: 768px) {
  .vip-banner { padding: 28px 20px; }
  .vip-banner-title { font-size: 22px; }
  .vip-badge { width: 52px; height: 52px; font-size: 22px; }
  .vip-cats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .vip-cat-card { padding: 18px 12px; }
  .vip-cat-icon { width: 44px; height: 44px; font-size: 18px; }
  .vip-benefits { gap: 8px; }
  .vip-benefit { padding: 6px 12px; font-size: 12px; }
}
@media (max-width: 480px) {
  .vip-banner { padding: 24px 16px; }
  .vip-banner-title { font-size: 20px; }
  .vip-banner-desc { font-size: 13px; }
  .vip-cats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vip-cat-card { padding: 14px 10px; gap: 8px; }
  .vip-cat-name { font-size: 12px; }
  .vip-search-btn { padding: 9px 16px; font-size: 12px; }
}

