/* Example Cards Styles */
.examples-section {
  padding: 20px 0;
  margin-bottom: 30px;
  position: relative;
}

.examples-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Scroll indicator for mobile */
.examples-container::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: rgba(132, 0, 255, 0.5);
  animation: scrollHint 2s ease-in-out infinite;
  pointer-events: none;
  display: none;
}

[dir="rtl"] .examples-container::after {
  content: '←';
  right: auto;
  left: 0;
}

@keyframes scrollHint {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) translateX(0); }
  50% { opacity: 1; transform: translateY(-50%) translateX(-10px); }
}

@keyframes scrollHintRtl {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) translateX(0); }
  50% { opacity: 1; transform: translateY(-50%) translateX(10px); }
}

[dir="rtl"] .examples-container::after {
  animation: scrollHintRtl 2s ease-in-out infinite;
}

.example-card {
  background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
  border: 2px solid #392e4e;
  border-radius: 15px;
  padding: 20px;
  min-width: 180px;
  max-width: 200px;
  cursor: grab;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.example-card:hover {
  transform: translateY(-5px);
  border-color: #7e7e7e;
  box-shadow: 0 10px 30px rgba(234, 231, 236, 0.3);
}

.example-card.dragging {
  opacity: 0.6;
  cursor: grabbing;
  transform: scale(0.95);
}

.example-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #89878b, #9e9b9d);
}

.example-card-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-align: center;
}

.example-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}

.example-card-desc {
  font-size: 0.85rem;
  color: #a0a0a0;
  text-align: center;
  line-height: 1.4;
}

.example-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(132, 0, 255, 0.3);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.drop-zone {
  border: 2px dashed transparent;
  transition: all 0.3s ease;
}

.drop-zone.drag-over {
  border-color: #8400ff;
  background: rgba(132, 0, 255, 0.1);
  box-shadow: inset 0 0 20px rgba(132, 0, 255, 0.2);
}

.drop-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #8400ff;
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-align: center;
  z-index: 10;
}

.drop-zone.drag-over .drop-hint {
  opacity: 1;
}

/* Touch support */
.example-card {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: none;
}

/* Mobile optimizations */
@media (hover: none) and (pointer: coarse) {
  .example-card {
    cursor: pointer;
  }
  
  .example-card:active {
    transform: scale(0.95);
  }
  
  .drop-zone {
    min-height: 100px;
    position: relative;
  }
  
  .drop-zone.drag-over::after {
    content: '↓ أفلت هنا';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8400ff;
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border-radius: 10px;
    white-space: nowrap;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .examples-section {
    padding: 10px 0;
  }
  
  .examples-container {
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(132, 0, 255, 0.5) transparent;
  }
  
  .examples-container::-webkit-scrollbar {
    height: 6px;
  }
  
  .examples-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }
  
  .examples-container::-webkit-scrollbar-thumb {
    background: rgba(132, 0, 255, 0.5);
    border-radius: 3px;
  }
  
  .examples-container::after {
    display: block;
  }
  
  .example-card {
    min-width: 140px;
    max-width: 160px;
    padding: 15px;
    flex-shrink: 0;
  }
  
  .example-card-icon {
    font-size: 2rem;
  }
  
  .example-card-title {
    font-size: 1rem;
  }
  
  .example-card-desc {
    font-size: 0.75rem;
    line-height: 1.3;
  }
  
  .example-card-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }
}

@media (max-width: 480px) {
  .examples-container {
    padding: 5px;
    gap: 8px;
  }
  
  .example-card {
    min-width: 120px;
    max-width: 140px;
    padding: 12px;
  }
  
  .example-card-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }
  
  .example-card-title {
    font-size: 0.9rem;
  }
  
  .example-card-desc {
    font-size: 0.7rem;
  }
}
