:root {
  --accent: #ff0066;
  --bg-overlay: rgba(0,0,0,0.55);
  --muted: rgba(255,255,255,0.85);
  --card-bg: rgba(255,255,255,0.03);
}

/* ثيم غامق */
.theme-dark {
  --accent: #ff0066;
  --bg-overlay: rgba(0,0,0,0.55);
  --muted: rgba(255,255,255,0.85);
  --card-bg: rgba(255,255,255,0.03);
}

/* ثيم أزرق */
.theme-blue {
  --accent: #0066ff;
  --bg-overlay: rgba(0,0,0,0.55);
  --muted: rgba(255,255,255,0.85);
  --card-bg: rgba(0,102,255,0.08);
}

/* ثيم أخضر */
.theme-green {
  --accent: #00cc66;
  --bg-overlay: rgba(0,0,0,0.55);
  --muted: rgba(255,255,255,0.85);
  --card-bg: rgba(0,204,102,0.08);
}

/* قواعد عامة */
html, body {
  height: 100%;
  margin: 0;
  font-family: "Cairo", system-ui, sans-serif;
  background: #000;
  color: #fff;
  direction: rtl;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* الخلفيات */
.bgwrap {
  position: fixed;
  inset: 0;
  z-index: 0;     /* خلف كل شيء */
  overflow: hidden;
}

.bgwrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1s ease, transform 15s linear;
}

.bgwrap img.active {
  opacity: 1;
  transform: scale(1);
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1;
}

/* Container */
.container {
  position: relative;
  z-index: 3;        /* أعلى من الخلفيات */
  max-width: 980px;
  margin: 60px auto;
  padding: 28px;
  text-align: center;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s forwards;
}

/* العنوان الراقص */
.title-dance {
  font-size: 64px;
  font-weight: 900;
  margin: 0 0 14px;
  letter-spacing: 6px;
  color: var(--accent);
  animation: dance 1.2s infinite ease-in-out, glow 2s infinite alternate, colorChange 5s infinite linear;
}

/* Animations */
@keyframes dance {
  0%{transform:rotate(0) scale(1)}
  25%{transform:rotate(3.6deg) scale(1.05)}
  50%{transform:rotate(-3deg) scale(1.03)}
  75%{transform:rotate(2deg) scale(1.06)}
  100%{transform:rotate(0) scale(1)}
}
@keyframes glow {
  0%{text-shadow:0 0 12px rgba(255,0,102,0.9)}
  100%{text-shadow:0 0 28px rgba(255,85,170,0.95)}
}
@keyframes colorChange {
  0%,25%,50%,75%,100% {color:var(--accent);}
}
@keyframes fadeInUp {
  0%{opacity:0;transform:translateY(50px)}
  100%{opacity:1;transform:translateY(0)}
}

/* العنوان الرئيسي والفقرة */
h1 {
  font-size: 30px;
  margin: 0 0 12px;
  font-weight: 700;
  animation: fadeInUp 1s forwards 0.5s;
  color: var(--accent);
}

p.lead {
  margin:0 0 22px;
  font-size:18px;
  color: var(--muted);
  line-height:1.6;
  animation: fadeInUp 1s forwards 0.7s;
}

/* CTA */
.cta {
  display:inline-block;
  background: var(--accent);
  padding:14px 40px;
  border-radius:999px;
  color:#fff;
  font-weight:800;
  font-size:20px;
  box-shadow:0 12px 36px rgba(255,0,102,0.12);
  transition:.3s ease-in-out,box-shadow .3s ease-in-out;
  animation: fadeInUp 1s forwards 0.9s;
}
.cta:hover {
  transform:scale(1.1) rotate(-2deg);
  box-shadow:0 18px 48px rgba(255,0,102,0.18);
}

/* Features */
.features {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  margin:34px 0 24px;
}

.card {
  background: var(--card-bg);
  padding:18px;
  border-radius:12px;
  text-align:center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transition:transform .3s;
}

.card svg {
  width:42px;
  height:42px;
  margin-bottom:10px;
  filter:drop-shadow(0 6px 18px rgba(0,0,0,0.45));
  transition:transform .3s;
}

.card:hover { transform:scale(1.08); }
.card:hover svg { transform:scale(1.2) rotate(10deg); }

/* Keywords */
.keywords {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin-top:20px;
}

.tag {
  background:rgba(255,255,255,0.05);
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  color:#fff;
  animation:fadeInUp 0.8s forwards;
}

/* Social */
.social {
  display:flex;
  gap:12px;
  justify-content:center;
  margin-top:20px;
}

.social a {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px;
  border-radius:10px;
  background:rgba(255,255,255,0.03);
  text-decoration:none;
  color:var(--muted);
  font-weight:700;
  transition:all .3s;
}

.social a:hover {
  background:var(--accent);
  color:#fff;
  transform:scale(1.05);
}

/* Footer */
footer {
  margin-top:36px;
  padding:20px 12px;
  color:rgba(255,255,255,0.6);
  font-size:14px;
  text-align:center;
}

footer .links {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin-bottom:8px;
}

footer a {
  color:rgba(255,255,255,0.8);
  transition:.2s;
}
footer a:hover { color:#fff; }

/* الهيدر الجديد */
.chat-header {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 24px;
  z-index: 9999;  /* أعلى شيء */
  background: rgba(0,0,0,0.00);
  border-bottom-right-radius: 12px;
}

.chat-header .chat-logo {
  height: 115px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.chat-header .chat-logo:hover {
  transform: scale(1.08);
}

/* Responsive */
@media(max-width:780px){
  .title-dance{font-size:42px}
  h1{font-size:20px}
  .container{margin:28px 18px;padding:18px}
  .chat-header .chat-logo{height:80px;}
}