/* Global Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #232526, #414345);
  border-radius: 12px;
    color: #fff;
  padding: 20px;
}

.component-container {
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #edebeb;
}

/* Tab Container */
.tab-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.tab-btn {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  padding: 8px 16px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}
.tab-btn:hover,
.tab-btn.active {
  background: linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  );
}

.tab-category-container{
      display: flex;
    align-items: flex-start;
}

/* Card Container Grid */
.card-container,
#card-container,
#palette-container {
display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Component Card (used for Card UI components) */
.component-card {
  background: #1e1e1e;
  color: #fff;
  border: 2px solid #1abc9c;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.component-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

.component-card h3 {
  margin-bottom: 15px;
  font-size: 1.2em;
}

/* Preview Iframe Styling */
.preview-iframe {
  width: 100%;
  aspect-ratio: 12 / 10;
  border: none;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden;
  display: block;
}

/* "View Code" Button */
.view-code-btn {
  background: #1abc9c;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 1em;
}
.view-code-btn:hover {
  background: #17a589;
}

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

/* Modal Content */
.modal-content {
  background: #2a2a2a;
  color: #fff;
  margin: 100px auto;
  padding: 20px;
  border-radius: 8px;
  max-width: 700px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  text-align: left;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close-btn:hover {
  color: #ccc;
}

.modal-content h3 {
  margin-top: 30px;
  font-size: 1.1em;
  color: #e0e0e0;
}

pre {
  background: #1e1e1e;
  padding: 10px;
  margin-bottom: 10px;
  overflow-x: auto;
  border-radius: 5px;
  font-size: 0.9em;
  max-height: 200px;
  white-space: pre-wrap;
  color: #fff;
}

.copy-btn {
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  margin-bottom: 20px;
  margin-right: 10px;
  transition: background 0.3s ease;
}
.copy-btn:hover {
  background: #17a589;
}

/* Sub-tab Container */
.sub-tab-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 20px;
  gap: 8px; /* Reduced spacing between sub-tabs */
}

/* Sub-tab Buttons */
.sub-tab-btn {
  background: #555; /* Lighter dark background for sub-tabs */
  color: #ddd; /* Light gray text color */
  border: 1px solid #666; /* Subtle border for sub-tabs */
  padding: 6px 12px; /* Smaller padding for sub-tabs */
  border-radius: 3px; /* Slightly rounded corners */
  cursor: pointer;
  font-size: 0.8em; /* Smaller font size */
  transition: background 0.3s ease, transform 0.2s ease, color 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.sub-tab-btn:hover {
  background: linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  ); /* Blue highlight color on hover */
  color: #fff; /* White text on hover */
  transform: translateY(-2px); /* Slight lift effect */
}

.sub-tab-btn.active {
  background: linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  ); /* Blue color for active state */
  color: #fff; /* White text for active state */
  border: 1px solid linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  ); /* Slightly lighter border for active state */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); /* Enhanced shadow for active state */
}

/* Responsive Design for Sub-tabs */
@media (max-width: 768px) {
  .sub-tab-container {
    flex-wrap: wrap; /* Allow sub-tabs to wrap on smaller screens */
    gap: 5px; /* Adjust spacing for smaller screens */
  }
  .sub-tab-btn {
    padding: 5px 10px; /* Adjust padding for smaller screens */
    font-size: 0.7em; /* Smaller font size for smaller screens */
  }
}


/* Dark theme and new components styling */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.component-container {
    /* width: 100%;
    max-width: 1200px; */
    margin: 0 auto;
    padding: 20px;
}

h2, h3 {
    color: #ffffff;
}

/* Search bar styling */
.search-container {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 40px;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 16px;
    background-color: #1e1e1e;
    color: #ffffff;
    box-sizing: border-box;
}

#search-input:focus {
    outline: none;
    border-color: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

/* Tab containers styling */
.tab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
}

.tab-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

.tab-btn {
    padding: 8px 16px;
    background: #333;
    color: #e0e0e0;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
    color: white;
}

.sub-tab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sub-tab-btn {
    padding: 6px 12px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-tab-btn.active {
    background: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
    color: white;
}

.more-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 32px;
}

/* Card container styling */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.component-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.preview-iframe {
    width: 100%;
border: none;
border-radius: 6px;
margin: 10px 0;
background: transparent;
}

.view-code-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.view-code-btn:hover {
    background: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #1e1e1e;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

pre {
    background: #121212;
    color: #e0e0e0;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
}

.copy-btn {
    padding: 8px 16px;
    background: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

/* Pagination styling */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 5px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1e1e1e;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-num.active {
    background: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
    color: white;
    border-color: linear-gradient(
      81.02deg,
      rgb(250, 85, 96) -23.47%,
      rgb(177, 75, 244) 45.52%,
      rgb(77, 145, 255) 114.8%
    );
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1e1e1e;
    color: #e0e0e0;
    cursor: pointer;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ellipsis {
    padding: 0 5px;
    color: #e0e0e0;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #888;
}

.card-type-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #2a2a2a;
    border-radius: 12px;
    font-size: 12px;
    color: #e0e0e0;
    margin-right: 8px;
}


