.hero {
  background-image: url(../img/header_wallpaper.jpg);
  background-color: rgba(0, 0, 0, 0.6);
  background-blend-mode: darken;
  background-size: cover;
  background-position: center;
}

.hero p {
  max-width: 90% !important;
}

.top-header {
  height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 30px;
  box-sizing: border-box;
}

.top-header h1 {
  margin: 0;
  font-size: 32px;
  color: #333;
}

.video-item {
  min-height: auto;
  width: 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  box-sizing: border-box;
}

.video-wrap {
  position: relative;
  width: min(92vw, 620px);
  background: #f8f8f8;
  border: 1px solid #d6d6d6;
  box-sizing: border-box;

  margin: 22px auto;
  border: 3px solid var(--fg);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 10px 10px 0 var(--shadow);
  padding: 18px 16px;
  text-align: left;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
}

.video-frame {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrap.vertical .video-frame {
  background: linear-gradient(90deg, #777, #222, #777);
}

video {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 150px);
  display: block;
  background: #000;
}

.video-wrap.vertical video {
  width: auto;
  max-width: 100%;
  height: calc(100vh - 190px);
  max-height: 720px;
}

.video-name {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.video-text {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.video-tags {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-tags .all-tag {
  margin-left: auto;
  border-color: var(--accent);
  color: var(--accent);
}

.video-tags span,
.tags {
  color: var(--accent2);
  border: 2px solid var(--accent2);
  background: #000;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: 3px 3px 0 var(--shadow);
}

.metaTagFilter.active {
  color: #ff3b3b;
  border-color: #ff3b3b;
}

.filename {
  margin-top: 10px;
  color: #333;
  font-size: 15px;
  font-weight: bold;
  word-break: break-all;
}

.video-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 86px;
  color: white;
  opacity: 0;
  cursor: pointer;
  text-shadow: 0 0 22px black;
  transition:
    opacity 0.18s,
    transform 0.18s;
  z-index: 5;
  user-select: none;
}

.video-wrap:hover .video-icon {
  opacity: 0.85;
  transform: translate(-50%, -50%) scale(1.03);
}

.video-wrap.paused .video-icon {
  opacity: 0.85;
}

.video-icon.flash {
  animation: videoIconFlash 0.45s ease;
}

@keyframes videoIconFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }

  35% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.06);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

#topBtn {
  background: #000;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 0;
  box-shadow: 5px 5px 0 var(--shadow);
  font-family: inherit;
  text-transform: uppercase;
}
#topBtn:hover {
  background: var(--accent);
  color: #000;
}

.sort-buttons {
  position: fixed;
  top: 40px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  z-index: 9;
}

.sort-buttons .btn {
  width: 100%;
  text-align: center;
}

.sort-buttons .btn:hover {
  background: var(--accent);
  color: #000;
}

#topBtn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 46px;
  height: 46px;
  cursor: pointer;
  font-size: 26px;
  font-weight: 900;
  display: none;
}

#topBtn.show {
  display: block;
}

/* ===== Tag lista a hero/header részben ===== */
.tag-list {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list a {
  color: var(--fg);
  background: #000;
  border: 2px solid var(--fg);
  padding: 5px 9px;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--shadow);
}
.tag-list a:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}
.tag-list a.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Warning overlay ===== */
body.warning-active .video-item,
body.warning-active footer,
body.warning-active #topBtn {
  filter: blur(18px);
  pointer-events: none;
  user-select: none;
}
body.warning-active .hero {
  filter: none;
  pointer-events: auto;
}
#warningOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  padding: 20px;
}
.warningBox {
  position: relative;
  width: min(92vw, 520px);
  background: #000;
  color: var(--fg);
  border: 3px solid var(--fg);
  box-shadow: 10px 10px 0 var(--shadow);
  padding: 28px 24px 24px;
  text-align: center;
}
.warningBox h2 {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.warningBox p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.warningText {
  display: none;
}
.warningText.active {
  display: block;
}
.warningActions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.warningActions button,
#langToggle {
  background: #000;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 0;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--shadow);
}
.warningActions button {
  padding: 10px 18px;
}
#langToggle {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
}
.warningActions button:hover,
#langToggle:hover {
  background: var(--accent);
  color: #000;
}

.video-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 34px;
}

.volume-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 34px;
}

.volumeBtn,
.shareBtn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.volumeRange {
  width: 0;
  opacity: 0;
  margin-right: 0;
  pointer-events: none;
  accent-color: var(--accent);
  transition:
    width 0.18s ease,
    opacity 0.18s ease,
    margin-right 0.18s ease;
}

.volume-row:hover .volumeRange {
  width: 90px;
  opacity: 1;
  margin-right: 7px;
  pointer-events: auto;
}

.video-tools {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.video-wrap:hover .video-tools,
.video-frame:hover .video-tools {
  opacity: 1;
  pointer-events: auto;
}

.downloadBtn,
.shareBtn,
.volumeBtn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.global-tag-box {
  display: none;
  margin: 18px 0;
  border: 3px solid var(--fg);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.global-tag-box.show {
  display: flex;
}

.no-content-message {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
  padding: 16px;
  border: 3px solid var(--fg);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 8px 8px 0 var(--shadow);
  font-weight: 800;
  text-align: center;
}

.no-content-message.show {
  display: flex;
}

.editBtn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1180px) {
  .video-tags {
    gap: 5px;
  }

  .video-tags span {
    font-size: 8px;
    padding: 3px 6px;
    border-width: 1px;
  }

  .video-tags .all-tag {
    margin-left: auto;
  }

  .sort-buttons {
    position: fixed;
    top: 10px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 9999;

    width: auto;
    max-width: 98vw;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .sort-buttons .btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;

    font-size: 11px;
    padding: 7px 10px;
    line-height: 1;
  }
  .video-tools {
    opacity: 1;
    pointer-events: auto;
  }

  .downloadBtn {
    display: none;
  }
}

.video-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin-top: 0;
    min-width: 0;
}

.video-reactions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.video-reaction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 46px;
    min-height: 30px;
    padding: 5px 8px;
    border: 2px solid var(--accent2);
    background: #000;
    color: var(--accent2);
    box-shadow: 3px 3px 0 var(--shadow);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

.video-reaction-btn:hover,
.video-reaction-btn.active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--shadow);
}

.video-reaction-btn.like {
    border-color: var(--accent);
    color: var(--accent);
}

.video-reaction-btn.like.active,
.video-reaction-btn.like:hover {
    background: var(--accent);
    color: #000;
}

.video-reaction-btn.dislike {
    border-color: #ff4b5f;
    color: #ff4b5f;
}

.video-reaction-btn.dislike.active,
.video-reaction-btn.dislike:hover {
    background: #ff4b5f;
    color: #000;
}

.video-reaction-btn strong {
    font-size: 12px;
    line-height: 1;
}

.video-view-count {
    margin-left: 0;
    margin-right: 15px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 38px;
    min-height: 30px;
    padding: 5px 8px;
    border: 2px solid var(--accent2);
    background: #000;
    box-shadow: 3px 3px 0 var(--shadow);
    white-space: nowrap;
    color: var(--accent2);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
}

.video-view-count i {
    font-size: 12px;
}
