:root {
  --primary-color: #8b0000;
  --secondary-color: #d4af37;
  --transition-time: 1s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tahoma", "Segoe UI", sans-serif;
}

body {
  overflow: hidden;
  background: #000;
  height: 100vh;
  width: 100vw;
  position: fixed;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: url("../../img/1U9A0284.JPG") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: scale(clamp(1, 1.3, 2));
  transition: transform 3s ease;
  overflow: hidden;
}

/* كونتينر البوابة */
.gate-container {
  position: relative;
  width: min(90%, 500px);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline: auto;
  margin-top: clamp(4rem, 18vh, 20rem);
  opacity: 0.3;
}

i {
  position: absolute;
  color: white;
  font-size: 40px;
  margin-left: 30px;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}


/* البوابة */
.gate {
  position: relative;
  width: clamp(80px, 4vw, 180px);
  height: clamp(220px, 25vh, 100px);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  perspective: 1000px;
  margin: auto;
}

/* صورة البوابة */
.gate img {
  width: 50%;
  height: 100%;
  object-fit: cover;
  transform-origin: center left;
  transition: transform 1s ease;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
  .scene {
    transform: scale(1);
  }

  .gate-container {
    margin-top: 40vh;
  }
}

/* للشاشات الكبيرة */
@media (min-width: 1400px) {
  .scene {
    transform: scale(1.8);
  }
}


.gate .right {
  transform-origin: center right;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* الضوء */
.light {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(250, 250, 250, 0) 70%
  );
  opacity: 0;
  transition: opacity 2s ease;
  pointer-events: none;
  z-index: 1;
}

.enter .gate .left {
  transform: translateX(80px) scale(1.08);
}

.enter .gate .right {
  transform: translateX(-80px) scale(1.08);
}

.enter .scene {
  transform: scale(1.8);
}

.enter .light {
  opacity: 0.8;
}

/* التلاشي */
.fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  z-index: 100;
}

.fade.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .gate {
    height: 60vh;
    min-height: 350px;
  }

  .enter .scene {
    transform: scale(1.5);
  }
}

@media (max-width: 480px) {
  .gate {
    height: 50vh;
    min-height: 300px;
  }

  .enter .scene {
    transform: scale(1.3);
  }
}
@media (min-width: 1200px) {
  .gate {
    max-width: 600px;
    max-height: 700px;
  }
}
.gate:active {
  transform: scale(0.98);
}
