:root {
  --bg: #02010f;
  --fg: #eaeaea;
  --muted: #a7a7a7;
  --accent: #1d97f1;
  --card: #161616;
  --blur-bg: rgba(0,0,0,.5);
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --fg: #101010;
  --muted: #4d4d4d;
  --card: #f4f4f4;
  --blur-bg: rgba(255,255,255,.6);
}

.video-page {
  position: relative;
  color: #C4C7F2;
  font-family: 'Montserrat', sans-serif;
}

/* BACKDROP */
.backdrop {
  position: relative;
  width: 100%;
  height: 580px;
  overflow: hidden;
}

.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.backdrop-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--bg) 85%);
}

/* CONTENT */
.video-content {
  max-width: 900px;
  margin: -120px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* TITLE */
.video-title {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 14px;
  background: linear-gradient(90deg, #1D97F1, #0841C9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* META */
.video-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.meta-text span {
  margin-right: 14px;
  opacity: .9;
}

/* RATING */
/* rating circle */
.rating-circle {
    width: 48px;
    height: 48px;
}

.rating-circle svg {
    width: 48px;
    height: 48px;
}

.rating-circle .bg {
    fill: none;
    stroke: #032C7D33;
    stroke-width: 4;
}

.rating-circle .progress {
    fill: none;
    stroke: #1D97F1;
    stroke-width: 4;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* число внутри */
.rating-circle text {
    fill: #C4C7F2;
    font-size: 14px;
    font-weight: bold;
    dominant-baseline: middle;
    alignment-baseline: middle;
}


/* share popup */
.share-menu {
    display: none;
    background: #020D2F;
    padding: 10px;
    border-radius: 8px;
    position: absolute;
    margin-top: 10px;
}

.share-menu.open {
    display: block;
}



/* SEO TITLE */
.seo-title {
  font-size: 22px;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #C4C7F2;
}

/* DESCRIPTION */
.video-description {
  font-size: 16px;
  line-height: 1.6;
  opacity: .9;
  margin-bottom: 20px;
}

/* PERSONS */
.director,
.actors {
  margin-bottom: 12px;
}

/* BUTTONS */
.video-buttons {
  display: flex;
  gap: 14px;
  margin-top: 25px;
}

.btn-watch {
  padding: 12px 22px;
  border-radius: 10px;
  background: linear-gradient(90deg, #032C7D, #0841C9);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.btn-fav,
.btn-share {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #032C7D;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SHARE PANEL */
.share-wrapper {
  position: relative;
}

.share-panel {
  z-index: 10;
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  right: 0;
  background: #020D2F;
  padding: 12px;
  border-radius: 10px;
  width: 180px;
}

.share-panel a {
  padding: 8px 0;
  color: #C4C7F2;
  text-decoration: none;
}

.share-wrapper.open .share-panel {
  display: flex;
}




/* ===============================
   Comments Section Styles
   =============================== */

/* ===============================
   Comments Section Styles
   =============================== */

.comments-section {
    max-width: 900px;
    margin: 40px auto 40px;
    padding: 0 20px;
}

.comments-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--fg);
}

/* Auth message */
.auth-message {
    padding: 15px;
    background: var(--card);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    text-align: center;
}

/* Comment Form */
.comment-form-root {
    display: grid;
    gap: 10px;
    margin-bottom: 30px;
}
.comment-form-root textarea {
    width: 100%;
    padding: 12px;
    min-height: 100px;
    border-radius: 8px;
    border: 1px solid #333;
    background: var(--card);
    color: var(--fg);
    resize: vertical;
}
.comment-form-root button {
    padding: 5px;
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    justify-self: start; /* Кнопка по левому краю */
}
.comment-form-root button:hover { background: #032C7D; }

.points-info {
    font-size: 13px;
    color: var(--muted);
    padding: 5px 0;
}

/* Comment Structure */
.comment-item {
    padding: 15px;
    margin-bottom: 10px !important;
    background: var(--card);
    border-radius: 8px;
}

#submitComment31{
padding: 8px 15px;
    background: #032c7d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
    justify-self: start;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.comment-user {
    font-weight: 700;
    color: var(--fg);
}

.comment-meta {
    font-size: 12px;
    color: var(--muted);
}

.user-level {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 8px;
    background: #015aa9;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.comment-body {
    line-height: 1.5;
    margin-bottom: 10px;
    word-wrap: break-word; 
}

/* Actions (Reply, Like, Dislike) */
.comment-actions {
  gap: 10px;
    display: flex;
    font-size: 14px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0; /* Убираем лишний padding */
}


.action-btn i {
    margin-right: 4px;
}

/* Reply form */
.reply-form-wrap {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid var(--accent);
}

.reply-form-wrap textarea {
    min-height: 50px;
}

/* Replies (nested structure) */
.comment-replies {
    margin-top: 15px;
    padding-left: 5px;
}

.comment-replies .comment-item {
    padding: 10px;
    margin-bottom: 5px;
}


/* ---- ЭМОДЗИ ИНТЕГРАЦИЯ ---- */
.emoji-tools {
    padding: 5px 0;
}

.emoji-picker {
    display: flex;
    gap: 5px;
}

.emoji-btn {
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.1s;
}
.emoji-btn:hover {
    transform: scale(1.1);
}




/* ---- Аватар в комментариях ---- */
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px; /* Увеличим отступ */
    margin-bottom: 8px;
}
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent);
}




/* --- КНОПКА "РАЗВЕРНУТЬ ОПИСАНИЕ" --- */

.description-content {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Состояние "Свернуто" */
.description-content.collapsed {
    max-height: 120px; /* Высота, которая видна сразу (примерно 4-5 строк) */
}

/* Градиент (затемнение текста внизу) */
.desc-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #02010f); /* #151515 - это цвет твоего фона */
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.description-content.collapsed .desc-gradient {
    opacity: 1; /* Показываем градиент только когда свернуто */
}

/* Сама кнопка */
.btn-expand-desc {
    background: #032c7d;
    padding: 10px;
    border-radius: 8px;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    font-family: 'Montserrat', sans-serif;
}


.btn-expand-desc i {
    font-size: 12px;
    transition: transform 0.3s;
}

/* Поворот стрелки при открытии */
.btn-expand-desc.active i {
    transform: rotate(180deg);
}

/* Скрываем кнопку, если текста мало (добавляется через JS) */
.btn-expand-desc.hidden {
    display: none;
}