/* ══════════════════════════════════════
   AGENT SYSTEM — Styles
   ══════════════════════════════════════ */

/* ── زر الوكيل في النافبار ── */
.nav-agent-btn {
  font-size: 20px;
}

/* ── زر الوكيل في صف البروفايل ── */
.pv-agent-icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #7b2ff7, #f107a3);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(123,47,247,.4);
  transition: transform .2s, box-shadow .2s;
}
.pv-agent-icon-btn:active { transform: scale(.92); }
.pv-agent-icon-btn:hover { box-shadow: 0 4px 16px rgba(123,47,247,.6); }

/* ── لوحة الوكيل ── */
.agent-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: ap-in .25s ease;
}
@keyframes ap-in {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}
.agent-panel::after { display:none; }

.ap-sheet {
  background: #1a1218;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky;
  top: 0;
  background: #1a1218;
  z-index: 1;
}
.ap-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.ap-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-close:hover { color: #fff; }

.ap-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ap-label {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ap-input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}
.ap-input:focus { border-color: rgba(123,47,247,.6); }
.ap-input::placeholder { color: rgba(255,255,255,.25); }

.ap-select {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}
.ap-select option { background: #1a1218; }

.ap-search-row {
  display: flex;
  gap: 8px;
}
.ap-search-row .ap-input { flex: 1; }

.ap-btn-search {
  background: rgba(123,47,247,.25);
  border: 1px solid rgba(123,47,247,.4);
  border-radius: 10px;
  color: #b77fff;
  font-size: 13px;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.ap-btn-search:active { opacity: .7; }

/* يوزر كارت */
.ap-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 4px;
}
.ap-user-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,#7b2ff7,#f107a3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.ap-user-av img { width:100%; height:100%; object-fit:cover; }
.ap-user-name { font-size: 14px; font-weight: 600; color: #fff; }
.ap-user-xp   { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 2px; }

/* color picker */
.ap-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ap-color-picker {
  width: 44px;
  height: 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  padding: 2px;
  background: none;
  flex-shrink: 0;
}

/* gradient preview */
.ap-grad-preview {
  height: 36px;
  border-radius: 8px;
  margin-top: 4px;
  background: transparent;
  transition: background .3s;
  border: 1px solid rgba(255,255,255,.08);
}

/* badges grid */
.ap-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ap-badge-opt {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.ap-badge-opt.selected,
.ap-badge-opt:hover {
  background: rgba(123,47,247,.3);
  border-color: #7b2ff7;
  color: #fff;
}

/* duration note */
.ap-duration-note {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  text-align: center;
  padding: 4px 0;
}

/* apply button */
.ap-btn-apply {
  background: linear-gradient(135deg,#7b2ff7,#f107a3);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  margin-top: 4px;
  font-family: inherit;
  transition: opacity .15s;
}
.ap-btn-apply:hover   { opacity: .9; }
.ap-btn-apply:active  { opacity: .7; }
.ap-btn-apply:disabled { opacity: .5; cursor: not-allowed; }

/* revoke */
.ap-revoke-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 13px;
  color: rgba(255,255,255,.7);
}
.ap-revoke-exp { color: rgba(255,255,255,.35); font-size: 11px; flex:1; text-align:left; }
.ap-btn-revoke {
  background: rgba(255,50,50,.15);
  border: 1px solid rgba(255,50,50,.3);
  border-radius: 8px;
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
}
.ap-btn-revoke:disabled { opacity:.5; cursor:not-allowed; }

/* loading / error */
.ap-loading { color: rgba(255,255,255,.4); font-size:13px; }
.ap-err     { color: #ff6b6b; font-size: 13px; }

/* ══ Cosmetic Badges — تظهر جنب الاسم ══ */
.cs-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .3px;
  vertical-align: middle;
  margin-inline-start: 4px;
  background: linear-gradient(135deg,#7b2ff7,#f107a3);
  color: #fff;
}
.cs-badge-vip      { background: linear-gradient(135deg,#f6c90e,#e96d0e); color:#1a0a00; }
.cs-badge-legend   { background: linear-gradient(135deg,#a855f7,#ec4899); }
.cs-badge-pro      { background: linear-gradient(135deg,#3b82f6,#06b6d4); }
.cs-badge-star     { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.cs-badge-elite    { background: linear-gradient(135deg,#10b981,#3b82f6); }
.cs-badge-champion { background: linear-gradient(135deg,#f43f5e,#f97316); }
.cs-badge-god      { background: linear-gradient(135deg,#ffd700,#ff4500); color:#1a0a00; }
.cs-badge-veteran  { background: rgba(255,255,255,.15); color:rgba(255,255,255,.7); }

.cs-flair {
  display: inline-block;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 1px 6px;
  margin-inline-start: 4px;
  vertical-align: middle;
}

/* ══ رصيد الوكيل ══ */
.ap-points-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(123,47,247,.18), rgba(241,7,163,.12));
  border-bottom: 1px solid rgba(123,47,247,.2);
  padding: 12px 20px;
}
.ap-points-info {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ap-points-label {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.ap-points-bar strong {
  color: #c084fc;
  font-size: 20px;
  font-weight: 800;
}
.ap-points-unit {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}
.ap-btn-req-points {
  background: rgba(123,47,247,.25);
  border: 1px solid rgba(123,47,247,.4);
  color: #c084fc;
  border-radius: 10px;
  padding: 7px 14px;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}
.ap-btn-req-points:hover {
  background: rgba(123,47,247,.4);
}
.ap-points-cost {
  font-size: 11px;
  color: #a78bfa;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(167,139,250,.1);
  border-radius: 6px;
}

/* ══════════════════════════════════════
   LEGENDARY FEATURES — الميزات الأسطورية
   ══════════════════════════════════════ */

/* وصف الميزة الأسطورية */
.ap-legend-desc {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 8px 12px;
  border-right: 2px solid rgba(192,132,252,.4);
}

/* preview هالة النور */
.ap-aura-preview {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(192,132,252,.2);
  margin: 10px auto 4px;
  transition: box-shadow .3s;
  box-shadow: 0 0 12px 4px #c084fc, 0 0 24px 8px #c084fc44;
}

/* ── هالة النور على الأفاتار ── */
@keyframes aura-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .65; transform: scale(1.07); }
}
.radiance-aura-active {
  animation: aura-pulse 2.4s ease-in-out infinite !important;
}

/* ── اللقب الملكي ── */
.cs-royal-title {
  display: inline-block;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  color: #d4af37;
  background: rgba(212,175,55,.12);
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 4px;
  padding: 1px 6px;
  margin-inline-start: 5px;
  vertical-align: middle;
  letter-spacing: .3px;
}

/* ── شريط الدخول الملكي (Royal Entrance Banner) ── */
.royal-entrance-banner {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 16px;
  padding: 10px 18px;
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .45s cubic-bezier(.34,1.56,.64,1);
}
.royal-entrance-banner.reb-show {
  transform: translateX(-50%) translateY(0);
}
.reb-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #d4af37;
  flex-shrink: 0;
  background: rgba(212,175,55,.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #d4af37; font-size: 16px;
}
.reb-avatar img { width:100%; height:100%; object-fit:cover; }
.reb-text { display: flex; flex-direction: column; gap: 2px; }
.reb-title {
  font-size: 10px;
  font-family: 'Georgia', serif;
  font-style: italic;
  color: #d4af37;
  font-weight: 700;
}
.reb-name {
  font-size: 13px;
  color: rgba(255,255,255,.9);
  font-weight: 600;
}

/* ── الظهور السينمائي (Cinematic Overlay) ── */
.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background .5s ease;
}
.cinematic-overlay.cinematic-show {
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
}
.cinematic-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: scale(.4) translateY(60px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.34,1.56,.64,1);
}
.cinematic-overlay.cinematic-show .cinematic-stage {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.cinematic-avatar {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 4px solid #7b2ff7;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(123,47,247,.18);
  box-shadow: 0 0 40px #7b2ff788, 0 0 80px #7b2ff744;
}
.cinematic-name {
  font-size: 22px;
  font-weight: 900;
  color: #7b2ff7;
  text-shadow: 0 0 20px currentColor;
  letter-spacing: 1px;
}
.cinematic-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  letter-spacing: .5px;
}

/* ── التفاعل الحصري (Signature Reaction) ── */
.signature-reaction {
  display: inline-block;
  font-size: 18px;
  animation: sig-pop .35s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 0 6px gold);
}
@keyframes sig-pop {
  from { transform: scale(0) rotate(-20deg); opacity:0; }
  to   { transform: scale(1) rotate(0); opacity:1; }
}
