/* Reset & basic styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: #121212;
  color: #fff;
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #1f1f1f;
  border-bottom: 1px solid #333;
}

.header h1 {
  font-size: 1.8rem;
}

.btn {
  padding: 8px 16px;
  border: none;
  background: #ff3c3c;
  color: white;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.2s;
}

.btn:hover {
  background: #ff6060;
}

.btn.secondary {
  background: #444;
}

.btn.secondary:hover {
  background: #666;
}

/* Main Collection */
main {
  padding: 20px;
}

.collection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.item {
  background: #1f1f1f;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.item:hover {
  transform: scale(1.2);
}

.thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.item-title {
  padding: 10px;
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
  filter: blur(8px);
  transition: 0.2s;
}

.item:hover .item-title {
  filter: none;
}

/* Empty message */
.empty-message {
  text-align: center;
  margin-top: 50px;
  font-size: 1.2rem;
  color: #aaa;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #1f1f1f;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.modal-content h2 {
  margin-bottom: 15px;
  text-align: center;
}

.form-group {
  margin-bottom: 15px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: none;
  background: #333;
  color: #fff;
}

textarea {
  resize: vertical;
}

/* Modal actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* View modal specific */
.view-content video {
  flex-grow: 1;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.tag-list {
  margin: 10px 0;
}

.tag {
  display: inline-block;
  background: #ff3c3c;
  padding: 5px 10px;
  border-radius: 20px;
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 0.85rem;
}


/* Tag suggestion pills */
.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  position: relative;
  background: transparent;
  border: none;
  max-height: 150px;
  overflow-y: auto;
  width: 100%;
  z-index: 10;
}

.suggestion-tag {
  background: #ff3c3c;
  padding: 5px 10px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.suggestion-tag:hover {
  background: #ff6060;
}


/* Resizable view modal */
.modal-content {
  resize: both;
  min-width: 400px;
  min-height: 300px;
  max-width: 95vw;
  max-height: 95vh;
}

/* Optional: scrollbar for long content */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-track {
  background: #222;
}
