/* ==========================================================================
   UNKNOWN SIGNAL - CINEMATIC ENTRY / ACCESS RESTRICTED SEQUENCE
   File: entry.css
   ========================================================================== */

/* ── 1. BODY & SITE SUPPRESSION (WHILE ENTRY IS ACTIVE) ───────────────────── */
body.entry-active {
  overflow: hidden !important;
  height: 100vh !important;
  width: 100vw !important;
}

body.entry-active .topbar,
body.entry-active .main,
body.entry-active .bottombar {
  filter: blur(4px) brightness(0.7) saturate(0.85);
  opacity: 0.45;
  transform: scale(1.01);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth transition when unblurred */
.topbar,
.main,
.bottombar {
  transition: filter 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 2. ENTRY OVERLAY WRAPPER ─────────────────────────────────────────────── */
.entry-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.entry-overlay.fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Blurred Background Image Layer (1st User Uploaded Image) */
.entry-bg-image {
  position: absolute;
  inset: -15px;
  background-image: url('images/entry-bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(3.5px) brightness(1.0);
  transform: scale(1.03);
  pointer-events: none;
  z-index: 8990;
}

/* Dark Classified Atmosphere Backdrop (z-index 8995) */
.entry-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(2, 6, 14, 0.1) 0%, rgba(1, 3, 8, 0.45) 100%);
  pointer-events: none;
  z-index: 8995;
}

/* Subtle CRT Scanline overlay */
.entry-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
  pointer-events: none;
  z-index: 8996;
}

/* Subtle sweep line across screen */
.entry-sweep {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(180deg, transparent, rgba(0, 229, 255, 0.06), transparent);
  animation: entrySweepScan 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes entrySweepScan {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(800%); }
  100% { transform: translateY(-100%); }
}

/* ── 3. CAUTION HAZARD TAPE STRIPS (z-index 9010) ─────────────────────────── */
.hazard-tape {
  position: absolute;
  left: -35vw;
  width: 170vw;
  height: 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 9010;
  background: repeating-linear-gradient(
    -55deg,
    #f5b800 0px,
    #f5b800 18px,
    #11141a 18px,
    #11141a 36px
  );
  box-shadow: 
    0 16px 45px rgba(0, 0, 0, 0.92),
    0 4px 14px rgba(0, 0, 0, 0.75),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transform-origin: center center;
  transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.9s ease;
  will-change: transform, opacity;
}

/* Continuous Tape Text Track */
.tape-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 40px;
  animation: tapeDrift 30s linear infinite;
  will-change: transform;
}

.tape-track span {
  font-family: 'Orbitron', 'Rajdhani', monospace, sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 4.5px;
  color: #06080d;
  background: rgba(245, 184, 0, 0.92);
  padding: 3px 16px;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.7);
  display: inline-block;
  user-select: none;
}

@keyframes tapeDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-350px); }
}

/* Tape Positions & Angles (Matching User Reference Image) */
.tape-1 {
  top: 24%;
  transform: rotate(-15deg);
}

.tape-2 {
  top: 49%;
  transform: rotate(20deg);
}

.tape-3 {
  top: 72%;
  transform: rotate(-10deg);
}

.tape-4 {
  top: 52%;
  transform: rotate(34deg);
}

/* Tape Exit Animations (Staggered Translations Off-Screen) */
.entry-overlay.tapes-exit .tape-1 {
  transform: rotate(-15deg) translateX(-180vw) !important;
  opacity: 0.3;
  transition-delay: 0ms !important;
}

.entry-overlay.tapes-exit .tape-2 {
  transform: rotate(20deg) translateX(180vw) !important;
  opacity: 0.3;
  transition-delay: 110ms !important;
}

.entry-overlay.tapes-exit .tape-3 {
  transform: rotate(-10deg) translateX(-180vw) !important;
  opacity: 0.3;
  transition-delay: 200ms !important;
}

.entry-overlay.tapes-exit .tape-4 {
  transform: rotate(34deg) translateX(180vw) !important;
  opacity: 0.3;
  transition-delay: 290ms !important;
}

/* ── 4. CENTRAL ACCESS RESTRICTED PANEL (z-index 9020) ─────────────────────── */
.restricted-card {
  position: relative;
  z-index: 9020;
  width: 470px;
  max-width: 90vw;
  background: rgba(7, 11, 18, 0.94);
  border: 2px solid #ff1758;
  border-radius: 4px;
  box-shadow: 
    0 0 35px rgba(255, 23, 88, 0.45),
    inset 0 0 25px rgba(255, 23, 88, 0.18),
    0 25px 60px rgba(0, 0, 0, 0.88);
  padding: 26px 24px 22px;
  text-align: center;
  transform: rotate(-5.5deg);
  transition: border-color 0.4s ease,
              box-shadow 0.4s ease,
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  cursor: pointer;
}

/* Card Idle Pulse */
.restricted-card:not(.access-granted):not(.card-exit) {
  animation: cardIdlePulse 3.5s ease-in-out infinite alternate;
}

@keyframes cardIdlePulse {
  0% {
    box-shadow: 0 0 30px rgba(255, 23, 88, 0.4), inset 0 0 20px rgba(255, 23, 88, 0.15), 0 25px 60px rgba(0, 0, 0, 0.85);
  }
  100% {
    box-shadow: 0 0 45px rgba(255, 23, 88, 0.6), inset 0 0 30px rgba(255, 23, 88, 0.25), 0 30px 70px rgba(0, 0, 0, 0.95);
  }
}

/* Card Header Technical Badges */
.card-tech-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Rajdhani', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 75, 125, 0.75);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.card-tech-header .tech-badge {
  background: rgba(255, 23, 88, 0.18);
  border: 1px solid rgba(255, 23, 88, 0.45);
  padding: 2px 7px;
  border-radius: 2px;
  color: #ff4d79;
}

/* Restriction Circle Icon (⛔ Style) */
.restriction-icon {
  margin: 0 auto 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ff1758;
  box-shadow: 0 0 20px rgba(255, 23, 88, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.icon-bar {
  width: 24px;
  height: 5px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
  transition: all 0.4s ease;
}

/* Main Heading */
.card-heading {
  margin: 0 0 8px;
  font-family: 'Orbitron', monospace;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ff2266;
  text-shadow: 0 0 16px rgba(255, 34, 102, 0.7);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* Subtext / CTA Prompt */
.card-subtext {
  font-family: 'Rajdhani', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255, 140, 180, 0.9);
  margin-bottom: 14px;
  text-transform: uppercase;
  transition: color 0.4s ease;
}

/* Terminal Readout Box (z-index 9030) */
.card-terminal {
  min-height: 38px;
  background: rgba(3, 6, 11, 0.85);
  border: 1px solid rgba(255, 23, 88, 0.35);
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  transition: border-color 0.4s ease;
}

.terminal-line {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #ff7597;
  min-height: 14px;
  white-space: nowrap;
  transition: color 0.4s ease;
}

.terminal-line.cyan {
  color: #00e5ff !important;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

/* Card Technical Footer */
.card-tech-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Rajdhani', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: rgba(255, 100, 140, 0.6);
  border-top: 1px solid rgba(255, 23, 88, 0.25);
  padding-top: 10px;
  text-transform: uppercase;
}

/* ── 5. AUTHENTICATION ACTIVE STATE (0ms - 900ms) ─────────────────────────── */
.restricted-card.authenticating {
  animation: cardShake 0.35s ease;
  border-color: #ff3377;
  box-shadow: 0 0 50px rgba(255, 51, 119, 0.7), inset 0 0 30px rgba(255, 51, 119, 0.3);
}

@keyframes cardShake {
  0% { transform: rotate(-5.5deg) translate(0, 0); }
  20% { transform: rotate(-6deg) translate(-4px, 2px); }
  40% { transform: rotate(-4.8deg) translate(4px, -2px); }
  60% { transform: rotate(-5.8deg) translate(-3px, 1px); }
  80% { transform: rotate(-5.2deg) translate(2px, -1px); }
  100% { transform: rotate(-5.5deg) translate(0, 0); }
}

/* ── 6. ACCESS GRANTED STATE (900ms - 1500ms) ─────────────────────────────── */
.restricted-card.access-granted {
  border-color: #00e5ff !important;
  box-shadow: 
    0 0 50px rgba(0, 229, 255, 0.65),
    inset 0 0 30px rgba(0, 229, 255, 0.25),
    0 25px 60px rgba(0, 0, 0, 0.95) !important;
}

.restricted-card.access-granted .icon-circle {
  background: #00e5ff !important;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.9) !important;
}

.restricted-card.access-granted .icon-bar {
  display: none !important;
}

.restricted-card.access-granted .icon-check {
  display: block !important;
  color: #02050b;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.icon-check {
  display: none;
}

.restricted-card.access-granted .card-heading {
  color: #00e5ff !important;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.8) !important;
}

.restricted-card.access-granted .card-subtext {
  color: #72f0ff !important;
  letter-spacing: 3.5px;
}

.restricted-card.access-granted .card-terminal {
  border-color: rgba(0, 229, 255, 0.45) !important;
}

.restricted-card.access-granted .card-tech-header,
.restricted-card.access-granted .card-tech-footer {
  color: rgba(0, 229, 255, 0.7) !important;
}

.restricted-card.access-granted .card-tech-header .tech-badge {
  background: rgba(0, 229, 255, 0.15) !important;
  border-color: rgba(0, 229, 255, 0.5) !important;
  color: #00e5ff !important;
}

/* ── 7. CARD EXIT ANIMATION (1400ms+) ─────────────────────────────────────── */
.restricted-card.card-exit {
  transform: rotate(-5.5deg) scale(1.08) !important;
  opacity: 0 !important;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s ease !important;
  pointer-events: none !important;
}

/* ── 8. SKIP BUTTON (z-index 9040) ────────────────────────────────────────── */
.skip-entry {
  position: absolute;
  bottom: 26px;
  right: 28px;
  z-index: 9040;
  background: rgba(5, 10, 18, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: rgba(0, 229, 255, 0.7);
  font-family: 'Rajdhani', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.skip-entry:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
  transform: translateY(-1px);
}

.skip-entry:active {
  transform: translateY(1px);
}

/* ── 9. RESPONSIVE DESIGN (MOBILE & TABLET) ───────────────────────────────── */
@media (max-width: 800px) {
  #entry-overlay {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hazard-tape {
    height: 42px;
    left: -50vw;
    width: 200vw;
  }

  .tape-track {
    gap: 24px;
  }

  .tape-track span {
    font-size: 15px;
    letter-spacing: 2.5px;
    padding: 2px 10px;
  }

  .restricted-card {
    width: 92vw;
    padding: 20px 16px 18px;
    transform: rotate(-4deg);
  }

  .restricted-card.authenticating {
    animation: cardShakeMobile 0.35s ease;
  }

  @keyframes cardShakeMobile {
    0% { transform: rotate(-4deg) translate(0, 0); }
    20% { transform: rotate(-4.5deg) translate(-3px, 1px); }
    40% { transform: rotate(-3.5deg) translate(3px, -1px); }
    60% { transform: rotate(-4.3deg) translate(-2px, 1px); }
    80% { transform: rotate(-3.8deg) translate(2px, -1px); }
    100% { transform: rotate(-4deg) translate(0, 0); }
  }

  .restricted-card.card-exit {
    transform: rotate(-4deg) scale(1.06) !important;
  }

  .card-heading {
    font-size: 19px;
    letter-spacing: 2px;
  }

  .card-subtext {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .card-tech-header,
  .card-tech-footer {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .card-terminal {
    padding: 6px 8px;
    min-height: 32px;
  }

  .terminal-line {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .skip-entry {
    bottom: 16px;
    right: 16px;
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ── 10. ACCESSIBILITY: PREFERS-REDUCED-MOTION ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hazard-tape,
  .tape-track,
  .entry-sweep,
  .restricted-card {
    animation: none !important;
  }

  .hazard-tape,
  .restricted-card,
  .entry-overlay {
    transition-duration: 0.25s !important;
  }
}
