@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* GLOBAL STYLING */
.page-container {
  gap: 16px;
}

.content-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}


.content-section {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.content-message {
  color: #ffffffb5;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.5;
  font-size: 16px;
}

.content-message.success {
  color: #84ff6b;
  background: #273325;
  border: 1px solid #84ff6b;
}

.content-message.error {
  color: #fff36b;
  background: #323124;
  border: 1px solid #fff36b;
}

/* FORM ELEMENTS */
form {
  gap: 16px;
}

textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 200px;
}

.form-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  position: relative;
}

.form-input label {
  margin-bottom: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Rubik", sans-serif;
}

.form-input .counter {
  color: #ffffff9e;
  font-variant-numeric: tabular-nums;
}

/* VIDEO PLAYER */
video.video-player {
  width: 100%;
  background: rgb(6 6 11);
  border-radius: 8px;
  aspect-ratio: 16/9;
}

/* VIDEO BUTTONS */
.content-section.video-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  white-space: nowrap;
  overflow-x: auto;
}

.content-section.video-buttons .button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 10px;
  background: #1f212b;
  color: #d7dbeacc;
  border: 1px solid #414557;
  border-radius: 99px;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: transform 0.1s ease;
  box-sizing: border-box;
}

.content-section.video-buttons .button:active {
  transform: scale(0.90);
}

.content-section.video-buttons .button img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

#set-thumbnail img {
  width: 22px;
  height: 22px;
}

/* THUMBNAILS */
.content-section.thumbnails {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-auto-columns: 170px;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: start;
  justify-content: start;
  padding: 10px;
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
}

.content-section.thumbnails .thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  outline: 2px solid rgb(6 6 11);
  transition: outline-color 0.2s ease, transform 0.1s ease;
}

.content-section.thumbnails .thumbnail:active {
  transform: scale(0.96);
}

.content-section.thumbnails .thumbnail.poster {
  outline-color: #ffc929;
}

.content-section.thumbnails .thumbnail.selected {
  outline-color: #fff;
}

.content-section.thumbnails .thumbnail.flash-update {
  animation: flashScale 0.5s ease-out;
}

.poster-indicator {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: 5px;
  right: 5px;
  background: #ffc929;
  border-radius: 50%;
  pointer-events: none;
  width: 30px;
  height: 30px;
  opacity: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.poster-indicator img {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 7px;
}

.img-index-indicator {
  box-sizing: border-box;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  background: #00000070;
  color: #fff;
  border-radius: 50%;
  pointer-events: none;
  font-size: 12px;
}

.modified-indicator {
  box-sizing: border-box;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 14px;
  height: 14px;
  background: #56b0ff;
  border: 1px solid #0a0a0c;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.modified-indicator.visible {
  opacity: 1;
}

.poster-indicator.visible {
  opacity: 1;
  animation: popIn 0.3s ease-out forwards;
}

@keyframes popIn {
  0% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes flashScale {
  0% {
    filter: brightness(2);
    transform: scale(1.1);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

/* TAGS */
.tags-display {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 4px 0;
}

.tag-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: hsl(235, 100%, 65%);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgb(7 7 9);
  font-size: 13px;
  font-family: "Rubik", sans-serif;
  animation: fadeIn 0.3s ease;
}

.remove-tag {
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.remove-tag:hover {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ADMIN ONLY */
.admin-only {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.admin-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9798a9;
  font-size: 13px;
  white-space: nowrap;
}

.admin-divider::before,
.admin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #434456;
}

/* SKIP X */
.skip-x-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffffb5;
  font-size: 14px;
  cursor: pointer;
}

.skip-x-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* SUBMIT FORM */
.content-section.submit-form {
  margin-top: 8px;
}

#submit-btn:disabled,
#submit-btn.disabled {
  opacity: 0.5;
}
