/* Main container layout */
.main-container {
  display: flex;
  gap: 1.2rem;
  width: 100%;
  padding: 0 1rem;
}

/* Content area styles */
.content {
  flex: 1;
  min-width: 0;
  max-width: 1600px;
  margin: 0 auto;
}

/* Hero section styles */
.hero-section {
  margin-bottom: 2rem;
}

.hero-section h1 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero-section p {
  color: var(--text-color);
  max-width: 600px;
  line-height: 1.5;
}

/* Components grid styles */
.components-grid {
  margin-right: -2rem;
}

.component-card {
  margin-bottom: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease;
  width: 33%;
  text-decoration: none;
  padding-right: 1rem;
}
.component-card .component-license {
  display: none;
  transition: all 0.3s ease;
}
.component-card:hover .component-license {
  display: block;
}

.component-image {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  background: #c8c8c8;
  border-radius: 8px;
}
.component-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid #999;
}
.component-image:hover::after {
  border: 2px solid var(--primary-color);
}
.component-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.component-image:hover img {
  transform: scale(1.05);
}
.framework-icons {
  display: flex;
  gap: 0.5rem;
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
}
.framework-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #fff;
  padding: 0.2rem;
  transition: all 0.3s ease;
}
.framework-icon svg {
  width: 100%;
  height: 100%;
}
.tailwind-icon {
  border: 1px solid #00bcff;
}
.tailwind-icon svg {
  color: #00bcff;
}
.html-css-icon {
  border: 1px solid #e54c21;
}
.html-css-icon svg {
  color: #e54c21;
}
.component-card:hover .framework-icon {
  display: flex;
}

.component-card h3 {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: var(--text-color);
  text-align: right;
}

/* Load more button styles */
.load-more-btn:disabled {
  background-color: transparent;
  color: var(--text-color) !important;
  cursor: not-allowed;
}
.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Component Page */
.component-page {
  padding: 1rem;
}

.component-page .container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0;
}

.component-header h1 {
  font-size: 1.8rem;
  color: var(--text-color);
}

.component-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
  position: relative;
}
.component-header h2 {
  font-size: 1rem;
  color: var(--secondary-color);
  filter: brightness(72%);
}
.component-header .component-license {
  position: relative;
  top: 0;
  right: 0;
}

.component-preview {
  margin: 1rem auto;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--primary-color);
  padding: 1rem;
  background: #ddd;
  min-height: 300px;
  display: flex;
  align-content: center;
  flex-wrap: wrap;
}

.component-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.component-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn.html-css {
  background-color: #e54c21;
  border-color: #b32a1b;
}

.btn.tailwind {
  background-color: #00bcff;
  border-color: #0074ab;
}

.component-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.component-tag {
  background: #4f4f4f;
  color: #fff;
  padding: 0.2rem 0.4rem;
  font-size: 0.875rem;
  border-radius: 4px;
  text-decoration: none;
}
.component-tag:hover {
  filter: brightness(72%);
}

.component-license {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
}
.component-license.free {
  background: #229922;
  color: #fff;
}
.component-license.pro {
  background: #ffc107;
  color: #000;
  border: 1px solid #000;
  font-weight: 600;
}

/* COLLECTION GRID */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.collection-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  border: 2px solid #eee;
}
.collection-card:hover {
  border-color: var(--secondary-color);
}
.collection-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.collection-info p {
  color: var(--light-color);
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 1300px) {
  .components-grid {
    margin-right: -3rem;
  }
  .component-card {
    width: 48%;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }
  .component-detail {
    padding: 1rem;
  }
  .component-detail .container {
    padding: 1.5rem;
  }
  .component-actions {
    flex-direction: column;
  }
  .copy-button {
    width: 100%;
    justify-content: center;
  }
  .components-grid {
    margin-right: 0;
  }
  .component-card {
    width: 100%;
    padding-right: 0;
  }
}