/* 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;
}

/* Back Button Styles */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  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;
  padding: 10px 20px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 20px;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(250, 85, 96, 0.4);
}

.back-button:active {
  transform: translateY(0);
}

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

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

/* Chart Container Grid Layout */
#chart-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Component Card Styling */
.component-card {
  background: #1e1e1e;
  color: #fff;
  border: 0.5px solid rgb(177, 75, 244);
  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%;
  height: 200px;
  border: none;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden; /* Prevent scrollbars */
}

/* "View Code" Button Styling */
.view-code-btn {
  background: linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  );
  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: linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  );
}

/* 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: linear-gradient(
    81.02deg,
    rgb(250, 85, 96) -23.47%,
    rgb(177, 75, 244) 45.52%,
    rgb(77, 145, 255) 114.8%
  );
  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;
}

        /* Additional styles for new components */
        .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-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #666;
        }
        
        .category-tabs-container {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            overflow-x: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        
        .category-tabs-container::-webkit-scrollbar {
            display: none;
        }
        
        .category-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .tab-btn {
            padding: 8px 16px;
            background: #f5f5f5;
            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;
        }
        
        .more-btn {
            display: flex;
            align-items: center;
            margin-left: 10px;
            background: transparent;
            border: none;
            color: linear-gradient(
              81.02deg,
              rgb(250, 85, 96) -23.47%,
              rgb(177, 75, 244) 45.52%,
              rgb(77, 145, 255) 114.8%
            );
            font-size: 14px;
            cursor: pointer;
            padding: 8px 12px;
        }
        
        .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 #e0e0e0;
            border-radius: 4px;
            background: white;
            cursor: pointer;
        }
        
        .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: #2563eb; */
        }
        
        .pagination-btn {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            background: white;
            cursor: pointer;
        }
        
        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .ellipsis {
            padding: 0 5px;
        }
        
        .no-results {
            text-align: center;
            padding: 30px;
            color: #666;
        }
        .category-badge {
            display: inline-block;
            padding: 4px 8px;
            background: #f0f0f0;
            border-radius: 12px;
            font-size: 12px;
            color: #666;
            margin-left: 10px;
            vertical-align: middle;
        }
        
        .component-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            justify-content: center;
        }
    