/* ============================================
   CSS Variables
   ============================================ */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #38bdf8;
  --secondary: #78716c;
  --accent: #38bdf8;
  --success: #22c55e;
  --background: #fafaf9;
  --surface: #ffffff;
  --border: #e7e5e4;
  --text-primary: #1c1917;
  --text-secondary: #78716c;
  --text-muted: #a8a29e;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --background: #09090b;
  --surface: #18181b;
  --border: #3f3f46;
  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ============================================
   Base Styles
   ============================================ */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ============================================
   i18n Loading: skeleton screen pattern
   - [data-i18n] text is invisible until translations apply
   - .skeleton shimmers as placeholder in the meantime
   - After i18n-ready: text appears, skeletons hide
   ============================================ */
body:not(.i18n-ready) [data-i18n]:not([data-i18n-attr]) {
  color: transparent;
  /* keep layout, just hide the English text */
  position: relative;
}
body.i18n-ready { transition: none; }
body.i18n-ready .skeleton { display: none !important; }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 4px;
  display: inline-block;
  pointer-events: none;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text  { height: .85em; width: 3em; vertical-align: middle; }
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

/* ============================================
   Language Selector Styles
   ============================================ */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .15s, box-shadow .15s;
}

.lang-trigger:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .08);
}

.lang-trigger svg {
  flex-shrink: 0;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .13);
  padding: 12px;
  z-index: 9999;
  min-width: 380px;
}
/* RTL: flip to open left-aligned so it doesn't clip off screen */
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }

.lang-dropdown.lang-dd-open {
  display: block;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

@media (max-width: 480px) {
  .lang-dropdown {
    min-width: min(92vw, 340px);
  }
  .lang-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-primary);
  transition: background .12s;
  white-space: nowrap;
  border: 1px solid transparent;
}

.lang-item:hover {
  background: var(--background);
  border-color: var(--primary-light);
}

.lang-item.lang-active {
  background: var(--background);
  border-color: var(--primary);
  font-weight: 600;
  color: var(--primary);
}

.lang-item .fi {
  border-radius: 2px;
  flex-shrink: 0;
}

/* ============================================
   Drop Zone Styles
   ============================================ */
.drop-zone {
  border: 2px dashed #d6d3d1;
  transition: all 0.2s;
}

.drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.04);
}

/* ============================================
   Hero Animation
   ============================================ */
.hero-img {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   Category Card Styles
   ============================================ */
.cat-card:hover .cat-img {
  transform: scale(1.05);
}

.cat-img {
  transition: transform 0.4s ease;
}

/* ============================================
   Dropdown Styles
   ============================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
  padding: 14px 0 6px;
  min-width: 180px;
  z-index: 100;
  margin-top: -8px;
}

.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: background .15s;
}

.dropdown-menu a:hover {
  background: var(--background);
  color: var(--primary);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-toggle {
  cursor: pointer;
  font-size: 13px;
}

/* ============================================
   URL Builder Specific Styles
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--surface);
  min-height: 100vh;
}

nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.6);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-bg-light {
  background: rgba(255, 255, 255, 0.8);
}

.skeleton-text {
  width: 48px;
  height: 0.85em;
  vertical-align: middle;
}

.endpoint-config {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.endpoint-config.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

[data-theme="dark"] nav {
  background: rgba(9, 9, 11, 0.8) !important;
  border-bottom: 1px solid rgba(63, 63, 70, 0.6);
}

[data-theme="dark"] nav .logo span {
  color: var(--text-primary);
}

[data-theme="dark"] .dropdown-toggle {
  color: var(--text-primary);
}

nav .nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

nav .logo img {
  width: 32px;
  height: 32px;
}

nav .logo span {
  font-weight: 700;
  font-size: 1.25em;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.875em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.nav-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .08);
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

nav .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

nav .nav-links a:hover {
  color: var(--primary);
}

nav .nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.btn-docs {
  background: linear-gradient(to right, #0284c7, #0ea5e9);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
  transition: all 0.2s ease;
}

nav .nav-links .btn-docs:hover {
  background: linear-gradient(to right, #0369a1, #0284c7);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(14, 165, 233, 0.3);
}

nav .nav-links a[href="/docs"] {
  color: white !important;
}

nav .nav-links a[href="/docs"]:hover {
  color: white !important;
}

header {
  background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
  color: var(--text-primary);
  padding: 40px 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header p {
  font-size: 1.125em;
  opacity: 0.95;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  nav .nav-container {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  nav#site-nav {
    flex-wrap: wrap;
  }

  nav#site-nav > .nav-toggle {
    margin-left: auto;
  }

  nav .nav-links {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-toggle {
    display: inline-flex;
    align-self: flex-end;
  }

  nav .nav-links {
    display: none !important;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
  }

  nav.nav-mobile-open .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  nav .nav-links a,
  nav .nav-links span,
  nav .nav-links .dropdown {
    padding: 10px 10px;
    border-radius: 10px;
  }

  nav .nav-links a:hover,
  nav .nav-links span:hover {
    background: var(--background);
  }

  .dropdown-menu {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 0;
    box-shadow: none;
    border-radius: 10px;
    padding: 8px 0;
  }

  .dropdown:hover .dropdown-menu {
    display: none;
  }

  nav.nav-mobile-open .dropdown-menu {
    display: block;
  }
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px;
  align-items: start;
}

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

@media (min-width: 969px) {
  .panel.sticky {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scroll-behavior: smooth;
  }

  .panel.sticky::-webkit-scrollbar {
    width: 8px;
  }

  .panel.sticky::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .panel.sticky::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
  }

  .panel.sticky::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
  }
}

.panel {
  background: var(--surface);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  color: var(--text-primary);
  margin-bottom: 24px;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--surface);
  color: var(--text-primary);
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--primary-light);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.section {
  margin-bottom: 25px;
}

.section h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.url-output-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.url-output {
  background: var(--text-primary);
  color: var(--success);
  padding: 20px;
  padding-right: 50px;
  border-radius: 10px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
  word-break: break-all;
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.url-copy-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  color: var(--success);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.url-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.url-copy-btn svg {
  width: 18px;
  height: 18px;
}

.preview-container {
  margin-top: 20px;
  display: none;
}

.preview-container.show {
  display: block;
}

.preview-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.preview-container.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -20px;
  margin-left: -20px;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}

.preview-container.loading .preview-image {
  opacity: 0.3;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.preview-container:not(.loading) .preview-image {
  opacity: 1;
  filter: grayscale(0%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.preview-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: zoom-in;
  transition: transform 0.3s;
}

.preview-container.loading .preview-image {
  cursor: default;
  pointer-events: none;
}

.image-info {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--background);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.preview-container.show .image-info {
  display: flex;
}

.preview-image:hover {
  transform: scale(1.02);
}

.image-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================
   Zoom Modal
   ============================================ */
.zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.zoom-modal.active {
  display: flex;
}

.zoom-modal img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

.zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.zoom-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.zoom-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 14px;
}

/* ============================================
   Button Styles
   ============================================ */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

button {
  flex: 1;
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--background);
  border-color: var(--text-muted);
}

/* ============================================
   Endpoint Tabs
   ============================================ */
.endpoint-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.endpoint-tab {
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.endpoint-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.endpoint-tab:hover:not(.active) {
  background: var(--background);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   Vertical Endpoint Sidebar
   ============================================ */
.url-builder-layout {
  position: relative;
}

.endpoint-sidebar-fixed {
  position: fixed;
  left: 20px;
  top: 80px;
  width: 60px;
  z-index: 100;
}

.endpoint-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.endpoint-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  position: relative;
}

.endpoint-sidebar-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.endpoint-sidebar-item span:not(.tooltip) {
  display: none;
}

.endpoint-sidebar-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.endpoint-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: white;
  border-radius: 2px;
}

.endpoint-sidebar-item.active i {
  color: white;
}

.endpoint-sidebar-item:hover:not(.active) {
  background: var(--background);
  border-color: var(--primary-light);
  color: var(--primary);
}

.endpoint-sidebar-item .tooltip {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  padding: 6px 10px;
  background: var(--text-primary);
  color: var(--surface);
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.endpoint-sidebar-item:hover .tooltip {
  opacity: 1;
}

/* ============================================
   Social Network Brand Colors
   ============================================ */
.fab.fa-instagram,
.fab.fa-instagram:hover {
  color: #E4405F;
}

.fab.fa-youtube,
.fab.fa-youtube:hover {
  color: #FF0000;
}

.fab.fa-facebook,
.fab.fa-facebook:hover {
  color: #1877F2;
}

.fab.fa-x-twitter,
.fab.fa-x-twitter:hover {
  color: #000000;
}

.fab.fa-linkedin,
.fab.fa-linkedin:hover {
  color: #0A66C2;
}

.fab.fa-tiktok,
.fab.fa-tiktok:hover {
  color: #000000;
}

/* ============================================
   Size Overlay Badge
   ============================================ */
.size-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  z-index: 5;
  pointer-events: none;
}

[data-theme="dark"] .size-badge {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
}

/* ============================================
   Info Badge
   ============================================ */
.info-badge {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
  letter-spacing: 0.02em;
}

/* ============================================
   Feature List
   ============================================ */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.feature-card {
  background: var(--background);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card h4 {
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.feature-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   QR Code Modal
   ============================================ */
.qr-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.qr-modal.active {
  display: flex;
}

.qr-content {
  background: var(--surface);
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.qr-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-close-x:hover {
  background: var(--background);
  color: var(--text-primary);
}

.qr-close-x svg {
  width: 20px;
  height: 20px;
}

.qr-content h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.qr-canvas-wrapper {
  background: white;
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  display: inline-block;
  box-shadow: var(--shadow-sm);
}

.qr-content canvas {
  display: block;
  border-radius: 8px;
}

.qr-close {
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.qr-close:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ============================================
   Keyboard Shortcuts Hint
   ============================================ */
.shortcuts-hint {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.shortcuts-hint kbd {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 11px;
  margin: 0 2px;
}

/* ============================================
   Utility Classes
   ============================================ */
.endpoint-config {
  display: block;
}

.endpoint-config[style*="display:none"] {
  display: none;
}

.nav-link-active {
  color: var(--primary) !important;
  font-weight: 600 !important;
}

.preview-hint {
  color: var(--text-muted);
  font-size: 11px;
}

.section-margin-top {
  margin-top: 30px;
}

.qr-subtitle {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ============================================
   Copy Button Styles
   ============================================ */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

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

.cat-card:hover .copy-btn,
.copy-btn.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .copy-btn {
    opacity: 1;
  }
}

.copy-btn.copied {
  background: var(--success);
  opacity: 1;
}

/* ============================================
   Small Code Copy Button
   ============================================ */
.code-copy-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.code-copy-wrapper code {
  display: block;
  padding-right: 32px;
}

.code-copy-btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.code-copy-btn:hover {
  background: var(--background);
  color: var(--primary);
  opacity: 1;
}

/* Light color for copy buttons on dark backgrounds */
.bg-slate-800 .code-copy-btn,
.bg-sky-900 .code-copy-btn,
.bg-black .code-copy-btn {
  color: white;
  opacity: 1;
}

.bg-slate-800 .code-copy-btn:hover,
.bg-sky-900 .code-copy-btn:hover,
.bg-black .code-copy-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   Explorer Page Styles
   ============================================ */
.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.explorer-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  border: 1px solid #e2e8f0;
}

.explorer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.explorer-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.explorer-info {
  padding: .75rem 1rem;
}

.explorer-id {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .25rem;
}

.explorer-id a {
  color: #1e293b;
  text-decoration: none;
}

.explorer-id a:hover {
  color: #3b82f6;
}

.explorer-meta {
  font-size: .8rem;
  color: #64748b;
  margin-bottom: .5rem;
}

.explorer-links {
  display: flex;
  gap: .75rem;
  font-size: .85rem;
}

.explorer-links a {
  color: #3b82f6;
  text-decoration: none;
}

.explorer-links a:hover {
  text-decoration: underline;
}

/* ============================================
   Palette Page Styles
   ============================================ */
.palette-controls {
  max-width: 1400px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}

.palette-search-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
}

.palette-search-bar input {
  flex: 1;
  padding: .6rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: .9rem;
}

.palette-search-bar button {
  padding: .6rem 1.2rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
}

.palette-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.palette-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: 6px;
  background: white;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  text-decoration: none;
  font-size: .85rem;
}

.palette-cat-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.palette-cat-btn:hover {
  background: #f1f5f9;
}

.palette-cat-btn .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.palette-swatch {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: transform .15s, box-shadow .15s;
}

.palette-swatch:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.palette-color-block {
  width: 100%;
  height: 120px;
  display: block;
}

.palette-color-info {
  padding: .6rem .8rem;
}

.palette-hex {
  font-family: ui-monospace, monospace;
  font-size: .85rem;
  font-weight: 600;
  display: block;
}

.palette-count {
  font-size: .75rem;
  color: #64748b;
}

.palette-samples {
  display: flex;
  gap: 2px;
  padding: 0 .8rem .8rem;
}

.palette-samples img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
}

.palette-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.palette-page-link {
  display: inline-block;
  padding: .4rem .8rem;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  text-decoration: none;
  font-size: .9rem;
  min-width: 2.2rem;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.palette-page-link.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.palette-page-link.disabled {
  color: #64748b;
  cursor: default;
}

/* ============================================
   Common Pagination Styles
   ============================================ */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.page-link {
  display: inline-block;
  padding: .4rem .8rem;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  text-decoration: none;
  font-size: .9rem;
  min-width: 2.2rem;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.page-link.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.page-link.disabled {
  color: #64748b;
  cursor: default;
}

.palette-scan-banner {
  max-width: 1400px;
  margin: 0 auto 1.25rem;
  padding: .6rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  font-size: .9rem;
  text-align: center;
}

/* ============================================
   Common Pagination Styles
   ============================================ */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.page-link {
  display: inline-block;
  padding: .4rem .8rem;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  text-decoration: none;
  font-size: .9rem;
  min-width: 2.2rem;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.page-link.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.page-link.disabled {
  color: #64748b;
  cursor: default;
}
