:root {
  --color-theme: #98332b;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  background-color: #1b1b1b;
  color: #dadada;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-wrap {
  border: solid 1px #3f3c37;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.site-header__container {
  padding: 5px;
}

.header-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: solid 2px #3f3c37;
  margin-bottom: 5px;
  padding: 8px 5px;
}

.header-logo__link {
  display: block;
}

.header-logo__link > img {
  display: block;
  vertical-align: middle;
  width: auto;
  max-width: 100%;
  height: 30px;
  filter: brightness(0.85) contrast(1.1);
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

a.header-logo__link:hover > img,
a.header-logo__link:focus-visible > img {
  filter: brightness(1.15) contrast(1.05);
}

a.header-logo__link:active > img {
  filter: brightness(1.25) contrast(1);
}

.header-search {
  width: 100%;
  max-width: 100%;
  border: solid 1px #3f3c37;
  margin-bottom: 10px;
}

.header-search__field {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search__icon {
  position: absolute;
  left: 5px;
  transform: scaleX(-1);
  color: #959595;
  pointer-events: none;
  transition: color 0.2s ease;
  stroke-width: 1;
}

.header-search__input {
  width: 100%;
  height: 30px;
  padding: 0 90px 0 30px;
  font-size: 0.95rem;
  color: #dadada;
  outline: none;
  transition: all 0.2s ease;
  background: none;
  border: none;
}

.header-search__input::-webkit-search-cancel-button,
.header-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.header-search__submit {
  position: absolute;
  right: 0;
  height: 30px;
  padding: 0 5px;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #98332b;
  color: #dadada;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.header-nav {
  border-bottom: solid 1.5px #3f3c37;
  margin-bottom: 5px;
  padding-bottom: 5px;
}

.header-nav__list {
  display: flex;
  align-item: center;
  flex-wrap: wrap;
  gap: 5px;
}

.header-nav__item {
}

.header-nav__link {
  display: inline-flex;
  background-color: #2b2b2b;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.87rem;
  transition: all 0.3s ease;
  align-items: center;
  gap: 2px;
}

.header-nav__icon {
  display: block;
}

.header-nav__link:hover {
  background-color: var(--color-theme);
}

.header-nav__link.is-active {
  color: #dadada;
  background-color: #98332b;
}

.main-video {
  width: 100%;
  padding: 0;
}

.main-video__container {
  padding: 0 5px;
  width: 100%;
}

.main-video__heading {
  width: 100%;
  margin: 0 0 5px 0;
  font-size: 1rem;
  font-weight: 400;
  color: #dadada;
  line-height: 1.3;
  border-bottom: solid 2px #3f3c37;
  text-transform: uppercase;
}

.main-video__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 10px;
}

.video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.video-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #2b2b2b;
  border-radius: 5px;
  overflow: hidden;
}

.video-card__badge {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  padding: 2px 3px;
  font-size: 0.75rem;
  font-weight: 400;
  color: #ffffff;
  border-left: solid 3px #e54336;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
  pointer-events: none;
}

.video-card__thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.video-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  aspect-ratio: 4 / 3;
}

.video-card__media:hover .video-card__thumb {
}

.video-card__content {
  padding: 4px 0 0 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.video-card__title a {
  color: #dadada;
  text-decoration: none;
  transition: color 0.2s ease;
}

.video-card__title a:hover {
  color: #fff;
}

.pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  padding: 0 5px;
  max-width: 100%;
}

.pagination__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 8px 15px;
  border-radius: 5px;
  border: 1px solid #3f3c37;
  color: #dadada;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.pagination__link:hover:not(.pagination__link--active):not(
    .pagination__link--dots
  ) {
  background-color: #bf3b2f;
  color: #ffffff;
  border-color: #ffffff;
}

.pagination__link--active {
  background-color: #bf3b2f;
  color: #ffffff;
  border-color: #fff;
  cursor: default;
}

.pagination__link--dots {
  background: transparent;
  border: none;
  color: #8c8f94;
  cursor: default;
}

.pagination__arrow-icon {
  pointer-events: none;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.notify-box {
  background-color: #2b2b2b;
  color: #dadada;
  padding: 6px 4px;
  margin-bottom: 5px;
  font-size: 0.87rem;
  display: inline-block;
}

.site-links__container {
  padding: 5px;
}

.site-links__heading {
  font-weight: 400;
  font-size: 1rem;
  margin-bottom: 5px;
  border-bottom: solid 2.5px #3f3c37;
}

.site-links__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.site-links__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background-color: #2b2b2b;
  border-radius: 5px;
  font-size: 0.85rem;
  color: #dadada;
}
.video-actions,
.video-actions__meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Good Video Container & Header Layout */
.good-video__header {
  margin-bottom: 5px;
}

.good-video__filter-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
  padding: 0.25rem;
  border-radius: 8px;
}

.good-video__filter-link {
  display: inline-block;
  padding: 5px 4px;
  font-size: 1rem;
  font-weight: 400;
  color: #dadada;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.2s ease;
  background-color: #2b2b2b;
}

.good-video__filter-link:hover {
  color: #ef4444;
}

.good-video__filter-link--active {
  background-color: #ef4444;
}

/* Card Meta & Likes UI */
.video-card__meta {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}

.video-card__likes {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: #ef4444;
  font-weight: 600;
}

.site-footer {
  margin-top: 5px;
  padding: 5px;
}

.site-footer a {
  color: var(--color-theme);
}

.site-footer__info {
  border-top: solid 2.5px #3f3c37;
  margin-bottom: 5px;
}
.site-footer__copyright {
  font-size: 0.8rem;
  color: #898989;
}
@media (min-width: 640px) {
  .main-video__grid {
    gap: 15px 10px;
  }

  .main-video__heading {
    font-size: 0.9rem;
  }

  .video-card__title {
    font-size: 0.95rem;
  }
}

@media (min-width: 768px) {
  .header-nav {
    margin-bottom: 10px;
  }
  .notify-box {
    display: none;
  }
  .header-nav {
    border-bottom: none;
  }
  .header-search {
    max-width: 310px;
    position: relative;
    float: right;
    bottom: -6px;
  }
  .header-logo {
    justify-content: left;
    padding: 20px 5px;
  }
  #main-content {
    margin-top: 15px;
  }
  .main-video__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1024px) {
  .main-video__grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .video-card__title {
    font-size: 1rem;
  }
}

.video-actions__btn.is-active {
  color: #2563eb;
  background-color: #eff6ff;
  border-color: #bfdbfe;
}
.video-actions__btn.is-active svg {
  fill: currentColor;
}

.video-actions button,
.video-actions span {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #2b2b2b;
  padding: 4px 8px;
  border-radius: 5px;
}
