.resources-hero {
  background: var(--vp-c-bg);
  padding: 5rem 1.5rem 3rem;
  text-align: left;
  margin-bottom: 0.05rem;
  position: relative;
}

.resources-hero .container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
}

.page-title {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  color: var(--vp-c-text-1);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-description {
  font-size: 1.125rem;
  color: var(--vp-c-text-2);
  max-width: 900px;
  margin: 0;
  line-height: 1.7;
}

.search-section {
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  max-width: 500px;
  margin: 0;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vp-c-text-2);
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  color: var(--vp-c-text-1);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--vp-c-brand-1);
  box-shadow: 0 0 0 3px rgba(34, 140, 244, 0.1);
}


.filters-section {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--vp-c-border);
  border-radius: 0.5rem;
  background: var(--vp-c-bg);
  color: var(--vp-c-text-2);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 0.9375rem;
}

.filter-btn:hover {
  border-color: var(--vp-c-brand-1);
  color: var(--vp-c-text-1);
}

.filter-btn.active {
  background: rgba(34, 140, 244, 0.12);
  border-color: rgba(34, 140, 244, 0.4);
  color: var(--vp-c-brand-1);
}

.results-count {
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
  margin: 0;
}

.loading-state {
  margin: 2rem 0;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.skeleton-card {
  background: var(--vp-c-bg);
  border: 1px solid var(--vp-c-border);
  border-radius: 1rem;
  overflow: hidden;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-image {
  aspect-ratio: 2 / 1;
  background: var(--vp-c-bg-mute);
}

.skeleton-content {
  padding: 1.75rem;
}

.skeleton-line {
  height: 1rem;
  background: var(--vp-c-bg-mute);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.skeleton-line.short {
  width: 60%;
}

.error-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--vp-c-text-2);
}

.error-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vp-c-text-1);
  margin-bottom: 0.75rem;
}

.load-more-container {
  text-align: center;
  margin-top: 4rem;
  padding: 2.5rem;
}

.loading-more-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  color: var(--vp-c-text-2);
  font-size: 0.9375rem;
  font-weight: 500;
}

.loading-more-indicator .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--vp-c-border);
  border-top-color: var(--vp-c-brand-1);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.resource-page {
  padding: 3rem 0 0;
  min-height: calc(100vh - 200px);
  background: var(--vp-c-bg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--vp-c-text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s;
  width: fit-content;
}

.back-link:hover {
  color: var(--vp-c-brand-1);
}

.resource-detail {
  max-width: 1280px;
  margin: 0 auto;
}

.resource-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 1.5rem 0 2rem;
  border-bottom: none;
}

.resource-header > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 968px) {
  .resource-header {
    padding: 4rem 0 3rem;
    gap: 2.5rem;
  }
}

.resource-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  order: 2;
}

@media (max-width: 968px) {
  .resource-image {
    order: 1;
  }
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05);
}

.resource-image:hover img {
  transform: scale(1.1);
}

.resource-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  order: 1;
}

@media (max-width: 968px) {
  .resource-info {
    order: 2;
  }
}

.resource-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, var(--vp-c-brand-1) 0%, var(--vp-c-brand-2) 100%);
  color: white;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  width: fit-content;
  box-shadow: 0 4px 16px rgba(34, 140, 244, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resource-info h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--vp-c-text-1);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.resource-tagline {
  font-size: 1.375rem;
  color: var(--vp-c-text-2);
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

.resource-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .resource-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--vp-c-text-1);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--vp-c-text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resource-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.resource-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.resource-actions .btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.resource-actions .btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.resource-actions .btn-primary {
  background: var(--vp-c-brand-1);
  color: white;
  box-shadow: none;
}

.resource-actions .btn-primary:hover {
  background: var(--vp-c-brand-2);
}

.resource-actions .btn-secondary {
  display: none;
}

.resource-actions .btn > * {
  position: relative;
  z-index: 1;
}

.resource-content {
  display: grid;
  gap: 3rem;
  max-width: 100%;
}

.resource-description,
.resource-version {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}


@media (max-width: 768px) {
  .resource-description,
  .resource-version {
    padding: 0;
  }
}

.resource-description h2,
.resource-version h2 {
  display: none;
}

.description-text {
  color: var(--vp-c-text-2);
  line-height: 1.9;
  font-size: 1.0625rem;
}

.description-text img {
  display: block !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  aspect-ratio: auto;
  object-fit: contain;
}

.description-text br {
  display: none;
}

.description-text a {
  display: block;
  margin: 1rem 0;
}

.description-text a img {
  display: block;
  margin: 0;
}

.description-text a {
  color: var(--vp-c-brand-1);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.description-text a:hover {
  text-decoration: underline;
  color: var(--vp-c-brand-2);
}

.description-text ul,
.description-text ol {
  margin: 1.5rem 0;
  padding-left: 2.5rem;
}

.description-text li {
  margin: 0.75rem 0;
  line-height: 1.8;
}

.description-text code {
  background: var(--vp-c-bg-soft);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid var(--vp-c-border);
}

.description-text pre {
  background: var(--vp-c-bg-soft);
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--vp-c-border);
}

.description-text pre code {
  background: none;
  padding: 0;
  border: none;
}

.description-text blockquote {
  border-left: 4px solid var(--vp-c-brand-1);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--vp-c-text-2);
  font-style: italic;
  background: var(--vp-c-bg-soft);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

@media (max-width: 768px) {
  .resources-hero {
    padding: 4rem 1.5rem 3rem;
  }

  .filters-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .resource-header {
    gap: 2rem;
    padding: 3rem 0 2.5rem;
  }

  .resource-info h1 {
    font-size: 2rem;
  }

  .resource-tagline {
    font-size: 1.125rem;
  }

  .resource-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.75rem;
  }

  .resource-actions {
    flex-direction: column;
  }

  .resource-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .resource-content {
    padding: 0 1rem;
  }

  .description-text img {
    margin-left: -0.9rem !important;
    margin-right: -0.9rem !important;
    width: calc(100% + 1.8rem) !important;
    max-width: calc(100% + 1.8rem) !important;
    border-radius: 0 !important;
  }
}