/* ===========================
   CHEAT SHEET DETAIL PAGE
   =========================== */

.cheat-sheet-detail-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===========================
   HEADER SECTION
   =========================== */

.cheat-sheet-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 20px;
  padding: 40px;
  margin: 0 0 40px 0;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.cheat-sheet-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 70% 30%, rgba(110, 0, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.cheat-sheet-header-content {
  position: relative;
  z-index: 1;
}

.cheat-sheet-header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.cheat-sheet-tech-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: white;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.cheat-sheet-tech-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cheat-sheet-header-info h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.cheat-sheet-header-info p {
  font-size: 18px;
  color: #64748b;
  margin: 0;
}

.cheat-sheet-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.cheat-sheet-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cheat-sheet-breadcrumb a:hover {
  color: #6e00ff;
}

/* ===========================
   CONTENT SECTIONS
   =========================== */

.cheat-sheet-content {
  margin-bottom: 60px;
}

.cheat-sheet-section {
  margin-bottom: 50px;
}

.cheat-sheet-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.cheat-sheet-section-title h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.cheat-sheet-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #e2e8f0, transparent);
}

/* ===========================
   GRID LAYOUT SYSTEM
   =========================== */

.cheat-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  grid-auto-rows: minmax(200px, auto);
}

/* Grid width classes */
.grid-width-1 { grid-column: span 1; }
.grid-width-2 { grid-column: span 2; }
.grid-width-3 { grid-column: span 3; }

/* Grid height classes */
.grid-height-1 { grid-row: span 1; }
.grid-height-2 { grid-row: span 2; }
.grid-height-3 { grid-row: span 3; }

/* ===========================
   BASE CARD STYLES
   =========================== */

.cheat-sheet-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.cheat-sheet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: #6e00ff;
  z-index: 10;
}

.cheat-sheet-card-header {
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.cheat-sheet-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.cheat-sheet-card-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.cheat-sheet-subtitle-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6e00ff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: -6px;
}

.cheat-sheet-subtitle-link:hover {
  color: #5a00cc;
  background: rgba(110, 0, 255, 0.1);
  transform: translateX(2px);
}

.cheat-sheet-subtitle-link i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.cheat-sheet-subtitle-link:hover i {
  transform: translateX(2px);
}

.cheat-sheet-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===========================
   EMPTY STATES
   =========================== */

.cheat-sheet-empty {
  text-align: center;
  padding: 40px 20px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #6b7280;
}

.cheat-sheet-empty p {
  margin: 0;
  font-size: 14px;
  font-style: italic;
}

.cheat-sheet-no-content {
  text-align: center;
  padding: 80px 20px;
  margin: 40px 0;
}

.cheat-sheet-no-content-icon {
  margin-bottom: 20px;
}

.cheat-sheet-no-content-icon i {
  font-size: 64px;
  color: #d1d5db;
}

.cheat-sheet-no-content h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
  color: #374151;
}

.cheat-sheet-no-content p {
  margin: 0;
  font-size: 16px;
  color: #6b7280;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
  .cheat-sheet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .grid-width-3 { grid-column: span 2; }
  .grid-width-2 { grid-column: span 2; }
  .grid-width-1 { grid-column: span 1; }
}

@media (max-width: 768px) {
  .cheat-sheet-detail-container {
    padding: 0 16px;
  }

  .cheat-sheet-header {
    padding: 24px;
    margin: 20px 0;
  }

  .cheat-sheet-header-top {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .cheat-sheet-tech-logo {
    width: 60px;
    height: 60px;
  }

  .cheat-sheet-header-info h1 {
    font-size: 24px;
  }

  .cheat-sheet-header-info p {
    font-size: 16px;
  }

  .cheat-sheet-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .grid-width-1,
  .grid-width-2,
  .grid-width-3 {
    grid-column: span 1;
  }

  .cheat-sheet-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .cheat-sheet-header {
    padding: 20px;
  }

  .cheat-sheet-section-title h2 {
    font-size: 20px;
  }

  .cheat-sheet-card {
    padding: 16px;
  }
}
.code-block-component {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.code-block-language {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-block-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #6e00ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-block-copy-btn:hover {
  background: #5a00cc;
  transform: translateY(-1px);
}

.code-block-copy-btn i {
  font-size: 14px;
}

.code-block-content {
  flex: 1;
  overflow: auto;
  background: #2d3748;
}

.code-block-content pre {
  margin: 0;
  padding: 16px;
  font-family: 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  background: transparent !important;
  overflow-x: auto;
  white-space: pre;
}

.code-block-content code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

/* Override Prism.js theme for better integration */
.code-block-content pre[class*="language-"] {
  background: #2d3748 !important;
  color: #e2e8f0 !important;
  text-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.key-value-component {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-top: 5px;
}

.key-value-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.key-value-item:hover {
  background: #f1f5f9;
  border-color: #6e00ff;
  transform: translateY(-1px);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(110, 0, 255, 0.1);
}

.key-value-key {
  flex: 1;
  min-width: 0;
}

.key-value-key span {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  word-break: break-word;
}

.key-value-separator {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 16px;
}

.key-value-value {
  flex: 1;
  min-width: 0;
}

.key-value-value span {
  font-weight: 400;
  color: #475569;
  font-size: 14px;
  word-break: break-word;
  font-family: 'Monaco', 'Menlo', monospace;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.key-value-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #9ca3af;
  text-align: center;
}

.key-value-empty p {
  margin: 0;
  font-size: 14px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .key-value-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .key-value-separator {
    transform: rotate(90deg);
    align-self: center;
  }

  .key-value-key,
  .key-value-value {
    width: 100%;
  }
}
.linkable-texts-component {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-top: 5px
}

.linkable-text-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  gap: 16px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.linkable-text-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #6e00ff, #9333ea);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.linkable-text-item:hover::before {
  opacity: 0.05;
}

.linkable-text-item:hover {
  transform: translateY(-2px);
  border-color: #6e00ff;
  box-shadow: 0 8px 25px rgba(110, 0, 255, 0.15);
  z-index: 5;
}

.linkable-text-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.linkable-text-title {
  display: block;
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.linkable-text-url {
  display: block;
  font-size: 12px;
  color: #6b7280;
  font-family: 'Monaco', 'Menlo', monospace;
  word-break: break-all;
}

.linkable-text-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.linkable-text-icon i {
  font-size: 16px;
  color: #6b7280;
  transition: all 0.3s ease;
}

.linkable-text-item:hover .linkable-text-icon {
  background: #6e00ff;
  transform: scale(1.1);
}

.linkable-text-item:hover .linkable-text-icon i {
  color: white;
}

.linkable-text-item:hover .linkable-text-title {
  color: #6e00ff;
}

.linkable-texts-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #9ca3af;
  text-align: center;
}

.linkable-texts-empty p {
  margin: 0;
  font-size: 14px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .linkable-text-item {
    padding: 12px;
    gap: 12px;
  }

  .linkable-text-title {
    font-size: 13px;
  }

  .linkable-text-url {
    font-size: 11px;
  }

  .linkable-text-icon {
    width: 28px;
    height: 28px;
  }

  .linkable-text-icon i {
    font-size: 14px;
  }
}

/* ===========================
   COMPONENT MAX-WIDTHS
   =========================== */

.code-block-component {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.key-value-component {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.linkable-texts-component {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.cheat-sheet-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 768px) {
  .code-block-component,
  .key-value-component,
  .linkable-texts-component {
    max-width: 100%;
  }
}

.code-block-content,
.code-block-content pre,
.code-block-content code {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  word-break: break-all;
}

.cheat-sheet-card,
.cheat-sheet-card-content {
  min-width: 0;
}

.code-block-content,
.code-block-content pre {
  scrollbar-width: thin;
  scrollbar-color: #6e00ff #2d3748;
}

.code-block-content::-webkit-scrollbar,
.code-block-content pre::-webkit-scrollbar {
  height: 8px;
  background: #2d3748;
  border-radius: 6px;
}
.code-block-content::-webkit-scrollbar-thumb,
.code-block-content pre::-webkit-scrollbar-thumb {
  background: #6e00ff;
  border-radius: 6px;
}
.code-block-content::-webkit-scrollbar-thumb:hover,
.code-block-content pre::-webkit-scrollbar-thumb:hover {
  background: #a084ff;
}
