@import url("https://fonts.googleapis.com/css2?family=Open+Sans&display=swap");
body {
  margin: 0;
  font-family: 'Cairo', 'Open Sans', Arial, sans-serif;
  background: #212121;
  color: #222;
  direction: rtl;
}

/* شاشة الانتظار */
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: #212121;
  z-index: 9999;
}
.loader div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #c517f0;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.loader div:nth-child(1) { left: 8px; animation: loader1 0.6s infinite; }
.loader div:nth-child(2) { left: 8px; animation: loader2 0.6s infinite; }
.loader div:nth-child(3) { left: 32px; animation: loader2 0.6s infinite; }
.loader div:nth-child(4) { left: 56px; animation: loader3 0.6s infinite; }
@keyframes loader1 { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes loader2 { 0% { transform: translateX(0); } 100% { transform: translateX(24px); } }
@keyframes loader3 { 0% { transform: scale(1); } 100% { transform: scale(0); } }

/* تبويبات متحركة */
.amazing-tabs {
  font-family: 'Cairo', 'Open Sans', Arial, sans-serif;
  margin-bottom: 0.5em;
}
.main-tabs-container {
  padding: 1em 0 0.5em 0;
  background: var(--background-color, #bbdefb);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 1px 6px #d8e3f3;
}
.main-tabs-wrapper {
  position: relative;
}
.main-tabs {
  display: flex;
  gap: 1.7em;
  list-style: none;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.round-button {
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  background: #f8f6fa;
  color: #444;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  position: relative;
  transition: box-shadow 0.19s, background 0.19s, color 0.19s;
  box-shadow: 0 2px 8px #ececec44;
}
.round-button.active,
.round-button:focus {
  background: var(--round-button-active-color, #c517f0);
  color: #fff;
  box-shadow: 0 2px 14px 0 #c517f066;
}
.round-button svg {
  vertical-align: middle;
}
.main-slider-circle {
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 54px;
  height: 8px;
  border-radius: 4px;
  background: #c517f0;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s;
  z-index: 0;
  pointer-events: none;
}

/* محتوى الموقع */
#main-content {
  background: #fff;
  margin: 40px auto 0 auto;
  max-width: 750px;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(60,0,80,0.09);
  padding: 2rem;
  min-height: 80vh;
}
.main-section {
  margin-top: 2em;
  min-height: 220px;
}
footer {
  text-align: center;
  margin-top: 2em;
  color: #888;
  font-size: 0.95em;
}

/* زر التحميل */
#download-btn {
  background: #4CAF50;
  color: #fff;
  padding: 0.7em 2.2em;
  border: none;
  border-radius: 7px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  margin-top: 1em;
  transition: background 0.18s;
  display: inline-block;
}
#download-btn:hover {
  background: #388e3c;
}
#tiktok-result video {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 1em;
  display: block;
}
#tiktok-result .error {
  color: #b71c1c;
  margin: 1em 0;
  font-weight: bold;
}