/* ===========================
   Hex-Rays Plugin Repository v2
   Figma Design Implementation
   =========================== */

/* CSS Variables */
:root {
  /* Colors from Figma */
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-text-primary: #222222;
  --color-text-secondary: #454545;
  --color-text-muted: #9d9d9d;
  --color-text-dark: #262e35;
  --color-border: #d7d7d7;
  --color-gray-light: #e6e6e6;
  --color-link: #2d73ff;
  --color-subtitle: #888888;

  /* Layout */
  --header-height: 54px;
  --sidebar-width: 280px;
  --content-padding: 20px;
}

/* Lucide icons: track font-size like the old icon-font did. */
svg.lucide {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
  stroke-width: 1.75;
}
/* Pre-Lucide-init: hide the placeholder <i data-lucide> so we don't get a flash. */
i[data-lucide] {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===========================
   Header - 64px height, glass effect
   =========================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.logo-text {
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-primary);
}

.logo-text strong {
  font-weight: 800;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-primary);
  padding: 4px;
  transition: background 0.15s;
}

.nav-item.active {
  background: var(--color-gray-light);
  border-radius: 4px;
  padding: 4px 8px;
}

.nav-item:hover:not(.active) {
  opacity: 0.7;
}

/* Theme Toggle */
.theme-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.theme-toggle-inner {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 4px;
  gap: 4px;
}

.theme-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: background 0.15s;
}

.theme-btn.active {
  background: var(--color-gray-light);
}

.theme-btn:hover:not(.active) {
  background: var(--color-gray-light);
  opacity: 0.5;
}

/* ===========================
   Main Layout
   =========================== */

.main-layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ===========================
   Sidebar - Figma Card Design
   =========================== */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: transparent;
  padding: 20px 14px;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

/* Sidebar inner - no card wrapper */
.sidebar-inner {
  padding: 0;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-header {
  font-family: 'Geist', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: #7a7a7a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0;
  padding: 6px 8px;
}

.sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #454545;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Divider as an inset pseudo-element so the rounded corners stay clean */
.sidebar-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -0.5px;
  height: 1px;
  background: #ebebeb;
  pointer-events: none;
}

.sidebar-item:hover {
  background: #f0f0f0;
  color: var(--color-text-primary);
}

.sidebar-item.active {
  color: var(--color-text-primary);
  background: #ebebeb;
  font-weight: 500;
}

/* Hide the divider on the active/hovered item and on its previous sibling
   so the rounded fill never collides with a line */
.sidebar-item:hover::after,
.sidebar-item.active::after,
.sidebar-item:has(+ .sidebar-item:hover)::after,
.sidebar-item:has(+ .sidebar-item.active)::after {
  display: none;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
  flex-shrink: 0;
  color: #222222;
}

.sidebar-item-label {
  flex: 1;
  line-height: 1.25;
}

/* Count pill with shadow */
.sidebar-count {
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #454545;
  background: var(--color-white);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 5px;
  min-width: 24px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-divider {
  display: none;
}

/* ===========================
   Main Content
   =========================== */

.content {
  flex: 1;
  padding: 0 var(--content-padding) var(--content-padding) var(--content-padding);
  overflow: visible;
  min-width: 0;
}

/* ===========================
   Promo Banner
   =========================== */

.promo-banner {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  height: 72px;
  margin-left: calc(-1 * var(--content-padding));
  margin-right: calc(-1 * var(--content-padding));
  margin-bottom: 0;
}

.promo-banner.hidden {
  display: none;
}

#bannerToggle {
  margin-left: 8px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

#bannerToggle:hover {
  opacity: 1;
}

#bannerToggle.active {
  opacity: 1;
}

.promo-banner:hover {
  opacity: 0.95;
}

.promo-banner-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.promo-banner-bg-img {
  position: absolute;
  top: -120%;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 420%;
  object-fit: cover;
}

.promo-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

.promo-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 100%;
}

.promo-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.promo-banner-icon {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
}

.promo-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.promo-banner-title {
  font-family: 'Geist', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.promo-banner-subtitle {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
  opacity: 0.85;
}

.promo-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%), #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #0c0a09;
  white-space: nowrap;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.04);
}

.promo-banner-btn i {
  font-size: 14px;
}

/* Intro Section - Same width as plugin sections */
.intro-section {
  text-align: center;
  margin-bottom: 24px;
  padding: 40px 0;
  margin-left: calc(-1 * var(--content-padding));
  margin-right: calc(-1 * var(--content-padding));
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
  position: relative;
  background-color: var(--color-bg);
  overflow: visible;
  z-index: 10;
}

/* Hero dither canvas (WebGL warp-dither background) */
.hero-dither {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
  image-rendering: pixelated;
  /* Light mode: shader paints white -> invert to dark dots on light bg */
  opacity: 0.18;
  filter: invert(1);
  /* Tall, generous hollow so the title, copy, and search bar all sit on clean bg */
  -webkit-mask-image: radial-gradient(ellipse 58% 130% at 50% 50%, transparent 0%, transparent 42%, #000 100%);
  mask-image: radial-gradient(ellipse 58% 130% at 50% 50%, transparent 0%, transparent 42%, #000 100%);
}

html[data-theme="dark"] .hero-dither {
  /* Dark mode: white dots read directly on dark bg, no inversion */
  opacity: 0.12;
  filter: none;
}


/* Intro content above grid */
.intro-content {
  position: relative;
  z-index: 1;
}

.intro-section h2 {
  font-family: 'Geist', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 10px;
  text-decoration: none !important;
}

.intro-section p {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

/* Search Bar */
.search-bar {
  position: relative;
  margin: 0 auto;
  max-width: 659px;
  z-index: 200;
}

.search-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.search-backdrop.active {
  display: block;
}

html[data-theme="dark"] .search-backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  font-size: 18px;
  color: #9d9d9d;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Geist', sans-serif;
  color: var(--color-text-primary);
  background: var(--color-white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-link);
  box-shadow: 0 0 0 3px rgba(45, 115, 255, 0.1);
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-results.active {
  display: block;
}

.search-results-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--color-border);
  background: #f9f9f9;
  border-radius: 12px 12px 0 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f5f5f5;
}

.search-result-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-result-icon i {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

.search-result-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.search-result-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
  text-align: left;
}

.search-result-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-type {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-link);
  background: rgba(45, 115, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.search-no-results {
  padding: 24px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.search-group-header {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--color-border);
  background: #f9f9f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-group-header:first-child {
  border-radius: 12px 12px 0 0;
}

.search-group-count {
  font-size: 10px;
  font-weight: 500;
  background: var(--color-gray-light);
  color: var(--color-text-muted);
  padding: 1px 6px;
  border-radius: 10px;
}

.search-see-more {
  display: block;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.search-see-more:hover {
  background: rgba(45, 115, 255, 0.05);
}

.search-result-icon--img {
  overflow: hidden;
}

.search-result-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.search-result-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-link) 0%, #5b9aff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-avatar span {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.search-result-type--app {
  color: #0f7353;
  background: rgba(15, 115, 83, 0.1);
}

.search-result-type--script {
  color: #9A3412;
  background: rgba(154, 52, 18, 0.1);
}

.search-result-type--author {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

/* ===========================
   Plugin Sections - Same width as intro section
   =========================== */

.plugin-section {
  margin-bottom: 40px;
  margin-left: calc(-1 * var(--content-padding));
  margin-right: calc(-1 * var(--content-padding));
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
  position: relative;
  z-index: 1;
}

/* Section Header - Full width stripe as background */
.section-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0;
  min-height: 58px;
  overflow: visible;
}

/* Stripe pattern - full width background */
.section-stripe {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--content-padding));
  right: calc(-1 * var(--content-padding));
  bottom: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 6px,
    #d0d0d0 6px,
    #d0d0d0 7px
  );
  z-index: 0;
  pointer-events: none;
}

/* Title block with white background - extends to left edge, flush at top */
.section-header-left {
  position: relative;
  z-index: 1;
  background: var(--color-white);
  padding: 0 16px 6px 0;
  margin-left: calc(-1 * var(--content-padding));
  padding-left: var(--content-padding);
}

/* Section header title - only first letter underlined */
.section-header h3 {
  font-family: 'Geist', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #222222;
  margin-bottom: 3px;
  line-height: 24px;
}

/* First letter underline */
.section-header h3 .underline {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.section-header p {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #888888;
  line-height: 16px;
}

/* See All Button - smaller, on top of stripe */
.see-all-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  margin-right: 16px;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #0c0a09;
  background: var(--color-white);
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.15s, border-color 0.15s;
}

.see-all-link:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.see-all-link svg,
.see-all-link i {
  width: 12px;
  height: 12px;
  font-size: 12px;
}

/* Plugin Grid - 3 columns, 16px gap */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ===========================
   Plugin Card
   =========================== */

.plugin-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  will-change: transform;
}

.plugin-card:hover {
  background: #f8f8f8;
  border-color: #c0c0c0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
}

.card-avatar {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.card-avatar svg,
.card-avatar i {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
}

/* Avatar with plugin image */
.card-avatar.has-image {
  background: #f5f5f5;
  overflow: hidden;
}

.card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Company logo badge - bottom right corner */
.card-avatar-company {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: white;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  object-fit: contain;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.card-title {
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.card-publisher {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-link);
  text-decoration: none;
  transition: opacity 0.15s;
}

.card-publisher:hover {
  opacity: 0.8;
}

.card-publisher-name {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publisher-check {
  width: 12px;
  height: 12px;
  font-size: 12px;
  color: #10b981;
  flex-shrink: 0;
}

/* Trophy badge */
.card-trophy {
  width: 28px;
  height: 28px;
  background: #fef3c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-trophy svg,
.card-trophy i {
  width: 16px;
  height: 16px;
  font-size: 16px;
  color: #f59e0b;
  stroke-width: 2.25;
}

/* Card Description */
.card-description {
  font-family: 'Geist Mono', 'Fira Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Install Pill */
.card-install {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 0 10px;
  height: 34px;
  margin-top: 12px;
}

.card-install-text {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-primary);
  flex: 1;
}

.card-install-copy {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}

.card-install-copy:hover {
  color: var(--color-text-primary);
}

/* Card Stripe Divider - same pattern as section header */
.card-stripe {
  height: 14px;
  margin: 12px -20px;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 5px,
    #e0e0e0 5px,
    #e0e0e0 6px
  );
}

/* Card Meta */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #666666;
}

.card-meta-item svg,
.card-meta-item i {
  width: 14px;
  height: 14px;
  font-size: 14px;
  flex-shrink: 0;
  color: #999999;
}

/* ===========================
   CTA Section - Light blue with image
   =========================== */

.cta-section {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 48px 64px;
  margin-top: 32px;
  margin-bottom: 48px;
  background-color: #111111;
}

.cta-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta-section h3 {
  font-size: 34px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 16px;
  font-weight: 400;
  color: #a0a0a0;
  margin-bottom: 24px;
  max-width: 500px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-dark {
  background: #ffffff;
  color: #111111;
}

.btn-dark:hover {
  background: #e0e0e0;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid #555555;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===========================
   Footer
   =========================== */

.footer {
  background: #f8f8f8;
  border-top: 1px solid var(--color-border);
  padding: 48px 48px 32px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.footer-column a {
  display: block;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
  transition: color 0.15s;
}

.footer-column a:hover {
  color: var(--color-text-primary);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.footer-social span {
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-social-icons {
  display: flex;
  gap: 12px;
}

.footer-social-icons a {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  transition: color 0.15s;
}

.footer-social-icons a:hover {
  color: var(--color-text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.footer-logo svg {
  width: 28px;
  height: 28px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 1400px) {
  .plugin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .sidebar {
    display: none;
  }

  .content {
    max-width: 100%;
  }

  .header-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .plugin-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 32px 24px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ===========================
   Dark Mode
   =========================== */

html[data-theme="dark"] {
  --color-white: #1a1a1a;
  --color-bg: #0f0f0f;
  --color-text-primary: #f0f0f0;
  --color-text-secondary: #b0b0b0;
  --color-text-muted: #707070;
  --color-text-dark: #e0e0e0;
  --color-border: #2a2a2a;
  --color-gray-light: #252525;
  --color-link: #5b9aff;
  --color-subtitle: #888888;
}

html[data-theme="dark"] body {
  background: var(--color-bg);
}

html[data-theme="dark"] .header {
  background: rgba(15, 15, 15, 0.85);
  border-bottom-color: var(--color-border);
}

html[data-theme="dark"] .sidebar {
  background: var(--color-bg);
}

html[data-theme="dark"] .sidebar-item {
  color: var(--color-text-secondary);
}

html[data-theme="dark"] .sidebar-item:not(:last-child)::after {
  background: #252525;
}

html[data-theme="dark"] .sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
}

html[data-theme="dark"] .sidebar-item.active {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 500;
}

html[data-theme="dark"] .sidebar-icon {
  color: var(--color-text-secondary);
}

html[data-theme="dark"] .sidebar-count {
  background: #252525;
  border-color: #333;
  color: var(--color-text-secondary);
}

html[data-theme="dark"] .intro-section {
  background-color: #0f0f0f;
}


html[data-theme="dark"] .search-input {
  background: #1a1a1a;
  border-color: #333;
  color: var(--color-text-primary);
}

html[data-theme="dark"] .search-input::placeholder {
  color: var(--color-text-muted);
}

html[data-theme="dark"] .section-stripe {
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 6px,
    #2a2a2a 6px,
    #2a2a2a 7px
  );
}

html[data-theme="dark"] .section-header-left {
  background: var(--color-bg);
}

html[data-theme="dark"] .section-header h3 {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .see-all-link {
  background: #1a1a1a;
  border-color: #333;
  color: var(--color-text-secondary);
}

html[data-theme="dark"] .plugin-card {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .plugin-card:hover {
  background: #222222;
  border-color: #444;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .card-title {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .card-description {
  color: var(--color-text-muted);
}

html[data-theme="dark"] .card-install {
  background: #252525;
}

html[data-theme="dark"] .card-install-text {
  color: var(--color-text-secondary);
}

html[data-theme="dark"] .card-stripe {
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 5px,
    #2a2a2a 5px,
    #2a2a2a 6px
  );
}

html[data-theme="dark"] .card-meta-item {
  color: var(--color-text-muted);
}

html[data-theme="dark"] .card-meta-item svg,
html[data-theme="dark"] .card-meta-item i {
  color: var(--color-text-muted);
}

/* CTA section dark mode */
html[data-theme="dark"] .cta-section {
  background-color: #f0f0f0;
}

html[data-theme="dark"] .cta-canvas {
  opacity: 0.25;
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .cta-section h3 {
  color: #111111;
}

html[data-theme="dark"] .cta-section p {
  color: #555555;
}

html[data-theme="dark"] .cta-section .btn-dark {
  background: #111111;
  color: #ffffff;
}

html[data-theme="dark"] .cta-section .btn-dark:hover {
  background: #333333;
}

html[data-theme="dark"] .cta-section .btn-outline {
  border-color: #999999;
  color: #111111;
  background: transparent;
}

html[data-theme="dark"] .cta-section .btn-outline:hover {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .footer {
  background: #0a0a0a;
  border-top-color: var(--color-border);
}

html[data-theme="dark"] .footer-social {
  border-color: var(--color-border);
}

html[data-theme="dark"] .search-results {
  background: #1a1a1a;
  border-color: #333;
}

html[data-theme="dark"] .search-results-header {
  background: #151515;
  border-bottom-color: #333;
}

html[data-theme="dark"] .search-result-item {
  border-bottom-color: #252525;
}

html[data-theme="dark"] .search-result-item:hover {
  background: #222;
}

html[data-theme="dark"] .search-result-name {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .search-group-header {
  background: #151515;
  border-bottom-color: #333;
}

html[data-theme="dark"] .search-group-count {
  background: #333;
  color: #999;
}

html[data-theme="dark"] .search-see-more {
  border-bottom-color: #252525;
}

html[data-theme="dark"] .search-see-more:hover {
  background: rgba(45, 115, 255, 0.1);
}

html[data-theme="dark"] .card-avatar.has-image {
  background: #252525;
}

html[data-theme="dark"] .card-avatar-company {
  background: #1a1a1a;
  border-color: #1a1a1a;
}
