body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 113, 227, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(58, 186, 180, 0.14), transparent 30%),
    linear-gradient(180deg, #f7f9fd 0%, #eef3f9 100%);
  color: #1d1d1f;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.38) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
  z-index: -1;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.navbar-brand {
  color: #111 !important;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-link {
  color: #444 !important;
  font-weight: 650;
  padding: 0.5rem 0.9rem !important;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0071e3 !important;
  background: rgba(0, 113, 227, 0.08);
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.09);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.16);
}

.card img {
  height: 235px;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.card:hover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.02);
}

.media-card {
  position: relative;
}

.media-preview-wrap {
  position: relative;
  overflow: hidden;
}

.media-floating-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  font-size: 1.1rem;
  z-index: 2;
}

.media-safety-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.74);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
}

.card-body {
  padding: 1.4rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}

.card-text {
  color: #555;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-row span {
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.media-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: auto;
}

.media-actions .btn {
  flex: 1;
}

.btn-view-full {
  background: rgba(15, 23, 42, 0.06);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-view-full:hover {
  background: rgba(15, 23, 42, 0.10);
}

.btn {
  border-radius: 14px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0068d9 0%, #008cff 50%, #55c7ff 100%);
  border: none;
  box-shadow: 0 10px 28px rgba(0, 113, 227, 0.30);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 113, 227, 0.42);
}

.btn-outline-secondary,
.btn-outline-danger {
  border-width: 1.5px;
}

.form-control,
.form-select,
textarea {
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  padding: 0.85rem 1rem;
  box-shadow: none !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: #0071e3 !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12) !important;
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.alert {
  border: none;
  border-radius: 18px;
}

#assetGrid {
  margin-top: 1rem;
}

.container {
  max-width: 1250px;
}

.container.py-4 {
  padding-top: 2rem !important;
}

#assetGrid .col-md-6 {
  animation: cardFadeUp 0.45s ease both;
}

@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1,
h2,
h3,
h4,
h5 {
  letter-spacing: -0.03em;
}

@media (max-width: 768px) {
  .card img {
    height: 180px;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }
}


.hero-section {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  background:
    radial-gradient(circle at 76% 10%, rgba(69, 169, 255, 0.38), transparent 34%),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.98), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(235, 245, 255, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 85px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -130px;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(85, 199, 255, 0.18));
  filter: blur(8px);
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -130px;
  left: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.10);
  filter: blur(14px);
}

.hero-section>* {
  position: relative;
  z-index: 1;
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.metric-item {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.metric-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.category-chips .badge {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  padding-inline: 1rem !important;
}

.category-chips .badge {
  cursor: pointer;
  transition: all 0.22s ease;
}

.category-chips .badge:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.category-chips .badge.active-chip {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  transform: scale(1.05);
}

.badge {
  border: none;
}

.card .badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 72px;
}

.btn-outline-secondary:disabled {
  opacity: 1;
  color: #444;
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

@media (max-width: 992px) {
  .hero-section {
    border-radius: 26px;
  }

  .hero-section h1 {
    font-size: 2.4rem;
  }
}

.details-hero-preview {
  position: relative;
}

.details-hero-preview img {
  height: 420px;
  object-fit: cover;
}

.details-ai-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  background: rgba(17, 24, 39, 0.74);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.85rem;
  font-weight: 600;
}

.ai-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(85, 199, 255, 0.08));
  border: 1px solid rgba(0, 113, 227, 0.12);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem !important;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .dashboard-card {
    margin-top: 1rem;
  }
}

.upload-card {
  background: rgba(255, 255, 255, 0.84);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  padding: 2rem;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.upload-dropzone {
  border: 2px dashed rgba(0, 113, 227, 0.24);
  border-radius: 24px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(0, 113, 227, 0.03);
  transition: all 0.22s ease;
}

.upload-dropzone:hover {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.45);
}

.page-transition {
  animation: pageFade 0.45s ease;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analytics-number {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.skeleton-card {
  height: 390px;
  border-radius: 30px;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.65) 25%,
      rgba(240, 244, 249, 0.95) 50%,
      rgba(255, 255, 255, 0.65) 75%);
  background-size: 300% 100%;
  animation: skeletonLoading 1.4s infinite linear;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

@keyframes skeletonLoading {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.toast {
  border-radius: 22px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.88);
}

.toast-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-content {
  background: transparent !important;
}

#fullscreenImage {
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.media-card .btn-view-full {
  transition: all 0.22s ease;
}

.media-card .btn-view-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.media-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.dashboard-card .metric-item {
  transition: all 0.2s ease;
}

.dashboard-card .metric-item:hover {
  transform: translateX(4px);
}

#assetGrid {
  transition: opacity 0.25s ease;
}

.hero-section .badge {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .skeleton-card {
    height: 320px;
  }

  #fullscreenImage {
    max-height: 72vh;
  }
}