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

body {
    background: #121212;
    color: #f0f0f0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a {
    color: #ff5252;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#header {
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: var(--light-background);
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .15);
    border-radius: 4px 4px 0 0;
    position: relative;
}

nav a {
    margin-right: 15px;
    color: #fff;
    font-weight: bold;
}

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

.movie-item img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s;
}

.movie-item img:hover {
    transform: scale(1.05);
}

.single-movie img {
    max-width: 100%;
}

.comments-section {
    margin-top: 40px;
}

.movie-page-container {
    display: flex;
    gap: 20px;
    color: #ddd;
    background-color: #121212;
    padding: 20px;
	flex-wrap: wrap;
    width: 100%;
    overflow-x: hidden;
}

.movie-main {
    flex: 3;
}

.movie-title {
    font-size: 18px;
    color: #444;
    margin-bottom: 15px;
}

body.dark-mode .movie-title {color: #fff;}

.movie-meta span {
    display: block;
    margin: 5px 0;
    font-size: 14px;
    color: #bbb;
}

.movie-thumbnail img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 8px;
}

.movie-player iframe {
    width: 100%;
    height: 400px;
    border: none;
    margin-bottom: 20px;
}

.movie-content {
    margin: 20px 0;
}

.movie-comments {
    margin-top: 30px;
    background: #ededed;
    padding: 15px;
    border-radius: 8px;
}

.movie-sidebar {
    flex: 1;
}



/* Все табы и кнопка «СВЕТ» — ВЕРХНИМ РЕГИСТРОМ */
.player-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 10px;
  padding-right: 10px;
}

/* Кнопка темы прижата вправо */
:root{ --tab-bg:#444; --tab-text:#fff; --tab-border:rgba(255,255,255,.1); --accent:#79c142; }

.player-tabs{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tab-group{ display:flex; align-items:center; gap:8px; }

/* Общий стиль кнопок */
.player-tabs .tab-button,
.player-tabs .theme-toggle-btn2{
  text-transform:uppercase;
  height:40px; padding:0 14px;
  display:inline-flex; align-items:center; gap:8px;
  background:var(--tab-bg); color:var(--tab-text);
  border:1px solid var(--tab-border); border-radius:4px;
  font-size:14px; font-weight:700; line-height:1;
  cursor:pointer; user-select:none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

/* Иконки слева */
.player-tabs .tab-ico{ display:inline-flex; width:18px; height:18px; }
.player-tabs .tab-ico svg{ width:18px; height:18px; display:block; }

/* Ховер: меняется только цвет текста/иконки */
.player-tabs .tab-button:hover,
.player-tabs .theme-toggle-btn2:hover{ color:var(--accent); }

body.dark-mode .player-tabs .tab-button:hover,
body.dark-mode .player-tabs .theme-toggle-btn2:hover{ color:#f90; }
body.dark-mode {--accent: #f90;}

/* Активный таб: фон зелёный, текст белый */
.player-tabs .tab-button.active{ background:var(--accent); color:#fff; border-color:transparent; }

/* Кнопка темы справа */
.player-tabs .theme-toggle-btn2{ margin-left:auto; }

/* Состояния фокуса для клавиатуры */
.player-tabs .tab-button:focus-visible,
.player-tabs .theme-toggle-btn2:focus-visible{ outline:2px solid rgba(121,193,66,.45); outline-offset:2px; }


/* Похожие фильмы */
.similar-movies {
  margin-top: 40px;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.similar-movies h3 {
  margin-bottom: 20px;
  font-size: 1.5em;
}

.similar-movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
  justify-content: center;
}

@media (max-width: 768px) {
  .similar-movies-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.similar-movies-grid li {
  display: flex;
  justify-content: center;
  align-items: center;
}

.similar-movies-grid a {
  display: block;
  width: 100%;
  aspect-ratio: 160 / 233;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  text-align: center;
}

.similar-movies-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.similar-movies-grid a:hover::after {
  opacity: 1;
}

.similar-movies-grid a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #79c142;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.similar-movies-grid a:hover::before {
  opacity: 1;
}

.similar-movies-grid a svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  fill: white;
  width: 50px;
  height: 50px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.similar-movies-grid a:hover svg {
  opacity: 1;
}

.similar-movies-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}


.short-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  z-index: 4;
}

.short-title {
  font-weight: bold;
  margin-bottom: 4px;
  text-align: center;
}

.short-ratings {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 13px;
  opacity: 0.9;
}

.kp-short {
  color: orange;
}

.kp-short span {
  color: white;
}

.imdb-short {
  color: yellow;
}

.imdb-short span {
  color: white;
}



button, .button {
    background-color: #ff5252;
    color: #444;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.container {
	width: 100%;
    max-width: 1200px;
    margin: 0 auto;
	box-sizing: border-box;
}

.movie-page {
    padding: 20px 0;
}








.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
	width: 100%;
}

.header-logo img {
    max-height: 40px;
}

.header-nav .menu {
    display: flex;
    list-style: none;
    gap: 20px;
    padding: 0;
    margin: 0;
    align-items: center;
}

.header-nav .menu li {
    position: relative;
}

.header-nav .menu a {
	font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #444;
    text-decoration: none;
    display: block;
    height: 100%;
    line-height: 70px;
    opacity: .7;
    font-size: 16px;
    white-space: nowrap;
}

body.dark-mode .header-nav .menu a {
    color: #fff;
}

.header-nav .menu a:hover {
	opacity: 1;
    box-shadow: inset 0 -3px #79c142;
    color: #79c142;	
}

.header-nav .menu .submenu {
    display: none;
    position: absolute;
    top: calc(100% - 3px); /* подняли на высоту границы */
    left: 0;
    background: #fff;
    list-style: none;
    margin: 0;
    padding: 10px;
    border-top: 3px solid #79c142;
    z-index: 999;
}
body.dark-mode .header-nav .menu a:hover {box-shadow: inset 0 -3px #f90;}
body.dark-mode .menu .submenu {background: #222;}
body.dark-mode .header-nav .menu .submenu li a {color: #fff;}
body.dark-mode .header-nav .menu .submenu li a:hover {background-color: #f90;}
body.dark-mode .header-nav .menu .submenu {border-top: 3px solid #f90;}

.header-nav .menu .dropdown:hover .submenu {
    display: block;
}

.header-nav .menu .submenu li a {
    display: block;
    padding: 0 10px;
    color: #444;
	font-size: 13px;
    white-space: nowrap;
	line-height: 30px;
	font-weight: 300;
}

.header-nav .menu .submenu li a:hover {
color: #fff;
background-color: #79c142;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.search-form {
    margin-right: 10px;
}

.theme-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-toggle {
    font-size: 40px;
    display: none;
	font-weight: 700;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    color: #444;
    padding: 60px 20px 20px; /* ДОБАВЛЕНО: отступ сверху для кнопки */
    overflow-y: auto;
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.show {
    transform: translateX(0);
}

.mobile-menu.show a {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--nav-color);
    text-decoration: none;
    display: block;
    height: 100%;
    line-height: 70px;
    opacity: .7;
    font-size: 16px;
    white-space: nowrap;
}

body.dark-mode .mobile-menu.show a {color: #eee;}
body.dark-mode .mobile-menu.show a:hover {color: #f90; box-shadow: inset 0 -3px #f90;}
body.dark-mode .mobile-menu {background: #222;}
body.dark-mode  .mobile-submenu {background: #444;
 border-top: 4px solid #f90;
  border-bottom: 4px solid #f90;
}

.mobile-menu.show a:hover {
    box-shadow: inset 0 -3px #79c142;
    color: #79c142;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
}

.mobile-menu .search-form {
    margin-top: 20px;
}

.mobile-menu .close-mobile-menu {
    background: #e84e36;
    border: none;
    color: #fff;
    font-size: 24px;
    float: right;
    cursor: pointer;
}

.close-mobile-menu {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  z-index: 10000;
}


.mobile-submenu-wrapper {
  padding: 0;
  margin: 0;
}

.mobile-submenu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  background-color: #ededed;
  border-top: 4px solid #79c142;
  border-bottom: 4px solid #79c142;
  padding: 10px 0;
}


.mobile-submenu li {
  list-style: none;
  text-align: center;
}

.mobile-menu .mobile-submenu a {
  display: block;
  padding: 4px;
  color: #444 !important;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px !important;
  font-weight: 100 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  height: auto !important;
}

body.dark-mode .mobile-menu .mobile-submenu a {color: #fff !important;}
body.dark-mode .mobile-submenu a:hover {background-color: #f90 !important;}

.mobile-submenu a:hover {
  background-color: #79c142 !important;
  color: #fff !important;
}





.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
}

.overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .header-nav .menu,
    .desktop-search {
        display: none;
    }

    .header-right {
        margin-left: auto;
        justify-content: flex-end;
    }
}

.header-logo {
  height: 63px;
  display: flex;
  align-items: center; /* если нужно выровнять */
}


.header-logo img {
  width: 180px;
  height: 63px;
  max-height: none;
  object-fit: contain;
}


.mobile-search {
        display: block !important;
    }
	
	
	
#commentform {
  max-width: 100%;
}

#commentform h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}

.comment-guidelines {
  font-size: 14px;
  margin-bottom: 20px;
  color: #666;
}

.form-field {
  margin-bottom: 20px;
}

.form-field input[type="text"],
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
  max-height: 300px;
}

.form-field input[type="submit"] {
  background: #79c142;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.form-field input[type="submit"]:hover {
  background: #4caf50;
}

.reply-to-box {
  background: #eef6f2;
  border-left: 4px solid #4caf50;
  padding: 8px 12px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #333;
  border-radius: 4px;
}

.cancel-reply {
  background: none;
  border: none;
  font-size: 18px;
  color: #777;
  cursor: pointer;
}

.custom-comment {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.commentpro-avatar {
  background-color: var(--avatar-bg, #4caf50);
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 50%;
  line-height: 1;
  color: #fff;
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: bold;
  color: green;
  margin-right: 10px;
}

.comment-time {
  font-size: 0.9em;
  color: #888;
}

.comment-text {
  margin: 5px 0;
  color: #888;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vote-count {
  font-weight: bold;
}

.vote-count[data-vote^="-"] {
  color: red;
}

.vote-count[data-vote^="+"] {
  color: green;
}

.like-btn, .dislike-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.comment-reply-link {
  margin-left: auto;
  font-size: 0.9em;
  color: #0073aa;
  text-decoration: none;
}


.comment-item.child-comment {
  margin-left: 40px;
  background-color: #f3f3f3;
  padding: 10px;
  border-radius: 6px;
}


.comment-item {
  background-color: #f2f2f2;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

/* Стили для ответов */
.comment-item.child-comment {
  margin-left: 40px;
}

/* Фон в зависимости от оценки */
.comment-item.positive {
  background-color: #e6f9e6; /* светло-зелёный */
}

.comment-item.negative {
  background-color: #ffecec; /* светло-красный */
}








/* === Тема: Переключатель светлая / тёмная === */
.theme-toggle-wrapper {
  position: relative;
  width: 80px;
  height: 40px;
  background-color: #ccc;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-right: 10px;
}

.theme-toggle-wrapper.dark {
  background-color: #111;
}

.icon-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.icon {
  width: 32px;
  height: 32px;
  background-color: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sun-icon {
  background-color: #4CAF50;
}

.moon-icon {
  background-color: transparent;
}

.theme-toggle-wrapper.dark .sun-icon {
  background-color: transparent;
}

.theme-toggle-wrapper.dark .moon-icon {
  background-color: orange;
}

.sun-icon svg,
.moon-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.6s ease, fill 0.3s ease;
  display: block;
  fill: #fff;
}

.sun-icon svg {
  fill: #fff;
}

.moon-icon svg {
  fill: #444;
}

.theme-toggle-wrapper.dark .sun-icon svg {
  fill: #888;
  transform: rotate(-360deg);
}

.theme-toggle-wrapper.dark .moon-icon svg {
  fill: #fff;
  transform: rotate(-360deg);
}

.theme-toggle-wrapper:not(.dark) .sun-icon svg {
  transform: rotate(360deg);
}

.theme-toggle-wrapper:not(.dark) .moon-icon svg {
  transform: rotate(360deg);
}

.toggle-circle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  background-color: #4CAF50;
  border-radius: 50%;
  z-index: 1;
  transition: left 0.3s ease, background-color 0.3s ease;
  pointer-events: none;
}

.theme-toggle-wrapper.dark .toggle-circle {
  left: 44px;
  background-color: orange;
}

/* Обёртка для меню */
.theme-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Сброс стилей кнопок */
.theme-toggle, .mobile-menu-toggle {
  cursor: pointer;
  background: none;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px; /* расстояние между полосками */
}

.mobile-menu-toggle .bar {
  display: block;
  width: 34px;         /* длина полоски */
  height: 5px;         /* толщина полоски */
  background-color: #444;
  border-radius: 5px;  /* скругление краёв */
  transition: all 0.3s ease;
  margin: 2px 0 2px 0;
}

body.dark-mode .mobile-menu-toggle .bar {background-color: #fff;}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}



/* архив фильмов */
.movie-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.movie-archive-item {
  position: relative;
  overflow: hidden;
}

.movie-archive-thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2/3;
}

.movie-archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.movie-archive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-archive-thumb:hover .movie-archive-overlay {
  opacity: 1;
}

.movie-archive-play svg {
  width: 40px;
  height: 40px;
  pointer-events: none;
}

.movie-archive-title-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 14px;
  text-align: center;
  padding: 6px 4px 28px; /* добавляем нижний отступ под рейтинги */
  box-sizing: border-box;
}

.movie-archive-rating {
  position: absolute;
  bottom: 6px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 13px;
}


.kp-rating {
  color: orange;
}

.imdb-rating {
  color: yellow;
  padding-right: 6px;
}

.movie-archive-rating strong {
  color: white;
}

.movie-archive-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 60px;
  height: 60px;
  background-color: #79c142; /* Цвет круга */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.movie-archive-play svg {
  width: 60px;
  height: 60px;
  fill: white; /* Цвет треугольника */
}



@media (max-width: 768px) {
  .movie-archive-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}






.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 4px;
  background: #ededed;
  color: #222;
  text-decoration: none;
  border-radius: 4px;
}

.pagination a:hover { background: #79c142;
  color: #fff;}

.pagination .current {
  background: #79c142;
  color: #fff;
}

body.dark-mode .pagination .current {background: #f90;}
body.dark-mode .pagination a:hover { background: #f90;}

.floating-actions { position: fixed; bottom: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; right: 16px; }
.floating-actions.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.fab-btn {
  width: 48px; height: 48px;
  box-sizing: border-box;
  padding: 0;                 /* Сбросить дефолтные паддинги кнопки */
  line-height: 1;             /* Без лишнего вертикального смещения */
  border-radius: 10px;
  display: grid;
  place-items: center center;  /* Явно центр по обоим осям */
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  color: #7CFC00;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  outline: none;
  text-align: center;          /* На всякий случай */
}

body.dark-mode .fab-btn {
  background: #141416; color: #7CFC00; border-color: rgba(255,255,255,.14);
}

/* Жёсткий сброс любых внешних отступов у svg */
.fab-btn svg {
  width: 24px; height: 24px;
  display: block;
  margin: 0 !important;        /* На случай наследованных стилей */
  stroke-width: 2;
  stroke-linecap: round;       /* Края линий — более “ровно” и визуально по центру */
  stroke-linejoin: round;
}



/* Показывать светлое лого по умолчанию */
.light-logo {
  display: block;
}
.dark-logo {
  display: none;
}

/* В тёмной теме скрываем светлое лого и показываем тёмное */
body.dark-mode .light-logo {
  display: none;
}
body.dark-mode .dark-logo {
  display: block;
}

