/* page root */
.studio-root {
  width: 100%;
  margin: 24px auto;
  margin-top: 50px;
  padding: 18px 24px;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: #0f1724;
}

/* HEADER */
.studio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(246, 248, 250, 0.9);
  margin-bottom: 20px;
}

.studio-title h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0px;
  font-weight: 600;
  color: var(--color-second);
  text-transform: uppercase;
}

.studio-title p {
  margin: 6px 0 0;
  color: #374151;
  font-size: 1rem;
  font-weight: 400;
}

/* generate button top-right */
.studio-actions .btn {
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.studio-actions .btn-primary {
  background: #51667b;
  color: white;
  border: none;
  transition: background-color 0.2s ease;
}

.studio-actions .btn-primary:hover {
  background: #3d4f5f;
}

/* library header / controls */
.library-section {
  background: #ffffff;
  padding: 18px 18px 22px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.library-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.library-headline h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.library-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.label-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 1rem;
  font-weight: 300;
  color: #374151;
}

.label-inline select {
  margin-left: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e6edf3;
  background: white;
  font-size: 1rem;
}

/* grid of cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-top: 10px;
}

/* single card */
.card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

/* image container */
.card-media {
  position: relative;
  height: 280px;
  width: 100%;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* overlay buttons (download, edit, trash) on hover */
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  background: rgba(15, 23, 42, 0.15);
  transition: opacity 160ms ease-in-out;
}

.card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
}

.icon-btn svg {
  color: #374151;
  stroke: currentColor;
  transition: color 0.2s ease, stroke 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}


/* Disabled state */
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* favorite heart on top-right */
.fav-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  transition: all 0.2s ease;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

/* caption below the image */
.card-caption {
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 400;
  color: #374151;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  flex: 0 0 auto;
}

/* footer */
.studio-footer {
  margin-top: 18px;
  padding: 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 300;
}
/* Delete button - Orange hover */
.delete-btn:hover svg {
  color: #ff8c00;
  stroke: #ff8c00;
}

/* Edit/View button - Blue hover */
.edit-btn:hover svg {
  color: #3b82f6;
  stroke: #3b82f6;
}

/* Download button - Pink hover */
.download-btn:hover svg {
  color: #ec4899;
  stroke: #ec4899;
}


/* small screen tweaks */
@media (max-width: 720px) {
  .studio-root {
    padding: 12px;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .card-media {
    height: 180px;
  }
}
