/* ============================
   ESS — Feedback Page
   Tokens
============================ */
:root {
  --bg: #F4F6FB;
  --bg-glow-1: #D9F0FF;
  --bg-glow-2: #E0F2FE; /* تم التعديل إلى توهج أزرق فاتح جداً بدلاً من الأخضر */
  --surface: #FFFFFF;
  --surface-alt: #EEF2F9;
  --border: #E3E8F2;
  --text: #1A2233;
  --text-muted: #6C7789;
  --accent: #0087db; /* أزرق بحري فاتح */
  --accent-2: #0049b0; /* أزرق بحري أغمق للتدرج */
  --gold: #FFB020;
  --gold-soft: #FFE3AE;
  --danger: #FF6B6B;
  --shadow-sm: 0 2px 10px rgba(24, 39, 75, 0.06);
  --shadow-md: 0 12px 30px rgba(24, 39, 75, 0.10);
  --shadow-glow: 0 0 0 rgba(0, 180, 219, 0);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --font: 'Tajawal', 'Segoe UI', sans-serif;
  color-scheme: light;
  transition: background-color .5s ease, color .5s ease;
}

html[data-theme="dark"] {
  --bg: #0A0F1C;
  --bg-glow-1: rgba(56, 189, 248, 0.10);
  --bg-glow-2: rgba(2, 132, 199, 0.06); /* توهج أزرق هادئ للوضع الليلي */
  --surface: #121A2C;
  --surface-alt: #182238;
  --border: #223049;
  --text: #E9EEF7;
  --text-muted: #8B98AF;
  --accent: #38BDF8; /* أزرق سماوي مضيء */
  --accent-2: #0284C7; /* أزرق محيطي */
  --gold: #FFC94D;
  --gold-soft: #4A3A1C;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s ease, color .4s ease;
}

/* Ambient glow background */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 60vw;
  height: 60vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
  transition: background .5s ease, opacity .5s ease;
}
body::before {
  top: -18%;
  right: -18%;
  background: var(--bg-glow-1);
}
body::after {
  bottom: -12%;
  left: -20%;
  background: var(--bg-glow-2);
}

/* ============================
   شريط علوي
============================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: 560px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand__logo {
  width: 32px;
  height: 32px;
  display: block;
}
.brand__logo svg { width: 100%; height: 100%; }

.brand__name {
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* زر الوضع الليلي */
.theme-toggle {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle__track {
  display: flex;
  align-items: center;
  width: 52px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 3px;
  transition: background .4s ease, border-color .4s ease;
}

.theme-toggle__thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: translateX(0);
  transition: transform .45s cubic-bezier(.34,1.56,.64,1);
}

html[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(-22px);
}

.theme-toggle .icon { width: 14px; height: 14px; position: absolute; transition: opacity .3s ease, transform .3s ease; }
.icon--sun { opacity: 1; transform: scale(1) rotate(0deg); }
.icon--moon { opacity: 0; transform: scale(.5) rotate(-90deg); }
html[data-theme="dark"] .icon--sun { opacity: 0; transform: scale(.5) rotate(90deg); }
html[data-theme="dark"] .icon--moon { opacity: 1; transform: scale(1) rotate(0deg); }

/* ============================
   محتوى الصفحة
============================ */
.page {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
  animation: rise .7s cubic-bezier(.22,1,.36,1) both;
}

.hero__title {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 6px;
}

.hero__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
}

/* ============================
   البطاقة
============================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: rise .7s .1s cubic-bezier(.22,1,.36,1) both;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}

.field__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.field__hint {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12.5px;
}

.field__input,
.field__textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.field__input {
  border-radius: var(--radius-pill);
  height: 46px;
}

.field__textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 220px;
  line-height: 1.6;
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--text-muted);
  opacity: .75;
}

.field__input:focus,
.field__textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field__counter {
  align-self: flex-end;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ============================
   التقييم بالنجوم (مُصغّر)
=========================== */
.field--rating { align-items: center; text-align: center; }

.rating {
  display: flex;
  gap: 6px;
  direction: ltr; 
}

.rating__star {
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  color: var(--border);
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), color .25s ease;
}

.rating__star svg {
  width: 26px;  
  height: 26px; 
  fill: currentColor;
  filter: drop-shadow(0 0 0 rgba(255,176,32,0));
  transition: filter .25s ease;
}

.rating__star:hover { transform: translateY(-2px) scale(1.08); }

.rating__star.is-active {
  color: var(--gold);
  animation: pop .35s cubic-bezier(.34,1.56,.64,1);
}
.rating__star.is-active svg {
  filter: drop-shadow(0 3px 8px rgba(255, 176, 32, 0.45));
}

.rating__feedback {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  min-height: 18px;
  transition: color .25s ease;
}
.rating__feedback.is-set { color: var(--gold); }

/* ============================
   زر الإرسال (مُصغّر ومتوسط)
============================ */
.submit-btn {
  position: relative;
  border: none;
  cursor: pointer;
  height: 44px;
  width: fit-content;
  padding: 0 32px;
  margin: 10px auto 0;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(95deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .3s ease, background .3s ease;
}

.submit-btn:active { transform: scale(.97); }

.submit-btn__label,
.submit-btn__spinner,
.submit-btn__check {
  transition: opacity .25s ease, transform .25s ease;
}

.submit-btn__spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  opacity: 0;
  transform: scale(.6);
}

.submit-btn__check {
  position: absolute;
  width: 22px;
  height: 22px;
  opacity: 0;
  transform: scale(.5);
}

.submit-btn.is-loading .submit-btn__label { opacity: 0; transform: scale(.8); }
.submit-btn.is-loading .submit-btn__spinner {
  opacity: 1;
  transform: scale(1);
  animation: spin .7s linear infinite;
}

/* تم التعديل هنا ليكون لون النجاح أزرق بحري بدلاً من الأخضر */
.submit-btn.is-success { background: linear-gradient(95deg, #38BDF8, #0284C7); }
.submit-btn.is-success .submit-btn__label,
.submit-btn.is-success .submit-btn__spinner { opacity: 0; transform: scale(.7); }
.submit-btn.is-success .submit-btn__check { opacity: 1; transform: scale(1); }

.submit-btn:disabled { cursor: not-allowed; }

.form-note {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  min-height: 16px;
}

.footer-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 22px;
}

/* ============================
   توست التأكيد
============================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity .4s cubic-bezier(.22,1,.36,1), transform .4s cubic-bezier(.22,1,.36,1);
  max-width: 90vw;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* تم التعديل هنا ليكون لون الأيقونة أزرق بحري بدلاً من الأخضر */
.toast__icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, #38BDF8, #0284C7); 
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ============================
   حركات
============================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(-8deg); }
  100% { transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* شاشات أكبر */
@media (min-width: 640px) {
  .hero__title { font-size: 30px; }
  .card { padding: 30px 34px; }
}

.brand__img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}