:root {
  color-scheme: dark;
}

/* ===== الأساسيات العامة ===== */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%);
  margin: 0;
  padding: 0;
  color: #e5e7eb;
}

/* ===== الحاوية العامة ===== */

.container {
  max-width: 900px;
  margin: 30px auto;
  background: rgba(15, 23, 42, 0.9);
  padding: 22px 24px 26px;
  border-radius: 20px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.45),
    0 0 0 1px rgba(148,163,184,0.15);
  backdrop-filter: blur(12px);
}

/* ===== العناوين ===== */

h1 {
  font-size: 24px;
  margin-top: 0;
  text-align: center;
  letter-spacing: 0.03em;
}

h1 span {
  font-size: 13px;
  display: block;
  margin-top: 4px;
  color: #9ca3af;
}

h2 {
  font-size: 17px;
  margin: 18px 0 10px;
  color: #e5e7eb;
}

/* ===== الشبكة العامة للحقول ===== */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.field {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===== الحقول / الليبل / الإدخال ===== */

label {
  font-size: 13px;
  color: #cbd5f5;
}

input,
button {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #334155;
  font-size: 14px;
  box-sizing: border-box;
  background: #020617;
  color: #e5e7eb;
}

input::placeholder {
  color: #6b7280;
}

input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.6);
}

/* ===== أزرار المقاسات الجاهزة ===== */

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.presets button {
  border: 1px solid #374151;
  cursor: pointer;
  background: #111827;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}

.presets button:hover {
  background: #1f2937;
  box-shadow: 0 0 0 1px #38bdf8;
  transform: translateY(-1px);
}

/* ===== أزرار الإجراءات العامة ===== */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin: 10px 0 16px;
}

.actions button {
  cursor: pointer;
  background: linear-gradient(to left, #0ea5e9, #6366f1);
  color: #fff;
  border: none;
  font-weight: 600;
  padding-inline: 16px;
  box-shadow: 0 12px 25px rgba(59,130,246,0.4);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.1s;
}

.actions button.secondary {
  background: #111827;
  box-shadow: none;
  border: 1px solid #4b5563;
  font-weight: 500;
}

.actions button:hover:not(.secondary) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(59,130,246,0.6);
}

.actions button.secondary:hover {
  background: #020617;
}

/* ===== صندوق النتائج ===== */

.results {
  background: radial-gradient(circle at top left, rgba(56,189,248,0.15), transparent 55%);
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid #1f2937;
  font-size: 14px;
  margin-top: 8px;
}

.results p {
  margin: 4px 0;
}

/* ===== نص صغير للملاحظات ===== */

.small {
  font-size: 12px;
  color: #9ca3af;
}

/* ===== الكروت / الأقسام ===== */

.section-card {
  margin-top: 22px;
  padding: 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid #1f2937;
  background: linear-gradient(to bottom right, rgba(15,23,42,0.96), rgba(15,23,42,0.86));
}

.section-card h2 {
  margin-top: 0;
}

/* ===== التاج / الليبل العلوي الصغير ===== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #374151;
  color: #9ca3af;
  margin-bottom: 6px;
}

.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56,189,248,0.9);
}

/* ===== زر صغير على شكل حبة (ممكن تستخدمه لاحقاً) ===== */

.pill-button {
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid #374151;
  background: #020617;
  cursor: pointer;
  color: #e5e7eb;
}

.pill-button:hover {
  background: #111827;
}

/* ===== استجابة الشاشات الصغيرة ===== */

@media (max-width: 640px) {
  .container {
    margin: 10px;
    padding: 16px 14px 18px;
  }

  h1 {
    font-size: 20px;
  }
}
