/* ============================================
   GREP Library - Layout CSS
   InDesign-style sidebar + detail panel
   ============================================ */

/* ============================================
   DESKTOP TYPOGRAPHY BEST PRACTICES (2024)
   ============================================
   
   HIERARCHY (use max 4-5 sizes):
   - Display/H1: 28-48px (2-3x body)
   - H2: 20-24px
   - Body/Default: 16px (minimum!)
   - Secondary: 14px
   - Captions: 12px (absolute minimum)
   
   INTERACTION-HEAVY PAGES (like ours):
   - Body: 14-16px
   - Inputs: 16px (prevents iOS zoom)
   - Buttons: 14px
   - List items: 14-16px
   - Tags: 12-14px
   
   LINE HEIGHT:
   - Body: 1.5-1.7
   - Headings: 1.2-1.3
   - UI elements: 1.3-1.4
   
   CONTRAST:
   - Min 4.5:1 for body text
   - Min 3:1 for large text (18px+)
   ============================================ */

/* ============================================
   DARK THEME BEST PRACTICES (2024)
   ============================================
   
   BACKGROUNDS:
   - Never use pure black (#000) - causes eye strain
   - Use dark gray (#121212 Material, #1a1a1a ours)
   - Elevation = lighter grays for higher surfaces
   
   TEXT:
   - Body: Light gray (#E0E0E0) not pure white
   - Headings: Can be brighter/white for emphasis
   - Muted: #888 for secondary info
   - Contrast ratio: min 4.5:1 for body text
   
   COLORS:
   - Desaturate accent colors ~20% for dark mode
   - Avoid pure saturated colors (eye strain)
   - Use rgba() for subtle backgrounds
   
   TAGS/CHIPS:
   - Filter tags (action): Filled style with accent
   - Display tags: Outline/ghost style (subtle)
   - Active state: Subtle highlight, not full fill
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --sidebar-width: 380px;
  --header-height: 70px;
  
  /* Dark theme backgrounds - NOT pure black */
  --border-color: #2a2a2a;
  --bg-sidebar: #1a1a1a;    /* Elevation 1 */
  --bg-detail: #0f0f0f;     /* Elevation 0 (base) */
  --bg-card: #1e1e1e;       /* Elevation 2 */
  --bg-input: #252525;      /* Elevation 3 */
  
  /* Accent colors - slightly desaturated for dark mode */
  --accent: #4facfe;
  --accent-hover: #3d9df7;
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;
  
  /* Text - NOT pure white */
  --text: #e5e5e5;          /* Body text */
  --text-muted: #999;       /* Secondary/disabled - WCAG compliant */
  --text-secondary: #bbb;   /* Less emphasis */
}

/* ============================================
   Base Layout
   ============================================ */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg-detail);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   Beta Banner
   ============================================ */
.beta-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  border-bottom: 1px solid #3b7ab8;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.beta-badge {
  background: #f59e0b;
  color: #000;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.beta-content { flex: 1; }
.beta-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 2px;
}
.beta-text {
  color: #bee3f8;
  font-size: 12px;
}
.beta-text a { color: #fbbf24; }
.beta-close {
  background: none;
  border: none;
  color: #bee3f8;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}
.beta-close:hover { color: #fff; }

/* ============================================
   Header
   ============================================ */
.app-header {
  height: var(--header-height);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
}
.logo-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.logo-tagline {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.2;
}
.logo-author {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.2;
}
.logo:hover .logo-title { color: var(--accent); }

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-right: 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.mobile-menu-toggle:hover {
  background: var(--bg-input);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg-input);
}
.nav-link.active {
  color: var(--accent);
  background: rgba(79, 172, 254, 0.1);
}

/* Hide nav on smaller screens */
@media (max-width: 999px) {
  .header-nav {
    display: none;
  }
}

/* ============================================
   Main Layout (Sidebar + Detail)
   ============================================ */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* Sidebar Search */
.sidebar-search {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}
.sidebar-search .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.sidebar-search .search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px 10px 38px;
  color: var(--text);
  font-size: 14px;
}
.sidebar-search .search-input:focus {
  outline: none;
  border-color: var(--accent);
}
.sidebar-search .search-input::placeholder {
  color: var(--text-muted);
}

/* Sidebar Filters */
.sidebar-filters {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 32px 10px 12px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.status-filters {
  display: flex;
  gap: 4px;
}
.status-btn {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 10px;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}
.status-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}
.status-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.verified { background: var(--success); }
.status-dot.community { background: var(--accent); }
.status-dot.pending { background: var(--warning); }

/* Sidebar Stats */
.sidebar-stats {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  justify-content: center;
}
.sidebar-stats .stat strong {
  color: var(--text);
}
.sidebar-stats .stat.verified strong { color: var(--success); }
.sidebar-stats .stat.community strong { color: var(--accent); }

/* Pattern List */
.pattern-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.pattern-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.pattern-item:hover {
  background: var(--bg-card);
}
.pattern-item.active {
  background: var(--bg-card);
  border-color: var(--accent);
}
.pattern-item:focus {
  outline: none;
  border-color: var(--accent);
}

.pattern-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.pattern-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pattern-status.verified { background: var(--success); }
.pattern-status.community { background: var(--accent); }
.pattern-status.pending { background: var(--warning); }

.pattern-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.pattern-rating-mini {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}

.pattern-rating-mini .mini-stars {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: -1px;
}



.pattern-rating-mini .rating-num {
  color: var(--text-secondary);
  font-weight: 500;
}

.pattern-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 14px;
  margin-top: 4px;
}

/* Pattern Tags - Outline/Ghost style (suptilniji od filter tagova)
   Best practice: Display tags koriste outline stil, action tags koriste filled stil */
.pattern-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.pattern-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79, 172, 254, 0.1);
}
/* Active = matches current filter - subtle highlight, not full accent */
.pattern-tag.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79, 172, 254, 0.15);
}
/* PRO tag - poseban stil */
.pattern-tag.pro {
  background: rgba(79, 172, 254, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

/* Active Tag Filter - hidden when no tags */
.active-filter {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(79, 172, 254, 0.05);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}
.active-filter.has-tags {
  display: flex;
}
.active-filter-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Hint Banners (Onboarding) */
.hint-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(136, 136, 136, 0.1);
  border-bottom: 1px solid rgba(136, 136, 136, 0.3);
  font-size: 11px;
}
.hint-banner.hidden {
  display: none;
}
.hint-text {
  flex: 1;
  color: #bbb;
  line-height: 1.4;
}
.hint-text strong {
  color: #ddd;
}
.hint-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.hint-close:hover {
  opacity: 1;
}
.hint-banner kbd {
  background: rgba(255,255,255,0.2);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: inherit;
  font-size: inherit;
  color: #ddd;
}
.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #000;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
  font-size: 11px;
}
.filter-tag button {
  background: none;
  border: none;
  color: rgba(0,0,0,0.6);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-left: 2px;
  line-height: 1;
}
.filter-tag button:hover {
  color: #000;
}
.active-filter-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  flex-shrink: 0;
}
.active-filter-clear:hover {
  color: var(--error);
}

/* Load More Button */
.load-more-btn {
  width: calc(100% - 16px);
  margin: 8px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.load-more-btn:hover {
  background: var(--bg-input);
  color: var(--text);
}

/* ============================================
   Detail Panel
   ============================================ */
.detail-panel {
  background: var(--bg-detail);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 0;
  position: relative;
}

/* Empty State */
.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}
.detail-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.detail-empty h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 8px 0;
}
.detail-empty p {
  font-size: 14px;
  margin: 0 0 24px 0;
  max-width: 300px;
}
.keyboard-hints {
  font-size: 12px;
  line-height: 2;
}
.keyboard-hints kbd {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 2px 8px;
  font-family: inherit;
  margin: 0 2px;
}

/* Detail Content */
.detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 40px 60px;
}

/* Detail Header */
.detail-header {
  margin-bottom: 32px;
}
.detail-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.detail-status {
}
.detail-rating-mini {
  display: none;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
}
.detail-rating-mini .rating-value {
  font-weight: 500;
}
.detail-rating-mini .rating-star {
  color: var(--text-muted);
}
.detail-rating-mini .rating-count {
  color: var(--text-muted);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.status-badge.verified {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}
.status-badge.community {
  background: rgba(79, 172, 254, 0.15);
  color: var(--accent);
}
.status-badge.pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.meta-group {
  color: var(--accent);
  cursor: pointer;
}
.meta-group:hover {
  text-decoration: underline;
}
.meta-author {
  color: var(--text-muted);
}
.meta-author .author-name {
  color: var(--text-muted);
}
.meta-author .author-name.has-url {
  color: var(--accent);
  cursor: pointer;
}
.meta-author .author-name.has-url:hover {
  text-decoration: underline;
}
.author-link {
  color: var(--accent);
  text-decoration: none;
}
.author-link:hover {
  text-decoration: underline;
}

/* Danger Warning */
.danger-warning {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--error);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--error);
}

/* Pattern Boxes */
.detail-patterns {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.pattern-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pattern-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 500;
}

.pattern-code-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #0a0a0a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
}

/* ============================================
   COPY BUTTON UX BEST PRACTICES (2024)
   ============================================
   
   FEEDBACK:
   - Button text: "Copy" → "Copied!" (1.5s)
   - Icon change: 📋 → ✓
   - Color change: accent → success (green)
   - Animation: pulse on icon
   
   TOOLTIP (desktop only):
   - "Click to copy" on hover
   - "Copied!" when copied
   - Hidden on mobile (no hover)
   
   POWER USER FEATURES:
   - Keyboard: Enter = copy Find, Shift+Enter = copy Change
   - Code text: user-select: all (click to select)
   - Native Ctrl/Cmd+C works after selection
   
   ACCESSIBILITY:
   - aria-label on button
   - Toast notification
   - Screen reader announcement
   ============================================ */

.pattern-code {
  flex: 1;
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Menlo', monospace;
  font-size: 18px;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
  margin: 0;
  /* Power user: easy selection */
  user-select: all;
  cursor: text;
}
.pattern-code::selection {
  background: var(--accent);
  color: #000;
}
.pattern-code::-moz-selection {
  background: var(--accent);
  color: #000;
}
.pattern-code.empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px;
  user-select: none;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  color: #000;
  font-size: 13px; /* Best practice: 13px for buttons */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  position: relative;
}
.copy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.copy-btn:active {
  transform: translateY(0);
}
.copy-btn.copied {
  background: var(--success);
}
.copy-btn.copied .copy-icon {
  animation: copyPulse 0.3s ease;
}

/* Copy button tooltip */
.copy-btn::before {
  content: 'Click to copy';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: none;
  z-index: 10;
}
.copy-btn::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border-color);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: none;
}
.copy-btn:hover::before,
.copy-btn:hover::after {
  opacity: 1;
  visibility: visible;
}
.copy-btn.copied::before {
  content: 'Copied!';
  background: var(--success);
  border-color: var(--success);
  color: #000;
}
.copy-btn.copied::after {
  border-top-color: var(--success);
}

@keyframes copyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Copy icon styling */
.copy-icon {
  font-size: 14px;
  line-height: 1;
}
.copy-text {
  color: inherit;
}

/* Sections */
.detail-example,
.detail-description,
.detail-use-cases,
.detail-note,
.detail-related {
  margin-bottom: 28px;
}

.detail-content h2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

/* Example Box */
.example-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}
.example-before,
.example-after {
  flex: 1;
}
.example-label {
  display: block;
  font-size: 11px; /* Best practice: 11px min for uppercase labels */
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.example-box code {
  display: block;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 16px;
  background: var(--bg-input);
  padding: 12px 14px;
  border-radius: 4px;
  color: var(--text);
}
.example-arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 18px; /* Offset for label height (10px font + 8px margin) */
}
.example-arrow svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

/* Description */
.detail-description p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* Use Cases */
.detail-use-cases {
  margin-bottom: 28px;
}
.detail-use-cases h2 {
  font-size: 13px; /* Best practice: 12-14px for section labels */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}
.detail-use-cases ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-use-cases li {
  padding: 10px 0 10px 28px;
  position: relative;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}
.detail-use-cases li:last-child {
  border-bottom: none;
}
.detail-use-cases li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

/* Creator Note */
.detail-note {
  background: rgba(79, 172, 254, 0.08);
  border: 1px solid rgba(79, 172, 254, 0.3);
  border-radius: 8px;
  padding: 16px;
}
.detail-note h2 {
  color: var(--accent);
  margin-bottom: 8px;
}
.detail-note p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Tags in Detail Panel - Display only (NOT clickable) */
.detail-tags {
  margin-bottom: 24px;
}
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: default;
}
/* PRO tag u detail panelu */
.tag.pro {
  background: rgba(79, 172, 254, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   Examples Section (1-4 examples)
   ============================================ */
.detail-examples {
  margin-bottom: 28px;
}

.examples-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.example-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 20px;
  border-bottom: 1px solid var(--border-color);
}
.example-row:last-child {
  border-bottom: none;
}

.example-before,
.example-after {
  flex: 1;
}

.example-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* ============================================
   Hidden Characters Visualization (Examples only)
   ============================================ */
.example-row code {
  display: block;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 16px;
  background: var(--bg-input);
  padding: 12px 14px;
  border-radius: 4px;
  color: var(--text);
}

/* Mali tag za hidden karaktere [space] [tab] itd */
.vis-tag {
  display: inline-block;
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 1px 4px;
  margin: 0 1px;
  vertical-align: middle;
  font-weight: 500;
}

.example-arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 18px;
}
.example-arrow svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

/* ============================================
   How It Works Section
   ============================================ */
.detail-how-it-works {
  margin-bottom: 28px;
}

.how-it-works-table {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.how-it-works-header {
  display: flex;
  padding: 12px 16px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.how-col-part {
  width: 200px;
  flex-shrink: 0;
}

.how-col-meaning {
  flex: 1;
}

.how-it-works-row {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
  gap: 16px;
}
.how-it-works-row:last-child {
  border-bottom: none;
}

.how-part {
  width: 200px;
  flex-shrink: 0;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 14px;
  background: #0a0a0a;
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--accent);
  word-break: break-all;
}

.how-meaning {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: 4px;
}

/* ============================================
   Rating & Feedback Row
   ============================================ */
.detail-rating-feedback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 32px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.feedback-links {
  display: flex;
  gap: 8px;
}

.feedback-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: none;
}
.feedback-link:hover {
  color: var(--text);
  background: var(--bg-card);
}

.feedback-icon {
  width: 16px;
  height: 16px;
}

.star-rating-compact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}

.star-rating-compact .star {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
  padding: 4px;
  line-height: 1;
}

.star-rating-compact .star:hover,
.star-rating-compact .star.hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.star-rating-compact .star.active {
  color: #fbbf24;
}

.star-rating-compact .star.rated {
  color: #f59e0b;
}

.star-rating-compact.disabled .star {
  cursor: default;
  pointer-events: none;
}

/* Rating motivation text above stars */
.rating-motivation {
  width: 100%;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: right;
  font-style: italic;
}

/* Rating info text below stars */
.rating-info-text {
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}
.rating-info-text.has-rated {
  color: var(--success);
}

/* ============================================
   CTA Section
   ============================================ */
.detail-cta {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 40px;
}

.cta-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 24px 0;
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.cta-subtext {
  font-size: 13px;
  color: var(--text-muted);
  margin: 20px 0 0 0;
  line-height: 1.6;
  font-style: italic;
}

/* ============================================
   Detail Footer
   ============================================ */
.detail-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  margin: 0 -40px;
}

.footer-slogan {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
}

.footer-free {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px 0;
}
.footer-free strong {
  color: var(--warning);
}

.footer-promo-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s;
}
.footer-promo-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.footer-promo {
  margin: 12px 0;
}

.footer-promo-link {
  color: var(--accent);
  text-decoration: none;
}

.footer-promo-link:hover {
  text-decoration: underline;
}

.footer-promo-stats {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-promo-stats .star {
  color: #fbbf24;
}

.footer-promo-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 32px 0;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  margin-top: 16px;
}
.footer-links a {
  color: var(--accent);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-links span {
  color: var(--text-muted);
}

/* Related Patterns */
.related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.related-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.related-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.related-item-name {
  display: block;
  font-size: 14px; /* Best practice: 14px for list items */
  color: var(--text);
  font-weight: 500;
  margin-bottom: 6px;
}
.related-item-code {
  display: block;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 11px;
  color: var(--accent);
  background: var(--bg-input);
  padding: 4px 8px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions Footer */
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.detail-actions .btn {
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-actions .btn.voted {
  background: rgba(74, 222, 128, 0.15);
  border-color: var(--success);
  color: var(--success);
}

/* Error State */
.detail-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
}
.detail-error .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.detail-error h2 {
  font-size: 18px;
  color: var(--error);
  margin: 0 0 8px 0;
}
.detail-error p {
  color: var(--text-muted);
  margin: 0 0 24px 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text);
}

/* ============================================
   Modal
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.active {
  display: flex;
}
.modal-content {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  margin: 0;
  font-size: 16px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text);
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

/* Form */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
}
textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

/* ============================================
   Loading & Toast
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1001;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--error); }

/* Mini rating display (for sidebar/meta) */
.mini-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.mini-stars {
  color: #fbbf24;
  letter-spacing: -2px;
}

/* ============================================
   Mobile Responsive - Best Practice Standards
   ============================================
   
   FONT SIZE STANDARDS:
   - Body text: 16px (minimum)
   - Secondary: 14px
   - Captions: 12px (absolute minimum)
   - Inputs: 16px (prevents iOS zoom)
   
   TOUCH TARGETS:
   - Minimum: 44x44px (Apple HIG)
   - Recommended: 48x48px (Material)
   
   SPACING:
   - Base unit: 8px
   - Common: 8, 12, 16, 24, 32px
   
   LINE HEIGHT:
   - Body: 1.5
   - Headings: 1.2-1.3
   ============================================ */

@media (max-width: 768px) {
  /* Minimum width - horizontal scroll below this */
  body {
    min-width: 320px;
  }
  
  html, body {
    overflow-x: auto;
    overflow-y: auto;
    height: auto;
  }
  
  .app-layout {
    grid-template-columns: 1fr;
    display: block;
    height: auto;
    overflow: visible;
  }
  
  /* =====================
     HEADER
     ===================== */
  .app-header {
    height: auto;
    padding: 12px 16px;
    position: sticky;
    top: 0;
  }
  
  .header-left {
    flex: 1;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .logo {
    gap: 10px;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  .logo-title {
    font-size: 16px;
  }
  .logo-tagline {
    font-size: 12px;
  }
  .logo-author {
    font-size: 11px;
  }
  
  /* =====================
     SIDEBAR
     ===================== */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    overflow-y: visible;
  }
  
  /* Search - 48px touch target */
  .sidebar-search {
    padding: 12px 16px;
  }
  .sidebar-search .search-input {
    height: 48px;
    padding: 12px 12px 12px 44px;
    font-size: 16px; /* Prevents iOS zoom */
    border-radius: 8px;
  }
  .sidebar-search .search-icon {
    left: 28px;
    width: 18px;
    height: 18px;
  }
  
  /* Filters */
  .sidebar-filters {
    padding: 12px 16px;
    gap: 12px;
  }
  .filter-select {
    height: 48px;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  /* Status buttons - 44px touch target */
  .status-filters {
    gap: 8px;
  }
  .status-btn {
    height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
  }
  .status-dot {
    width: 8px;
    height: 8px;
  }
  
  /* Stats */
  .sidebar-stats {
    padding: 12px 16px;
    font-size: 14px;
    gap: 20px;
  }
  
  /* Hints */
  .hint-banner {
    padding: 10px 16px;
    font-size: 12px;
  }
  .hint-close {
    font-size: 16px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Active filter */
  .active-filter {
    padding: 10px 16px;
    font-size: 14px;
  }
  .filter-tag {
    height: 32px;
    padding: 6px 12px;
    font-size: 14px;
  }
  .filter-tag button {
    min-width: 32px;
    font-size: 16px;
  }
  
  /* Pattern list */
  .pattern-list {
    flex: none;
    overflow-y: visible;
    padding: 8px 12px;
  }
  
  /* Pattern item - 44px min touch target */
  .pattern-item {
    min-height: 44px;
    padding: 14px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
  }
  .pattern-item-header {
    gap: 10px;
    margin-bottom: 6px;
  }
  .pattern-status {
    width: 8px;
    height: 8px;
  }
  .pattern-name {
    font-size: 16px; /* Body text standard */
    font-weight: 500;
    line-height: 1.4;
  }
  .pattern-rating-mini {
    font-size: 14px;
  }
  .pattern-rating-mini .mini-stars {
    font-size: 12px;
  }
  
  /* Tags - 44px touch target */
  .pattern-item-tags {
    gap: 8px;
    padding-left: 18px;
    margin-top: 8px;
  }
  .pattern-tag {
    min-height: 32px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    /* Outline stil ostaje isti, samo veći touch target */
  }
  
  /* Load more - 48px touch target */
  .load-more-btn {
    height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    margin: 12px;
    border-radius: 8px;
  }
  
  .resize-handle {
    display: none;
  }
  
  /* =====================
     DETAIL PANEL
     ===================== */
  .detail-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    background: var(--bg-detail);
    overflow-y: auto;
    padding-bottom: 32px;
  }
  
  .detail-panel.mobile-open {
    transform: translateX(0);
  }
  
  .detail-content {
    padding: 16px 16px 80px;
  }
  
  /* Back button - 48px touch target */
  .mobile-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text);
    cursor: pointer;
  }
  
  .detail-title {
    font-size: 22px;
    line-height: 1.3;
  }
  
  .detail-meta {
    font-size: 14px;
  }
  
  .pattern-label {
    font-size: 12px;
  }
  
  .pattern-code-wrapper {
    padding: 14px 16px;
    gap: 12px;
  }
  
  .pattern-code {
    font-size: 15px;
    line-height: 1.5;
  }
  
  /* Copy button - 44px touch target */
  .copy-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  /* Hide tooltip on touch - no hover */
  .copy-btn::before,
  .copy-btn::after {
    display: none;
  }
  
  /* Example */
  .example-box {
    flex-direction: column;
    padding: 16px;
    gap: 0;
  }
  .example-label {
    font-size: 11px;
  }
  .example-box code {
    font-size: 15px;
    padding: 12px 14px;
  }
  .example-arrow {
    transform: rotate(90deg);
    width: 28px;
    height: 28px;
    margin: 12px auto;
  }
  
  .detail-description p,
  .detail-use-cases li,
  .detail-note p {
    font-size: 15px;
    line-height: 1.6;
  }
  
  .detail-use-cases li {
    padding: 10px 0 10px 24px;
  }
  
  .detail-note {
    padding: 14px 16px;
  }
  
  .tag {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px;
  }
  
  /* Rating - stars 44px touch */
  .detail-rating {
    padding: 16px;
  }
  .rating-label {
    font-size: 14px;
  }
  .star-rating .star {
    font-size: 28px;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
  }
  .rating-info {
    font-size: 14px;
  }
  
  /* Action buttons - 44px touch */
  .detail-actions {
    gap: 10px;
  }
  .detail-actions .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  /* Examples */
  .example-row {
    flex-direction: column;
    padding: 16px;
    gap: 0;
  }
  .example-arrow {
    transform: rotate(90deg);
    width: 28px;
    height: 28px;
    margin: 12px auto;
  }
  .example-row code {
    font-size: 15px;
  }
  
  /* How it works */
  .how-it-works-header {
    display: none;
  }
  .how-it-works-row {
    flex-direction: column;
    gap: 8px;
  }
  .how-part {
    width: 100%;
  }
  
  /* Rating & Feedback */
  .detail-rating-feedback {
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
  }
  .feedback-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .star-rating-compact .star {
    font-size: 28px;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
  }
  
  /* CTA */
  .detail-cta {
    padding: 32px 16px;
  }
  .cta-text {
    font-size: 16px;
  }
  .cta-button {
    width: 100%;
    padding: 16px;
  }
  
  /* Footer */
  .detail-footer {
    margin: 0 -16px;
    padding: 32px 16px;
  }
  .footer-slogan {
    font-size: 14px;
  }
  .footer-promo-link {
    width: auto;
    padding: 10px 20px;
  }
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
  .footer-links span {
    display: none;
  }
  
  /* Related - stack on mobile */
  .related-list {
    grid-template-columns: 1fr;
  }
  
  /* Hide empty state on mobile */
  .detail-empty {
    display: none;
  }
  
  /* Hide keyboard navigation hint on mobile */
  #hintNavigation {
    display: none !important;
  }
  
  /* Smaller hint banners on mobile */
  .hint-banner {
    padding: 4px 12px;
    font-size: 11px;
  }
  .hint-text {
    font-size: 11px;
  }
}

/* Tablet: smaller sidebar, no resize */
@media (min-width: 769px) and (max-width: 1000px) {
  :root {
    --sidebar-width: 320px;
    --sidebar-scale: 0.95;
  }
  
  .resize-handle {
    display: none;
  }
  
  .detail-panel {
    min-width: 0; /* Allow flex shrink on tablet */
  }
}

/* Desktop: resizable sidebar, detail min 600px */
@media (min-width: 1001px) {
  .detail-panel {
    min-width: 600px;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
  .mobile-back-btn {
    display: none;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .sidebar,
  .app-header,
  .beta-banner,
  .detail-actions,
  .modal {
    display: none !important;
  }
  
  .app-layout {
    display: block;
  }
  
  .detail-panel {
    overflow: visible;
  }
  
  .detail-content {
    max-width: 100%;
    padding: 0;
  }
  
  .pattern-code {
    background: #f5f5f5 !important;
    color: #000 !important;
    border: 1px solid #ccc;
  }
}
