/* لوحة ألوان العلامة التجارية */
:root {
  --primary-color: #13b981;
  --primary-light: #1bce92;
  --primary-dark: #0ea36b;
  --secondary-color: #f0fdf7;
  --accent-color: #059669;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --white: #ffffff;
  --shadow-light: rgba(19, 185, 129, 0.1);
  --shadow-medium: rgba(19, 185, 129, 0.2);
  --shadow-heavy: rgba(19, 185, 129, 0.3);
  --gradient-primary: linear-gradient(135deg, #13b981 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #f0fdf7 0%, #dcfce7 100%);
  --border-radius: 20px;
  --border-radius-small: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gradient-primary);
  min-height: 100vh;
  padding: 2rem;
  margin: 0;
  color: var(--text-dark);
}

.container1 {
  max-width: 900px;
  margin: auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 20px 40px var(--shadow-heavy);
  backdrop-filter: blur(10px);
}

.txt {
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  font-size: 2.2rem;
  text-shadow: 0 2px 4px var(--shadow-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group > label {
  margin-bottom: 0.5rem;
}

label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
}
input,
select,
textarea {
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: var(--border-radius-small);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
  display: block;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--shadow-light);
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-left: 25px;
  padding-right: 15px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");
  background-repeat: no-repeat;
  background-position: 0 50%;
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.color-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

input[type="color"] {
  width: 50px;
  height: 42px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.preset-colors {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.color-preset {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.color-preset:hover {
  border-color: var(--text-dark);
  transform: scale(1.1);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.option-card {
  background: var(--secondary-color);
  padding: 1rem;
  border-radius: var(--border-radius-small);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.option-card:hover {
  border-color: var(--primary-color);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

button {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--shadow-heavy);
}

.btn-secondary {
  background: linear-gradient(45deg, #6c757d, #868e96);
  color: var(--white);
}

.btn-secondary:hover {
  transform: translateY(-2px);
}

.preview-section {
  background: var(--white);
  border: 2px dashed #ddd;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  min-height: 100px;
}

.preview-title {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.output {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius-small);
  padding: 1.5rem;
  font-family: "Courier New", monospace;
  white-space: pre-wrap;
  direction: ltr;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  max-height: 400px;
  overflow-y: auto;
}

.output:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px var(--shadow-light);
}

.output::before {
  content: "📋 اضغط للنسخ";
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-color);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: "Cairo", sans-serif;
}

.output:hover::before {
  opacity: 1;
}

.copied {
  background: var(--gradient-secondary);
  border-color: var(--primary-color);
  color: var(--primary-dark);
}

.copied::before {
  content: "✅ تم النسخ!";
  opacity: 1;
  background: var(--primary-color);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-small);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .button-group {
    flex-direction: column;
  }

  .container1 {
    padding: 1.4rem;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .container1 {
    border-radius: unset;
  }
}
