/* Free Kinogo — kinogo.la inspired theme */

:root {
  --kgla-bg: #2b2b2b;
  --kgla-bg-dark: #1a1a1a;
  --kgla-shell: #585858;
  --kgla-shell-border: #848480;
  --kgla-shell-inner: #3f3f3f;
  --kgla-text: #a8a8a8;
  --kgla-text-bright: #e0dfdc;
  --kgla-text-dim: #777;
  --kgla-link: #e0dfdc;
  --kgla-hover: #dd4b39;
  --kgla-black: #000;
  --kgla-line: #404040;
  --kgla-kp: #f60;
  --kgla-imdb: #fc0;
  --kgla-quality: #f0ba74;
  --kgla-width: 1100px;
  --kgla-side: 300px;
  --kgla-header: 56px;
  --kgla-radius: 8px;
  --kgla-grid-line: rgba(255, 255, 255, 0.045);
  --kgla-grid-size: 28px;
  --kgla-page-bg: #161616;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.kgla-body {
  margin: 0;
  background: var(--kgla-black);
  color: var(--kgla-text);
  font: 13px/1.5 Tahoma, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}


.kgla-wrapper.wrapper {
  background: transparent !important;
  background-image: none !important;
  isolation: isolate;
}

.kgla-wrapper.wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--kgla-black);
  background-image:
    linear-gradient(to right, var(--kgla-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--kgla-grid-line) 1px, transparent 1px);
  background-size: var(--kgla-grid-size) var(--kgla-grid-size);
  background-position: 0 0;
}

body.kgla-body a {
  color: var(--kgla-link);
  text-decoration: underline;
}

body.kgla-body a:hover { color: var(--kgla-hover); }

body.kgla-body ::selection {
  background: rgba(224, 223, 220, 0.28);
  color: #fff;
}

h1, h2, h3 {
  color: #c9c9c9;
  text-shadow: 1px 1px #000;
}

h1 { font-size: 17px; }
h2, .zagolovki { font-size: 16px; margin: 0; }
h2 a, .zagolovki a { text-decoration: none; color: #fff; }
h2 a:hover, .zagolovki a:hover { color: var(--kgla-hover); }

img { max-width: 100%; height: auto; vertical-align: middle; }

.line-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Utilities (engine.css fallback) */
.d-flex { display: flex; }
.ai-center { align-items: center; }
.jc-space-between { justify-content: space-between; }
.flex-grow-1 { flex-grow: 1; }
.d-none { display: none !important; }
.order-last { order: 99; }
.order-first { order: -1; }

/* Skip link */
.kgla-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 8px 14px;
  background: var(--kgla-hover);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
}
.kgla-skip:focus { left: 12px; }

/* Fixed header bar */
.header_black {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--kgla-header);
  background: var(--kgla-black);
  border-bottom: 1px solid var(--kgla-black);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 990;
}

.kgla-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 991;
  height: var(--kgla-header);
  pointer-events: none;
}

.kgla-header__inner {
  pointer-events: auto;
  max-width: var(--kgla-width);
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.kgla-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none !important;
  white-space: nowrap;
}

.kgla-logo__name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 1px 1px #000;
}

.kgla-logo__accent { color: var(--kgla-hover); }
.kgla-logo__domain { color: #999; font-size: 14px; font-weight: 600; }

.kgla-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kgla-login-store {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.overlay {
  position: fixed;
  z-index: 998;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: none;
}

body.modal-is-opened .login-cloned {
  display: block !important;
}

.login-cloned.login {
  position: fixed;
  z-index: 999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--kgla-bg-dark);
  border: 1px solid var(--kgla-line);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.kgla-loginbtn,
.kgla-menubtn {
  border: 1px solid var(--kgla-line);
  background: #3f3f3f;
  color: var(--kgla-text-bright);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-decoration: none;
}

.kgla-loginbtn:hover,
.kgla-menubtn:hover {
  border-color: #606060;
  color: #fff;
}

.kgla-menubtn { display: none; padding: 6px 10px; }

/* Search in header */
.kgla-header__search {
  min-width: 0;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.kgla-header__searchbox {
  display: flex;
  align-items: center;
  background: #222;
  border: 1px solid var(--kgla-line);
  border-radius: 4px;
  overflow: hidden;
}

.kgla-header__searchbox input,
.kgla-header__searchbox .fast-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: silver;
  padding: 8px 12px;
  font: inherit;
}

.kgla-header__searchbox input:focus { outline: none; }

.kgla-header__searchbtn {
  flex: 0 0 auto;
  border: 0;
  background: #3f3f3f;
  color: var(--kgla-text-bright);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}

.kgla-header__searchbtn:hover {
  background: var(--kgla-hover);
  color: #fff;
}

/* Shell layout */
.kgla-wrapper.wrapper {
  max-width: var(--kgla-width);
  margin: 0 auto;
  padding: calc(var(--kgla-header) + 10px) 8px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.contener {
  background: var(--kgla-shell);
  border-radius: 10px;
  border: 1px solid #0e0e0e;
}

.contener2 {
  border: 1px solid var(--kgla-shell-border);
  border-radius: 10px;
  background: var(--kgla-shell);
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow: hidden;
}

.kgla-clear { clear: both; }

/* Sidebar */
.leftblok_contener.kgla-sidebar {
  flex: 0 0 var(--kgla-side);
  width: var(--kgla-side);
  max-width: 100%;
  border-right: 1px solid rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, #353535 0%, #2e2e2e 100%);
}

.leftblok_contener2 {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--kgla-shell-border);
  padding: 10px 10px 12px;
  gap: 8px;
}

@media (min-width: 961px) {
  .contener {
    overflow: visible;
  }

  .contener2 {
    overflow: visible;
    align-items: flex-start;
  }

  .leftblok_contener2 {
    border-top: 0;
    padding: 10px 10px 12px;
  }

  .leftblok_contener.kgla-sidebar {
    position: sticky;
    top: var(--kgla-header);
    align-self: flex-start;
    max-height: calc(100vh - var(--kgla-header));
    padding-top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
    z-index: 2;
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
  }

  .leftblok_contener.kgla-sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .leftblok_contener.kgla-sidebar::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
  }
}

.deepnavigation { padding: 0; }

.kgla-sidebar .deepnavigation { display: none; }

.deepnavigation .menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 8px 8px 0;
  gap: 2px;
}

.deepnavigation .menu .item a {
  display: block;
  padding: 6px 12px;
  background: #3f3f3f;
  color: #888;
  border-radius: 7px 7px 0 0;
  text-decoration: none;
  border: 1px solid #000;
  border-bottom: 0;
  font-size: 12px;
}

.deepnavigation .menu .item a:hover,
.deepnavigation .menu .item a .name { color: #bbb; }

/* Sidebar nav — modern panel */
.kgla-sidenav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kgla-navblock {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kgla-navblock__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #e8e8e8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kgla-navblock__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(221, 75, 57, 0.18);
  color: var(--kgla-hover);
  font-size: 10px;
  flex-shrink: 0;
}

.kgla-navblock__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.kgla-navblock__list--cols {
  grid-template-columns: 1fr 1fr;
}

.kgla-navblock__list li { margin: 0; }

.kgla-navblock__list a {
  display: block;
  padding: 7px 10px;
  color: #c4c4c4;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.25;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.kgla-navblock__list a:hover {
  color: #fff;
  background: rgba(221, 75, 57, 0.14);
  border-color: rgba(221, 75, 57, 0.35);
  transform: translateX(2px);
}

/* Updates sidebar */
.kgla-updates {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kgla-blocktitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kgla-blocktitle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(221, 75, 57, 0.18);
  color: var(--kgla-hover);
  font-size: 10px;
  flex-shrink: 0;
}

.kgla-upd {
  display: flex;
  gap: 10px;
  padding: 8px;
  text-decoration: none !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.kgla-upd + .kgla-upd { margin-top: 6px; }

.kgla-upd:hover {
  background: rgba(221, 75, 57, 0.1);
  border-color: rgba(221, 75, 57, 0.25);
}

.kgla-upd__poster {
  flex: 0 0 44px;
  width: 44px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.kgla-upd__poster img { width: 100%; display: block; }

.kgla-upd__body { min-width: 0; flex: 1; }

.kgla-upd__title {
  display: block;
  color: var(--kgla-text-bright);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}

.kgla-upd__ep {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--kgla-hover);
}

/* Content */
.content.kgla-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  background: var(--kgla-bg);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 0;
  margin: 0;
  float: none;
}

/* Hero: top tabs + carousel (kinogo.la layout) */
.kgla-hero.header {
  position: relative;
  width: 100%;
  max-width: var(--kgla-width);
  margin: 0 auto 10px;
  z-index: 2;
  background: transparent;
  flex: 0 0 auto;
}

.kgla-hero .header55 {
  width: 100%;
}

.kgla-hero .kgla-topnav.deepnavigation {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kgla-hero .deepnavigation .menu {
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  min-width: min-content;
}

.kgla-hero .deepnavigation .menu .item a {
  display: block;
  padding: 6px 14px;
  height: 28px;
  line-height: 16px;
  background: #3f3f3f;
  color: #888;
  border-radius: 7px 7px 0 0;
  text-decoration: none;
  border: 1px solid #000;
  border-bottom: 0;
  font-size: 12px;
  white-space: nowrap;
}

.kgla-hero .deepnavigation .menu .item a:hover,
.kgla-hero .deepnavigation .menu .item a .name {
  color: #ccc;
}

.kgla-hero .horizontal2 {
  border: 1px solid #0e0e0e;
  border-radius: 10px 0 10px 10px;
  width: 100%;
  background: transparent;
}

.kgla-hero .horizontal {
  margin: 0;
  height: auto;
  min-height: 190px;
  background: var(--kgla-shell);
  border: 1px solid var(--kgla-shell-border);
  border-radius: 10px 0 10px 10px;
  padding: 10px 8px 14px;
  overflow: hidden;
}

.kgla-hero .carousel {
  height: auto;
  position: relative;
}

.kgla-hero .carou__content.owl-carousel {
  display: block;
  opacity: 1;
}

.kgla-hero .carou__content .top {
  display: block;
  text-decoration: none !important;
  width: auto;
  margin-right: 0;
}

.kgla-hero .top__img {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 3px solid #888;
}

.kgla-hero .top__img img {
  width: 118px;
  height: 174px;
  object-fit: cover;
  display: block;
}

.kgla-hero .top__desc {
  padding: 6px 2px 0;
  max-width: 118px;
}

.kgla-hero .top__title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.kgla-hero .poster__rating {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 6px;
  background: var(--kgla-hover);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 2px;
}

.kgla-hero .owl-carousel .owl-stage-outer {
  overflow: hidden;
  padding: 2px 0;
}

.kgla-hero .owl-carousel .owl-nav button {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  left: auto;
  right: auto;
  margin: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75) !important;
  color: #fff !important;
  font-size: 12px;
  box-shadow: none;
}

.kgla-hero .owl-carousel .owl-nav .owl-prev { left: 4px; }
.kgla-hero .owl-carousel .owl-nav .owl-next { right: 4px; background: var(--kgla-hover) !important; }

.kgla-hero .owl-carousel .owl-dots {
  bottom: 0;
}

.kgla-hero .owl-dot {
  background: #555;
}

.kgla-hero .owl-dot.active,
.kgla-hero .owl-dot:hover {
  background: var(--kgla-hover);
}

/* Category head */
.kgla-cathead {
  padding: 14px 18px 6px;
  margin: 0;
  border-bottom: 1px solid var(--kgla-line);
}

.kgla-cathead__title {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.kgla-cathead__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--kgla-text-dim);
}

/* Movie list */
.kgla-list {
  min-height: 120px;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Movie card — kinogo.la horizontal */
.movie {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: var(--kgla-bg);
  color: #fff;
  border: 0;
  border-top: 1px solid var(--kgla-line);
  padding: 12px 18px;
  margin: 0;
}

.movie:first-child { border-top: 0; }

.kgla-list .movie:last-child {
  border-bottom: 1px solid var(--kgla-line);
}

.movie__card,
.shortstorytitle {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.shortstorytitle {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 4px 0 8px;
  color: #fff;
}

.shortstorytitle a,
.shortstorytitle h2 a,
.shortstorytitle .zagolovki a {
  text-decoration: none !important;
  color: #fff;
}

.shortstorytitle a:hover,
.shortstorytitle h2 a:hover,
.shortstorytitle .zagolovki a:hover {
  color: var(--kgla-hover);
  text-decoration: none !important;
}

.shortstorytitle__actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.izbrannoe { position: relative; }

.kgla-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #3f3f3f;
  border: 1px solid var(--kgla-line);
  color: var(--kgla-text-bright);
  text-decoration: none !important;
}

.kgla-fav:hover { color: var(--kgla-hover); border-color: #606060; }
.kgla-fav--active { color: var(--kgla-hover); }

.podrobnosti_right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 100px;
}

.kgla-user-rate { font-size: 11px; text-align: right; }
.rating__votes {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  text-align: center;
  color: var(--kgla-text-dim);
}

.movie__card {
  width: 100%;
  display: grid;
  gap: 12px 20px;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas: "poster aside";
  min-height: 0;
  align-items: stretch;
}

.movie__card--full {
  grid-template-columns: 1fr;
  grid-template-areas: "info";
  margin-top: 10px;
}

.movie__info-img {
  grid-area: poster;
  position: relative;
}

.movie__info-img a { display: block; text-decoration: none; }

.movie__info-img img {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border: 1px solid var(--kgla-line);
  border-radius: 3px;
  display: block;
}

.kgla-type-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10px;
  border-radius: 3px;
}

.movie__aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 300px;
}

.movie__info {
  flex: 0 0 auto;
  min-width: 0;
}

.movie__info-wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.movie__info-list {
  flex: 1 1 auto;
  min-width: 0;
}

.movie__info-item {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--kgla-text);
}

.movie__info-item b { color: #ccc; font-weight: 600; }

.grey-block {
  display: inline-block !important;
  text-decoration: none;
  color: silver;
  padding: 4px 8px;
  background: #242424;
  border: 1px solid var(--kgla-line);
  border-radius: 2px;
}

.grey-block__yellow,
.grey-block__quality {
  font-weight: 700;
  color: var(--kgla-quality);
}

.movie__info-rates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.movie__info-rates--inline {
  flex-direction: row;
  gap: 6px;
}

.imdb, .kp {
  display: block;
  padding: 0 10px;
  border-radius: 2px;
  line-height: 22px;
  text-align: center;
  min-width: 63px;
  font-size: 12px;
  font-weight: 700;
}

.kp { background: var(--kgla-kp); color: #fff; }
.imdb { background: var(--kgla-imdb); color: #000; }

.movie__info-desc {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--kgla-text);
}

.movie__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 0;
  border-top: 0;
}

.movie__meta-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.kgla-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #888;
}

.kgla-stat .fas {
  font-size: 11px;
  opacity: 0.75;
}

.dateicon { color: inherit; }

.kgla-views { color: inherit; }

.kgla-watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 16px;
  background: #3a3a3a;
  border: 1px solid #555;
  border-radius: 6px;
  color: #f0f0f0 !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.kgla-watch-btn .fas {
  font-size: 14px;
  color: var(--kgla-hover);
}

.kgla-watch-btn:hover {
  background: var(--kgla-hover);
  border-color: var(--kgla-hover);
  color: #fff !important;
}

.kgla-watch-btn:hover .fas {
  color: #fff;
}

.kgla-watch-btn--mobile {
  width: 100%;
  margin-top: 8px;
}


/* Catalog alignment — no progressive right shift */
.content.kgla-content,
.kgla-list,
.kgla-list > .movie,
.movie__card,
.shortstorytitle {
  box-sizing: border-box;
}

.kgla-list > .movie {
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-left: 0 !important;
  float: none !important;
  transform: none !important;
  left: auto !important;
  max-width: 100%;
}

/* SEO blocks */
.kgla-seo {
  margin: 16px 18px 20px;
  padding: 16px 18px;
  background: #242424;
  border: 1px solid var(--kgla-line);
  border-radius: var(--kgla-radius);
}

.kgla-seo--inline {
  margin: 16px 18px;
  padding: 12px 14px;
  font-size: 13px;
}

.kgla-seo__h1 {
  margin: 0 0 12px;
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.4;
  color: #ddd;
  font-weight: 700;
}

.kgla-seo__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--kgla-text);
}

.kgla-seo__body p { margin: 0 0 10px; padding: 0; }

.kgla-seo__body a { color: var(--kgla-hover); }

.kgla-seo__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--kgla-line);
}

.kgla-seo__links a {
  padding: 5px 10px;
  background: #2b2b2b;
  border: 1px solid var(--kgla-line);
  border-radius: 4px;
  color: var(--kgla-text);
  text-decoration: none !important;
  font-size: 12px;
}

.kgla-seo__links a:hover {
  color: var(--kgla-hover);
  border-color: #606060;
}

/* Footer */
.kgla-footer.footer {
  max-width: var(--kgla-width);
  margin: 0 auto;
  padding: 16px 12px 24px;
  text-align: center;
}

.footer-text {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--kgla-text);
}

.kgla-footer__logo {
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
}

.kgla-footer__logo span { color: var(--kgla-hover); }

.kgla-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.kgla-footer__nav a {
  color: var(--kgla-text);
  text-decoration: none;
  font-size: 13px;
}

.kgla-footer__nav a:hover { color: var(--kgla-hover); }

.footer-annotation {
  font-size: 11px;
  color: #666;
}

/* Full story page */
.kgla-full {
  padding: 14px 18px 20px;
}

.kgla-full__head {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas:
    "poster title"
    "poster info";
  gap: 16px;
  align-items: start;
}

.kgla-full__poster {
  grid-area: poster;
  position: relative;
}

.kgla-full__titlebar {
  grid-area: title;
  min-width: 0;
}

.kgla-full__infobox {
  grid-area: info;
  min-width: 0;
}

.kgla-full__poster img {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border: 1px solid var(--kgla-line);
  border-radius: 6px;
  display: block;
}

.kgla-full__playbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--kgla-hover);
  border: 0;
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.kgla-full__playbtn:hover { filter: brightness(1.08); }


.kgla-full__titlebar .zagolovki {
  font-size: clamp(18px, 3vw, 22px);
  margin: 0 0 4px;
}

.kgla-full__orig {
  color: var(--kgla-text-dim);
  font-size: 13px;
  margin: 0 0 4px;
}

.kgla-full__slogan {
  color: var(--kgla-hover);
  font-style: italic;
  font-size: 13px;
  margin: 0 0 6px;
}

.kgla-full__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.kgla-full__infobox {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  min-width: 0;
}

.kgla-full__infobox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kgla-full__rates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kgla-full__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kgla-full__props {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kgla-full__prop {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.kgla-full__prop dt {
  margin: 0;
  color: #888;
  font-weight: 600;
}

.kgla-full__prop dd {
  margin: 0;
  color: #d8d8d8;
  min-width: 0;
}

.movie__description.kgla-full__plot {
  margin: 16px 0;
  padding: 14px 16px;
  line-height: 1.6;
  border: 1px solid #393737;
  background: #222;
  border-radius: 4px;
}

/* Player */
.pmovie__player.kgla-player {
  margin: 0 0 20px;
  border: 1px solid var(--kgla-line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.pmovie__player.kgla-player .pmovie__player-controls {
  background: #2a2a2a;
  border-bottom: 1px solid var(--kgla-line);
  padding: 0;
}

.pmovie__player.kgla-player .tabs-block__select {
  gap: 0;
}

.pmovie__player.kgla-player .tabs-block__select span {
  cursor: default;
  display: inline-block;
  height: 40px;
  line-height: 40px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--kgla-hover);
  border-radius: 0;
}

.pmovie__player.kgla-player .pmovie__complaint2 {
  padding: 0 14px;
  font-size: 11px;
}

.pmovie__player.kgla-player .pmovie__complaint2 a {
  color: #eb4d4b !important;
  text-decoration: none !important;
  border-bottom: 1px dotted #eb4d4b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pmovie__player.kgla-player .pmovie__complaint2 a:hover {
  color: #ff6b6b !important;
}

.pmovie__player.kgla-player .video-responsive {
  padding-top: 56.25%;
  position: relative;
  background: #000;
}

.pmovie__player.kgla-player .video-responsive > iframe,
.pmovie__player.kgla-player .video-inside > iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Similar */
.kgla-similar {
  margin: 16px 0;
  padding-top: 12px;
  border-top: 1px solid var(--kgla-line);
}

.kgla-similar__title {
  margin: 0 0 12px;
  font-size: 16px;
  color: #ccc;
}

.kgla-similar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.kgla-related {
  display: block;
  text-decoration: none !important;
  text-align: center;
}

.kgla-related__img {
  display: block;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--kgla-line);
}

.kgla-related__img img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.kgla-related__title {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--kgla-text-bright);
  line-height: 1.3;
}

.kgla-related__year {
  display: block;
  font-size: 10px;
  color: var(--kgla-text-dim);
}

.kgla-related__kp {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 5px;
  background: var(--kgla-kp);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 2px;
}

/* Comments */
.kgla-comments {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--kgla-line);
}

.kgla-comments__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page__comments-title {
  font-size: 15px;
  font-weight: 700;
  color: #ccc;
}

.kgla-comments__btn,
.page__comments-btn {
  padding: 6px 14px;
  background: #3f3f3f;
  border: 1px solid var(--kgla-line);
  border-radius: 4px;
  color: var(--kgla-text-bright);
  cursor: pointer;
  font: inherit;
}

.kgla-comments__btn:hover { color: #fff; border-color: #606060; }

.message-info {
  padding: 14px;
  background: #242424;
  border: 1px solid var(--kgla-line);
  border-radius: 4px;
  color: var(--kgla-text-dim);
  text-align: center;
}

/* Watch bar mobile */
.kgla-watchbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 960;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid var(--kgla-line);
  display: none;
  justify-content: center;
}

.kgla-watchbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--kgla-hover);
  border: 0;
  border-radius: 4px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Mobile overlay / sidebar */
.kgla-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 970;
}

body.kgla-menu-open .kgla-overlay { display: block; }

body.kgla-menu-open { overflow: hidden; }

/* DLE rating widget (5-star fallback) */
.unit-rating:not(.unit-rating--10) {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 85px;
  height: 17px;
  position: relative;
}

.rating { display: inline-block; }

/* Pagination / speedbar */
.bot-navigation,
.navigation {
  padding: 12px 18px;
  text-align: center;
}

.speedbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 9px 18px;
  margin: 0;
  font-size: 0;
  line-height: 1.45;
  color: var(--kgla-text-dim);
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.speedbar span[itemprop="itemListElement"] {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.speedbar span[itemprop="itemListElement"] + span[itemprop="itemListElement"]::before {
  content: "»";
  font-size: 12px;
  color: #555;
  margin: 0 10px;
  pointer-events: none;
}

.speedbar a,
.speedbar span[itemprop="name"] {
  font-size: 12px;
  line-height: 1.45;
  color: #9a9a9a;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.speedbar a:hover,
.speedbar a:focus {
  color: #d8d8d8 !important;
  text-decoration: none !important;
  background: transparent !important;
}

.speedbar span[itemprop="itemListElement"]:last-child span[itemprop="name"] {
  color: #e4e4e4;
  font-weight: 600;
}


@media (max-width: 720px) {
  .speedbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .speedbar::-webkit-scrollbar { display: none; }

  .speedbar span[itemprop="itemListElement"] {
    flex-shrink: 0;
  }
}

/* Info messages */
.message-info,
.info {
  margin: 12px 18px;
}


/* Desktop / mobile visibility */
.kgla-mobile-only { display: none !important; }

@media (max-width: 720px) {
  .kgla-desktop-only { display: none !important; }
  .kgla-mobile-only { display: block !important; }
}

/* ========== RESPONSIVE ========== */

@media (min-width: 768px) {
  .kgla-topbar__note { display: block; }
}

@media (max-width: 960px) {
  .kgla-menubtn { display: inline-flex; }

  .leftblok_contener.kgla-sidebar {
    position: fixed;
    top: calc(var(--kgla-header) + 48px);
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 975;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    background: linear-gradient(180deg, #353535 0%, #2a2a2a 100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.55);
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
  }

  body.kgla-menu-open .leftblok_contener.kgla-sidebar {
    transform: translateX(0);
  }

  .content.kgla-content {
    flex: 1 1 100%;
    width: 100%;
    border-radius: 0 0 8px 8px;
  }

  .contener2 { flex-direction: column; }

}

@media (max-width: 720px) {
  .podrobnosti_right { align-items: flex-start; }

  .kgla-searchbar__btn span:not(.fas) { display: none; }
  .kgla-loginbtn { display: none; }

  body#pmovie .kgla-watchbar { display: flex; }
  body#pmovie .kgla-wrapper { padding-bottom: 70px; }
}
/* Mobile: 2-column poster cards */
@media (max-width: 720px) {
  .kgla-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  /* Fullstory is inside .kgla-list — do not use catalog 2-col grid */
  body#pmovie .kgla-list {
    display: block;
    grid-template-columns: none;
    gap: 0;
    padding: 0;
  }

  body#pmovie .kgla-full {
    width: 100%;
    max-width: 100%;
  }

  .movie {
    margin: 0;
    padding: 8px;
    border: 1px solid var(--kgla-line);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .movie:first-child { border-top: 1px solid var(--kgla-line); }

  .shortstorytitle {
    order: 2;
    display: block;
    padding: 8px 0 0;
    margin: 0;
    grid-template-columns: 1fr;
  }

  .shortstorytitle h2,
  .shortstorytitle .zagolovki {
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
  }

  .shortstorytitle a {
    text-decoration: none;
    color: #fff;
  }

  .movie__card {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-template-columns: none;
    grid-template-areas: none;
  }

  .movie__info-img {
    width: 100%;
    text-align: left;
  }

  .movie__info-img a { display: block; }

  .movie__info-img img {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 2/3;
    margin: 0;
    border-radius: 6px;
  }

  .kgla-type-badge {
    top: 4px;
    right: 4px;
    font-size: 9px;
    padding: 2px 5px;
  }

  .movie__mobile-foot {
    padding-top: 8px;
  }

  .movie__meta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .movie__meta-inline {
    margin-left: 0;
    justify-content: flex-start;
    gap: 12px;
  }


  .movie__mobile-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .movie__mobile-rates .kp,
  .movie__mobile-rates .imdb {
    min-width: auto;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 18px;
  }
}


@media (max-width: 480px) {
  .kgla-wrapper.wrapper {
    padding-left: 4px;
    padding-right: 4px;
  }

  .movie { padding: 8px 12px 10px; }

  .kgla-seo { margin: 12px; padding: 12px; }

  .kgla-navblock__list--cols { grid-template-columns: 1fr; }

  .deepnavigation .menu { gap: 4px; }
  .deepnavigation .menu .item a { padding: 5px 8px; font-size: 11px; }
}


/* Fullstory — mobile / tablet */
@media (max-width: 960px) {
  body#pmovie .kgla-full.pmovie.page {
    max-width: 100%;
    overflow-x: hidden;
  }

  body#pmovie .pmovie__player,
  body#pmovie .pmovie__player.kgla-player {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
  }

  body#pmovie .page__header {
    padding-right: 0 !important;
    margin-bottom: 0 !important;
  }

  body#pmovie .pmovie__bottom {
    margin: 0 !important;
  }

  .kgla-full {
    padding: 10px 12px 16px;
  }

  .kgla-full__head {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas:
      "poster title"
      "info info";
    gap: 10px 12px;
    align-items: start;
  }

  .kgla-full__poster img {
    width: 112px;
    height: 168px;
    border-radius: 6px;
  }

  .kgla-full__titlebar .zagolovki {
    font-size: 17px;
    line-height: 1.35;
    margin: 0 0 4px;
    word-break: break-word;
  }

  .kgla-full__orig,
  .kgla-full__slogan {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
  }

  .kgla-full__actions {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }

  .kgla-full__infobox {
    padding: 10px 12px;
  }

  .kgla-full__infobox-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .kgla-full__prop {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    font-size: 12px;
  }

  .kgla-full__prop dt {
    font-size: 11px;
  }

  .kgla-full__prop dd {
    word-break: break-word;
  }

  .movie__description.kgla-full__plot {
    margin: 12px 0;
    padding: 12px;
    font-size: 13px;
    line-height: 1.55;
    border-radius: 6px;
    overflow-wrap: anywhere;
  }

  .movie__description.kgla-full__plot img,
  .movie__description.kgla-full__plot iframe,
  .movie__description.kgla-full__plot video {
    max-width: 100%;
    height: auto;
  }

  .pmovie__player.kgla-player {
    margin: 0 0 14px;
    border-radius: 6px;
    width: 100%;
  }

  .pmovie__player.kgla-player .pmovie__player-controls {
    flex-wrap: wrap;
    min-height: 36px;
  }

  .pmovie__player.kgla-player .tabs-block__select {
    min-width: 0;
  }

  .pmovie__player.kgla-player .tabs-block__select span {
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .pmovie__player.kgla-player .pmovie__complaint2 {
    padding: 6px 10px;
    font-size: 10px;
    white-space: nowrap;
  }

  .kgla-seo.kgla-seo--inline {
    margin: 12px 0;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
  }

  .kgla-similar {
    margin: 12px 0;
    padding-top: 10px;
  }

  .kgla-similar__title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .kgla-similar__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .kgla-related__title {
    font-size: 10px;
    line-height: 1.3;
  }

  .kgla-comments {
    margin-top: 12px;
    padding-top: 10px;
  }

  .kgla-comments__head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .kgla-comments__btn,
  .page__comments-btn {
    width: 100%;
    text-align: center;
  }

  .kg-rating-10 .unit-rating.unit-rating--10 {
    width: 136px !important;
    min-width: 136px;
  }

  .kg-rating-10 .unit-rating--10 li:not(.current-rating),
  .kg-rating-10 .unit-rating--10 li a {
    width: 13px !important;
    min-width: 13px;
  }
}

@media (max-width: 400px) {
  .kgla-full__head {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .kgla-full__poster img {
    width: 96px;
    height: 144px;
  }

  .kgla-full__titlebar .zagolovki {
    font-size: 15px;
  }

  .kgla-full__prop {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .kgla-similar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 10-star user rating (fullstory) */
.kgla-full .kgla-user-rate,
.kgla-full__actions .kgla-user-rate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.kg-rating-10-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kg-rating-10 .unit-rating.unit-rating--10 {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 170px !important;
  min-width: 170px;
  height: 17px;
  display: flex !important;
  flex-wrap: nowrap;
  position: relative;
  overflow: visible;
}

.kg-rating-10 .unit-rating--10 li.current-rating {
  position: absolute !important;
  left: 0;
  top: 0;
  height: 17px !important;
  margin: 0;
  padding: 0;
  font-size: 0 !important;
  color: transparent !important;
  text-indent: -9999px;
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
  background-image: url(../dleimages/rating-yellow.svg) !important;
  background-repeat: repeat-x !important;
  background-position: 0 -34px !important;
  background-size: 17px 51px !important;
}

.kg-rating-10 .unit-rating--10 li:not(.current-rating) {
  flex: 0 0 17px;
  width: 17px !important;
  min-width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 5;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  background-image: url(../dleimages/rating-yellow.svg) !important;
  background-repeat: no-repeat !important;
  background-position: 0 0 !important;
  background-size: 17px 51px !important;
}

.kg-rating-10 .unit-rating--10 li a {
  display: block;
  width: 17px;
  height: 17px;
  text-indent: -9999px;
  overflow: hidden;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}

.kg-rating-10 .unit-rating--10:hover li:not(.current-rating) {
  background-position: 0 -17px !important;
}

.kg-rating-10 .unit-rating--10 li:not(.current-rating):hover ~ li:not(.current-rating) {
  background-position: 0 0 !important;
}

.kg-user-rating__avg {
  font-size: 14px;
  font-weight: 700;
  color: var(--kgla-quality);
  white-space: nowrap;
}

.kg-user-rating__avg span {
  font-size: 11px;
  color: var(--kgla-text-dim);
}

.kgla-full .rating__votes {
  font-size: 11px;
  color: var(--kgla-text-dim);
}

/* No broken rating in list cards */
.shortstorytitle .kgla-user-rate,
.shortstorytitle .rating,
.shortstorytitle .unit-rating {
  display: none !important;
}

@media (max-width: 720px) {
  .kgla-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }
  .kgla-logo__domain { display: none; }
  .kgla-header__search { max-width: none; }
}

@media (max-width: 720px) {
  .kgla-hero .deepnavigation .menu .item a {
    padding: 6px 10px;
    font-size: 11px;
  }
  .kgla-hero .top__img img {
    width: 100px;
    height: 148px;
  }
}
