/* ============================================
   loader.css — سايبر تاك | شاشة التحميل
   أضف في كل صفحة: <link rel="stylesheet" href="loader.css">
============================================ */

#ct-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #060609;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity .5s ease, visibility .5s ease;
}

#ct-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* scanlines */
#ct-loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,229,255,.018) 3px, rgba(0,229,255,.018) 4px
  );
  pointer-events: none;
}

/* ---- LOGO AREA ---- */
.ctl-logo {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: ctl-appear .6s ease both;
}

.ctl-geo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0,229,255,.7));
}

/* squares draw in */
.ctl-sq { animation: ctl-sq-in 1s ease both; }
.ctl-sq1 { animation-delay: .1s; }
.ctl-sq2 { animation-delay: .25s; }
.ctl-sq3 { animation-delay: .4s; }
.ctl-sq4 { animation-delay: .55s; }
.ctl-dot { animation: ctl-dot-pulse 1.8s ease-in-out infinite; animation-delay: .8s; }

@keyframes ctl-sq-in {
  from { opacity: 0; transform: scale(0.2); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ctl-dot-pulse {
  0%,100% { r: 5; opacity: 1; }
  50%      { r: 7; opacity: .5; }
}

.ctl-divider {
  width: 1px;
  height: 54px;
  background: linear-gradient(to bottom, transparent, rgba(0,229,255,.7), transparent);
  animation: ctl-appear .6s ease .5s both;
}

.ctl-term {
  direction: ltr;
  text-align: left;
  animation: ctl-appear .6s ease .4s both;
}
.ctl-prompt {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(0,255,136,.6);
  display: block;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.ctl-cmd {
  display: flex;
  align-items: baseline;
}
.ctl-txt {
  font-family: 'Rajdhani', sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 4px;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 28px rgba(0,229,255,.5);
}
/* glitch */
.ctl-txt::before {
  content: 'CYBER_TAK';
  position: absolute; inset: 0;
  color: #ff0040;
  clip-path: polygon(0 22%, 100% 22%, 100% 44%, 0 44%);
  opacity: 0;
  animation: ctl-gl-r 2.5s infinite 1s;
}
.ctl-txt::after {
  content: 'CYBER_TAK';
  position: absolute; inset: 0;
  color: #00e5ff;
  clip-path: polygon(0 58%, 100% 58%, 100% 78%, 0 78%);
  opacity: 0;
  animation: ctl-gl-b 2.5s infinite 1.15s;
}
@keyframes ctl-gl-r {
  0%,70%,100% { opacity:0; transform:translateX(0); }
  72% { opacity:.9; transform:translateX(-5px); }
  74% { opacity:.6; transform:translateX(4px); }
  76% { opacity:0; }
  78% { opacity:.8; transform:translateX(-3px); }
  80% { opacity:0; }
}
@keyframes ctl-gl-b {
  0%,70%,100% { opacity:0; transform:translateX(0); }
  72% { opacity:.9; transform:translateX(5px); }
  74% { opacity:.6; transform:translateX(-4px); }
  76% { opacity:0; }
  78% { opacity:.7; transform:translateX(3px); }
  80% { opacity:0; }
}

.ctl-cursor {
  display: inline-block;
  width: 3px;
  height: 28px;
  background: #00e5ff;
  vertical-align: bottom;
  margin-right: 3px;
  animation: ctl-blink 1s step-start infinite;
  box-shadow: 0 0 10px #00e5ff;
}
@keyframes ctl-blink { 0%,100%{opacity:1} 50%{opacity:0} }

.ctl-ar {
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,.3);
  direction: rtl;
  display: block;
  margin-top: 4px;
  letter-spacing: 2px;
  animation: ctl-appear .6s ease 1s both;
}

/* ---- PROGRESS BAR ---- */
.ctl-bar-wrap {
  width: 260px;
  height: 2px;
  background: rgba(255,255,255,.07);
  border-radius: 2px;
  overflow: hidden;
  animation: ctl-appear .4s ease .7s both;
}
.ctl-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00e5ff, #00ff88);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0,229,255,.8);
  transition: width .05s linear;
}

/* ---- STATUS TEXT ---- */
.ctl-status {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: rgba(0,229,255,.45);
  letter-spacing: 2px;
  direction: ltr;
  animation: ctl-appear .4s ease .8s both;
  min-height: 16px;
}

/* ---- corner decorations ---- */
.ctl-corner {
  position: absolute;
  width: 16px; height: 16px;
  border-color: rgba(0,229,255,.3);
  border-style: solid;
}
.ctl-corner.tl { top:18px; left:18px;  border-width: 1.5px 0 0 1.5px; }
.ctl-corner.tr { top:18px; right:18px; border-width: 1.5px 1.5px 0 0; }
.ctl-corner.bl { bottom:18px; left:18px;  border-width: 0 0 1.5px 1.5px; }
.ctl-corner.br { bottom:18px; right:18px; border-width: 0 1.5px 1.5px 0; }

@keyframes ctl-appear {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
