

@keyframes legal-spin    { to { transform: rotate(360deg); } }
@keyframes legalFadeUp   { from { opacity:0; transform:translateY(32px); } to { opacity:1; transform:translateY(0); } }
@keyframes legalSlideIn  { from { opacity:0; transform:translateX(24px); } to { opacity:1; transform:translateX(0); } }
@keyframes shimmer       { 0%,100% { opacity:.0; } 50% { opacity:.06; } }
@keyframes glowPulse     { 0%,100% { box-shadow:0 0 0 0 rgba(var(--brand-primary-rgb), 0.3); } 50% { box-shadow:0 0 28px 6px rgba(var(--brand-primary-rgb), 0.3); } }
@keyframes badgePop      { 0% { opacity:0; transform:scale(.7) translateY(10px); } 60% { transform:scale(1.08) translateY(-2px); } 100% { opacity:1; transform:scale(1) translateY(0); } }
@keyframes headerReveal  { from { opacity:0; transform:translateY(20px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes orbDrift      { 0%,100% { transform:translate(0,0) scale(1); } 33% { transform:translate(30px,-20px) scale(1.06); } 66% { transform:translate(-20px,15px) scale(.96); } }

.legal-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: orbDrift 18s ease-in-out infinite;
}
.legal-orb-1 {
  width: 500px; height: 500px;
  top: -120px; right: -100px;
  background: radial-gradient(circle, rgba(var(--brand-primary-rgb), 0.1) 0%, transparent 70%);
  animation-delay: 0s;
}
.legal-orb-2 {
  width: 400px; height: 400px;
  bottom: 100px; left: -80px;
  background: radial-gradient(circle, rgba(139,92,246,.18) 0%, transparent 70%);
  animation-delay: -7s;
}
.legal-orb-3 {
  width: 300px; height: 300px;
  top: 50%; left: 55%;
  background: radial-gradient(circle, rgba(var(--brand-secondary-rgb), 0.1) 0%, transparent 70%);
  animation-delay: -12s;
}

.legal-nav {
  position: fixed;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 1100px;
  height: 58px; border-radius: 22px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    0 4px 30px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(255,255,255,.06);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 900;
  animation: legalFadeUp .5s ease both;
}
.legal-nav::before {
  content: '';
  position: absolute;
  inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--brand-primary-rgb), 0.15) 0%, transparent 50%);
  pointer-events: none;
}
.legal-nav-logo {
  font-size: 16px; font-weight: 900; letter-spacing: .07em;
  color: var(--text); text-decoration: none;
  position: relative; z-index: 1;
}
.legal-nav-logo span { color: var(--primary); }
.legal-nav-right { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.legal-nav-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-decoration: none;
  padding: 8px 16px; border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  transition: color .22s, background .22s, border-color .22s, transform .22s;
}
.legal-nav-back:hover {
  color: var(--text);
  background: rgba(var(--brand-primary-rgb), 0.1);
  border-color: rgba(var(--brand-primary-rgb), 0.2);
  transform: translateX(-2px);
}
body.ltr .legal-nav-back:hover { transform: translateX(2px); }

.legal-page {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 108px 20px 90px;
  z-index: 1;
}

.legal-lang {
  display: flex; gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  animation: legalFadeUp .55s .1s ease both;
}
.legal-lang button {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 10px 26px;
  color: var(--muted);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .24s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.legal-lang button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .22s;
}
.legal-lang button:hover::after { opacity: 1; }
.legal-lang button:hover {
  background: rgba(255,255,255,.09);
  color: var(--text);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
}
.legal-lang button.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(var(--brand-primary-rgb), 0.3), inset 0 1px 0 rgba(255,255,255,.2);
  transform: translateY(-1px);
}

.legal-header {
  text-align: center;
  margin-bottom: 52px;
  animation: headerReveal .65s .15s ease both;
}
.legal-header .badge {
  display: inline-block;
  margin-bottom: 18px;
  animation: badgePop .6s .25s ease both;
}
.legal-header h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  margin: 0 0 14px;
  background: linear-gradient(135deg, #fff 0%, rgba(165,180,252,.9) 50%, rgba(255,255,255,.6) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  line-height: 1.2;
}
.legal-header p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}

.legal-card {
  background: rgba(255,255,255,.038);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 28px;
  padding: 34px 38px;
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  box-shadow:
    0 8px 40px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 -1px 0 rgba(255,255,255,.03);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.legal-card.card-visible {
  animation: legalFadeUp .55s ease forwards;
}

.legal-card:nth-child(1) { animation-delay: .05s; }
.legal-card:nth-child(2) { animation-delay: .12s; }
.legal-card:nth-child(3) { animation-delay: .19s; }
.legal-card:nth-child(4) { animation-delay: .26s; }
.legal-card:nth-child(5) { animation-delay: .33s; }
.legal-card:nth-child(6) { animation-delay: .40s; }
.legal-card:nth-child(7) { animation-delay: .47s; }

.legal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-primary-rgb), 0.15), rgba(139,92,246,.4), transparent);
  opacity: .6;
}

.legal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.15) 0%, rgba(139,92,246,.03) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.legal-card:hover::after { opacity: 1; }
.legal-card:hover {
  border-color: rgba(var(--brand-primary-rgb), 0.2);
  box-shadow:
    0 16px 52px rgba(0,0,0,.36),
    inset 0 1px 0 rgba(255,255,255,.14),
    0 0 0 1px rgba(var(--brand-primary-rgb), 0.15);
  transform: translateY(-2px);
}

.legal-card h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.legal-card h2 i {
  color: var(--primary);
  font-size: 14px;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: rgba(var(--brand-primary-rgb), 0.1);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .25s, border-color .25s, transform .25s;
}
.legal-card:hover h2 i {
  background: rgba(var(--brand-primary-rgb), 0.1);
  border-color: rgba(var(--brand-primary-rgb), 0.2);
  transform: scale(1.08);
}
.legal-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.95;
  margin: 0 0 10px;
}
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul {
  padding-inline-start: 20px;
  margin: 10px 0 0;
}
.legal-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 7px;
  position: relative;
}
.legal-card strong { color: var(--text); }

.legal-highlight {
  background: rgba(var(--brand-primary-rgb), 0.1);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
  border-radius: 16px;
  padding: 15px 20px;
  margin-top: 16px;
  color: #a5b4fc;
  font-size: 13.5px;
  line-height: 1.85;
  position: relative;
  overflow: hidden;
}
.legal-highlight::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-primary-rgb), 0.15), transparent);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13.5px;
}
.legal-table th, .legal-table td {
  border: 1px solid rgba(255,255,255,.07);
  padding: 12px 16px;
  text-align: right;
  transition: background .2s;
}
body.ltr .legal-table th,
body.ltr .legal-table td { text-align: left; }
.legal-table th {
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--text);
  font-weight: 700;
  letter-spacing: .02em;
}
.legal-table td { color: var(--muted); }
.legal-table tr:hover td { background: rgba(255,255,255,.03); }

.verify-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.verify-card {
  max-width: 480px;
  width: 100%;
  background: rgba(8,11,26,.75);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 36px;
  padding: 52px 44px;
  text-align: center;
  box-shadow:
    0 40px 100px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(255,255,255,.04),
    0 0 0 1px rgba(var(--brand-primary-rgb), 0.15);
  position: relative;
  overflow: hidden;
  animation: legalFadeUp .6s .1s ease both;
}
.verify-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-primary-rgb), 0.15), rgba(139,92,246,.5), transparent);
}
.verify-card::after {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(var(--brand-primary-rgb), 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.verify-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 28px;
  background: rgba(var(--brand-primary-rgb), 0.1);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
  color: #a5b4fc;
  position: relative;
  z-index: 1;
  transition: background .4s, border-color .4s, color .4s;
}
.verify-icon.success {
  background: rgba(52,211,153,.1);
  border-color: rgba(52,211,153,.28);
  color: var(--brand-success);
  animation: glowPulse 2s ease infinite;
}
.verify-icon.error {
  background: rgba(248,113,113,.1);
  border-color: rgba(248,113,113,.28);
  color: #f87171;
}
.verify-card h1 {
  font-size: 23px; font-weight: 900;
  margin: 0 0 12px;
  color: var(--text);
  position: relative; z-index: 1;
}
.verify-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 28px;
  position: relative; z-index: 1;
}
.spin { animation: legal-spin .8s linear infinite; display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .legal-card { opacity: 0; transform: translateY(28px); }
  .legal-card.card-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .55s ease, transform .55s cubic-bezier(.22,1,.36,1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .legal-card { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .legal-page { padding: 90px 14px 64px; }
  .legal-card { padding: 24px 20px; border-radius: 22px; }
  .legal-nav  { height: 50px; }
  .verify-card { padding: 40px 24px; border-radius: 28px; }
}
