@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
  --primary: #1e90ff;
  --primary-rgb: 30,144,255;
  --bg: #050816;
  --card: rgba(255, 255, 255, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  color: #fff;
}

/* BACKGROUND WITH ANIMATED GLOWS */
.background {
  position: fixed;
  inset: 0;
  background: #050816;
  z-index: -1;
  overflow: hidden;
}

.background::before,
.background::after {
  content: '';
  position: absolute;
  width: 45vw;
  height: 45vw;
  min-width: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.25) 0%, transparent 70%);
  filter: blur(60px);
  transition: background 0.4s ease-in-out; /* توقيت متزامن للخلفية */
  animation: bgMove 12s infinite alternate ease-in-out;
}

.background::before {
  top: -10%;
  left: -10%;
}

.background::after {
  bottom: -10%;
  right: -10%;
  animation-delay: -6s;
}

@keyframes bgMove {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 8%) scale(1.12); }
  100% { transform: translate(-3%, -5%) scale(0.95); }
}

/* CONTAINER */
.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
}

/* CARD */
.card {
  width: 100%;
  max-width: 400px;
  padding: 24px 20px;
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--primary-rgb), 0.12);
  position: relative;
  transition: box-shadow 0.4s ease-in-out; /* توقيت متزامن لظلال الكرت */
}

/* REFRESH BUTTON */
.refresh-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c9d4e4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  transition: all 0.3s ease;
  z-index: 10;
}

.refresh-btn:hover {
  background: rgba(var(--primary-rgb), 0.15);
  border-color: var(--primary);
  color: #fff;
}

.refresh-btn:hover i { transform: rotate(180deg); }
.refresh-btn i { transition: transform 0.4s ease; }

/* LOGO */
.logo-box {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.25);
  transition: color 0.4s ease-in-out, background 0.4s ease-in-out, box-shadow 0.4s ease-in-out; /* تزامن مطلق للشعار */
}

/* TITLE */
.title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}

.title span {
  color: var(--primary);
  text-shadow: 0 0 12px rgba(var(--primary-rgb), 0.6);
  transition: color 0.4s ease-in-out, text-shadow 0.4s ease-in-out; /* تزامن مطلق لكلمة PC */
}

.subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #c9d4e4;
  font-weight: 400;
}

/* TELEGRAM BUTTON */
.telegram-btn {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.7));
  box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease-in-out, box-shadow 0.4s ease-in-out; /* تزامن مطلق لزر التيليجرام */
}

.telegram-btn i { font-size: 24px; }

.telegram-btn .btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  direction: ltr;
}

.telegram-btn .btn-text span {
  font-size: 14px;
  font-weight: 600;
  font-family: sans-serif;
}

.telegram-btn .btn-text small {
  font-size: 11px;
  opacity: 0.8;
}

.telegram-btn:hover { transform: translateY(-3px); }

/* COLOR BUTTON */
.color-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  transition: all 0.3s ease;
}

.color-btn:hover { background: rgba(var(--primary-rgb), 0.12); }

/* DIVIDER */
.divider {
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cfd9e8;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(var(--primary-rgb), 0.3);
  transition: background 0.4s ease-in-out; /* تزامن الخط الفاصل */
}

/* SOCIALS GRID SETUP */
.socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.social-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.social-box i {
  font-size: 20px;
  transition: 0.3s ease;
}

.social-box span {
  font-size: 12px;
  font-weight: 600;
}

.social-box:hover {
  transform: translateY(-3px);
  background: rgba(var(--primary-rgb), 0.08);
  border-color: var(--primary);
}

.social-box.youtube:hover i { color: #ff0000; }
.social-box.twitter:hover i { color: #1da1f2; }
.social-box.twitch:hover i { color: #9146ff; }
.social-box.instagram:hover i { color: #e1306c; }

@media (min-width: 400px) {
  .socials { grid-template-columns: repeat(4, 1fr); }
  .card { padding: 30px 25px; }
  .title { font-size: 40px; }
  .refresh-btn { top: 20px; left: 20px; }
}