/* Resources Page Styles - Blog Card Grid Style */
.resources-section {
  width: 100%;
  max-width: 860px;
  margin-top: 8px;
  margin-bottom: 24px;
}

/* Controls Container (Filter Nav + Search) */
.resources-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

/* Category Filter Navigation */
.resources-filter-nav {
  display: flex;
  gap: 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}

.resources-filter-nav::-webkit-scrollbar {
  display: none;
}

.resources-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.resources-filter-btn svg {
  width: 14px;
  height: 14px;
}

.resources-filter-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.resources-filter-btn.active {
  color: var(--accent-text);
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Search Bar */
.resources-search {
  position: relative;
  flex-shrink: 0;
  width: 220px;
}

.resources-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: color 0.2s ease;
}

.resources-search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
}

.resources-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.resources-search-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.resources-search-input:focus {
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.02);
}

.resources-search-input:focus + .resources-search-icon,
.resources-search:focus-within .resources-search-icon {
  color: var(--accent-color);
}

/* Mobile Search Bar - Hidden by default */
.resources-search-mobile {
  display: none;
}

/* Mobile Controls Container - Hidden by default */
.resources-mobile-controls {
  display: none;
}

/* No Results Message */
.no-results-message {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.no-results-message.visible {
  display: flex;
}

.no-results-message svg {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 16px;
}

.no-results-message h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.no-results-message p {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Mobile Filter Dropdown - Hidden by default */
.filter-dropdown {
  display: none;
  position: relative;
}

.filter-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-dropdown-trigger:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-dropdown-trigger.open {
  border-color: var(--accent-color);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.filter-dropdown-trigger .dropdown-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-color);
}

.filter-dropdown-trigger .dropdown-text {
  flex: 1;
  text-align: left;
}

.filter-dropdown-trigger .dropdown-chevron {
  width: 16px;
  height: 16px;
  color: #ffffff60;
  transition: transform 0.2s ease;
}

.filter-dropdown-trigger.open .dropdown-chevron {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #0e0e0e;
  border: 1px solid var(--accent-color);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.filter-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff80;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-dropdown-item:last-child {
  border-bottom: none;
}

.filter-dropdown-item svg {
  width: 18px;
  height: 18px;
}

.filter-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.filter-dropdown-item.active {
  color: var(--accent-color);
  background-color: var(--accent-15);
}

.filter-dropdown-item.active svg {
  color: var(--accent-color);
}

/* Resources Grid (matches blogs-grid) */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Resource Card (matches blog-card) */
.resource-card {
  background-color: #0e0e0e;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #ffffff14;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.resource-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.resource-card-image {
  position: relative;
  width: 100%;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
}

.resource-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.resource-card-content {
  padding: 16px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  position: relative;
}

.resource-card-content h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-card-content p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Resource Meta (matches blog-meta) */
.resource-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.resource-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.resource-views,
.resource-likes,
.resource-downloads,
.resource-videos,
.resource-duration {
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-views svg,
.resource-likes svg,
.resource-downloads svg,
.resource-videos svg {
  opacity: 0.7;
  flex-shrink: 0;
  vertical-align: middle;
}

.resource-videos,
.resource-duration,
.resource-items,
.resource-type {
  color: rgba(255, 255, 255, 0.4);
}

.stat-divider {
  width: 3px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.resource-author {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-color);
}

/* Resource Buttons (matches blog buttons) */
.resource-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-top: auto;
}

.resource-btn.read {
  background-color: var(--accent-15);
  color: var(--accent-color);
}

.resource-btn.read:hover {
  background-color: var(--accent-color);
  color: var(--accent-text);
}

.resource-btn.purchase {
  background-color: var(--accent-color);
  color: var(--accent-text);
}

.resource-btn.purchase:hover {
  background-color: var(--accent-hover);
}

.resource-btn.download {
  background-color: rgba(85, 234, 174, 0.15);
  color: #55eaae;
}

.resource-btn.download:hover {
  background-color: #55eaae;
  color: #0e0e0e;
}

.resource-btn.external {
  background-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
}

.resource-btn.external:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.resource-btn.start {
  background-color: var(--accent-15);
  color: var(--accent-color);
}

.resource-btn.start:hover {
  background-color: var(--accent-color);
  color: var(--accent-text);
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet breakpoint */
@media (max-width: 1919px) {
  .resources-section {
    max-width: calc(100% - 40px);
  }
}

/* Medium screens - wrap controls */
@media (max-width: 900px) {
  .resources-controls {
    flex-wrap: wrap;
  }

  .resources-filter-nav {
    flex-shrink: 1;
    width: 100%;
    order: 1;
  }

  .resources-search {
    width: 100%;
    order: 2;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .main-content {
    padding-top: 62px;
  }

  .resources-section {
    max-width: 100%;
    margin-top: 8px;
  }

  /* Hide desktop controls, show mobile controls */
  .resources-controls {
    display: none;
  }

  .resources-mobile-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .resources-mobile-controls .filter-dropdown {
    display: block;
    margin-bottom: 0;
  }

  .resources-search-mobile {
    display: block;
    width: 100%;
  }

  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .resource-card-image {
    height: 100px;
  }

  .resource-card-content {
    padding: 14px;
  }

  .resource-card-content h3 {
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 0;
  }

  .resource-card-content p {
    font-size: 11px;
  }

  .resource-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 0;
  }

  .resource-author {
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .resource-card {
    flex-direction: row;
  }

  .resource-card-image {
    width: 100px;
    height: auto;
    min-height: 100%;
  }

  .resource-card-content {
    padding: 12px;
  }

  .resource-card-content h3 {
    margin-top: 4px;
    margin-bottom: 0;
  }

  .resource-btn {
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* Purchase Modal */
.purchase-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.purchase-modal.show {
  opacity: 1;
  visibility: visible;
}

.purchase-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.purchase-modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background-color: #0e0e0e;
  border: 1px solid #ffffff14;
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.purchase-modal.show .purchase-modal-content {
  transform: translateY(0);
}

.purchase-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #ffffff80;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.purchase-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.purchase-modal-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
}

.purchase-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchase-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.purchase-modal-header {
  margin-bottom: 20px;
}

.purchase-modal-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.purchase-modal-header p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 12px 0;
}

.purchase-modal-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.purchase-modal-author span:last-child {
  color: var(--accent-color);
  font-weight: 500;
}

.purchase-modal-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.purchase-price-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.purchase-price-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #55eaae;
}

.purchase-price-value .robux-icon {
  width: 24px;
  height: 24px;
}

.purchase-modal-features {
  margin-bottom: 20px;
}

.purchase-modal-features h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.purchase-modal-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.purchase-modal-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.purchase-modal-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.purchase-modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
}

.purchase-modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.purchase-modal-btn.primary {
  background-color: var(--accent-color);
  color: var(--accent-text);
}

.purchase-modal-btn.primary:hover {
  background-color: var(--accent-hover);
}

.purchase-modal-btn.secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.purchase-modal-btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.purchase-modal-btn svg {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .purchase-modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .purchase-modal-body {
    padding: 20px;
  }

  .purchase-modal-header h2 {
    font-size: 20px;
  }

  .purchase-modal-footer {
    padding: 16px 20px;
    flex-direction: column;
  }

  .purchase-modal-btn {
    width: 100%;
  }
}

/* Subscription Notification Popup */
.subscription-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background-color: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
  z-index: 1000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 16px 48px rgba(0, 0, 0, 0.6),
    0 24px 80px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subscription-popup.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.subscription-popup.hiding {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}

.subscription-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.subscription-popup-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.subscription-popup-image {
  width: 100%;
  height: 100px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a2e;
}

.subscription-popup-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, #0e0e0e, transparent);
  pointer-events: none;
}

.subscription-popup-image img {
  width: 60px;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.subscription-popup-content {
  padding: 16px 20px 20px;
}

.subscription-popup-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-color);
  background-color: var(--accent-15);
  border-radius: 20px;
  margin-bottom: 10px;
}

.subscription-popup-content h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.subscription-popup-content p {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.subscription-popup-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscription-popup-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.subscription-popup-perks li::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  flex-shrink: 0;
}

.subscription-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  background-color: var(--accent-color);
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscription-popup-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.subscription-popup-btn svg {
  flex-shrink: 0;
}

/* Responsive adjustments for subscription popup */
@media (max-width: 768px) {
  .subscription-popup {
    bottom: 80px;
    right: 16px;
    width: 320px;
  }
}

@media (max-width: 480px) {
  .subscription-popup {
    bottom: 72px;
    right: 12px;
  }

  .subscription-popup-image {
    height: 80px;
  }

  .subscription-popup-content {
    padding: 14px 16px 16px;
  }

  .subscription-popup-content h4 {
    font-size: 15px;
  }

  .subscription-popup-content p {
    font-size: 12px;
  }
}
