:root
{
  --primary-color: #6c5ce7;
  --primary-light: #a29bfe;
  --secondary-color: #636e72;
  --light-gray: #f5f6fa;
  --medium-gray: #dfe6e9;
  --dark-gray: #2d3436;
  --white: #ffffff;
  --error-color: #d63031;
  --success-color: #00b894;
}

*
{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body
{
  background-color: var(--light-gray);
  color: var(--dark-gray);
  padding-top: 80px;
}

.app-container
{
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.app-header
{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--medium-gray);
}

.app-header h1
{
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompts-list
{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  direction: ltr;
}

.prompt-card
{
  background-color: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.prompt-card:hover
{
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.prompt-card h3
{
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompt-card .prompt-for
{
  background-color: var(--primary-light);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.prompt-content
{
  margin-bottom: 15px;
}

.prompt-content p
{
  color: var(--dark-gray);
  line-height: 1.6;
  margin-bottom: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-content .full-prompt
{
  white-space: pre-wrap;
  overflow: auto;
  max-height: 300px;
}

.variable
{
  background-color: rgba(108, 92, 231, 0.1);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.prompt-actions
{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-77
{
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-77.primary
{
  background-color: var(--primary-color);
  color: white;
}

.btn-77.primary:hover
{
  background-color: #5649c0;
}

.btn-77.secondary
{
  background-color: var(--medium-gray);
  color: var(--dark-gray);
}

.btn-77.secondary:hover
{
  background-color: #bdc3c7;
}

.btn-77.icon
{
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: flex-end;
  background-color: transparent;
  color: var(--secondary-color);
}

.btn-77.icon:hover

{
  background-color: rgba(99, 110, 114, 0.1);
  color: var(--primary-color);
}

/* مودال عرض البرومبت */
.modal
{
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active
{
  display: flex;
}

.modal-content
{
  background-color: var(--white);
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  overflow-y: auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn
{
  from
  {
    opacity: 0;
    transform: translateY(-20px);
  }

  to
  {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header
{
  padding: 20px;
  border-bottom: 1px solid var(--medium-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3
{
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header .prompt-for
{
  background-color: var(--primary-light);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.close-btn
{
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--secondary-color);
  transition: color 0.3s;
}

.close-btn:hover
{
  color: var(--primary-color);
}

.modal-body
{
  padding: 20px;
}

.prompt-details
{
  margin-bottom: 20px;
}

.prompt-text
{
  background-color: var(--light-gray);
  padding: 15px;
  border-radius: 6px;
  white-space: pre-wrap;
  font-family: monospace;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  direction: ltr;
}

/* مودال التعديل */
.edit-form
{
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.form-group label
{
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea
{
  width: 100%;
  padding: 10px;
  border: 1px solid var(--medium-gray);
  border-radius: 6px;
  font-size: 16px;
}

.form-group textarea
{
  min-height: 200px;
  resize: vertical;
  direction: ltr;
}

.modal-footer
{
  padding: 15px 20px;
  border-top: 1px solid var(--medium-gray);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 768px)
{
  .app-header
  {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .modal-content
  {
    width: 95%;
  }
}

/* أنماط التحميل */
.loading
{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.spinner
{
  width: 40px;
  height: 40px;
  border: 4px solid rgba(108, 92, 231, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* رسائل التنبيه */
.alert
{
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert.success
{
  background-color: rgba(0, 184, 148, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert.error
{
  background-color: rgba(214, 48, 49, 0.1);
  color: var(--error-color);
  border-left: 4px solid var(--error-color);
}

