/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
}

body,
html {
  height: 100%;
  background: #0d0d0d;
  color: #d4af37;
  overflow: hidden;
}
.back-home {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ffcc00, #ff9900);
  color: #000;
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 1px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
  transition: all 0.3s ease;
}

/* افکت هاور */
.back-home:hover {
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 8px 20px rgba(255, 204, 0, 0.6);
}

/* انیمیشن نور طلایی */
.back-home::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: all 0.5s;
}

.back-home:hover::before {
  left: 100%;
}

/* تایمر کناری */
#side-timer {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 200px;
  border-radius: 6px;
  background: rgba(255, 215, 100, 0.15);
  overflow: hidden;
  z-index: 250;
}
#timer-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #d4af37, #f6e77e);
  box-shadow: 0 0 12px #d4af37;
  transition: height linear;
}

/* دکمه خانه */
.header {
  position: fixed;
  top: 30px;
  left: 12px;
  z-index: 200;
}

#homeBtn {
  background: #d4af37;
  color: #121212;
  padding: 10px 20px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 12px #d4af37aa;
  transition: all 0.3s ease;
}
#homeBtn:hover {
  background: #f0d97d;
  transform: scale(1.05);
}

/* Intro */
.intro-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #2b2b2b, #0d0d0d);
}

.intro-text {
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: 5px;
  text-shadow: 0 0 25px #d4af37, 0 0 50px #d4af3799;
  animation: fadeInZoom 2s forwards;
}

/* صفحات اصلی */
.about-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #141414;
  padding: 50px;
}

.content-block {
  background: linear-gradient(145deg, #1c1c1c, #2b2b2b);
  border-radius: 20px;
  padding: 40px 50px;
  box-shadow: 0 0 35px #d4af3755, inset 0 0 20px #000;
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: opacity 1s ease, transform 1s ease;
  max-width: 900px;
  text-align: center;
}

.content-block.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.content-block h2 {
  font-size: 2.5rem;
  border-bottom: 3px solid #d4af37;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.content-block p {
  font-size: 1.3rem;
  line-height: 1.8;
  color: #f5eac9;
}

.content-block img {
  width: 100%;
  border-radius: 15px;
  margin-top: 20px;
  box-shadow: 0 0 20px #d4af37aa;
}

/* انیمیشن متن معرفی */
@keyframes fadeInZoom {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 700px) {
  .intro-text {
    font-size: 2.5rem;
  }
  .content-block {
    padding: 20px;
  }
  .content-block h2 {
    font-size: 2rem;
  }
  .content-block p {
    font-size: 1.1rem;
  }
}
#content {
  opacity: 0;
  filter: blur(12px);
  transition: opacity 1.2s ease, filter 1.2s ease;
  padding: 20px;
}

/* وقتی لودینگ تموم شد */
#content.show {
  opacity: 1;
  filter: blur(0);
}

/* کل صفحه لودینگ */
#loader {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.85); /* مشکی مات و نیمه شفاف */
  backdrop-filter: blur(12px); /* بلور */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  user-select: none;
  transition: opacity 0.8s ease;
}

/* پنهان کردن با fadeout */
#loader.hide {
  opacity: 0;
  pointer-events: none;
}

/* حلقه‌ها */
.rings {
  position: relative;
  width: 120px;
  height: 120px;
}

.ring {
  position: absolute;
  border: 6px solid transparent;
  border-top-color: #d4af37;
  border-radius: 50%;
  animation-timing-function: cubic-bezier(0.68, 0.55, 0.265, 1.55);
  box-shadow: 0 0 8px #d4af37, 0 0 15px #d4af37;
}

.ring1 {
  width: 120px;
  height: 120px;
  top: 0;
  left: 0;
  animation: spinClockwise 1.8s linear infinite;
}

.ring2 {
  width: 90px;
  height: 90px;
  top: 15px;
  left: 15px;
  border-top-color: #bbb;
  box-shadow: 0 0 6px #bbb, 0 0 12px #bbb;
  animation: spinCounter 1.2s linear infinite;
}

.ring3 {
  width: 60px;
  height: 60px;
  top: 30px;
  left: 30px;
  animation: spinClockwise 1s linear infinite;
}

@keyframes spinClockwise {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spinCounter {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

/* متن بارگذاری */
#loader-text {
  margin-top: 30px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #d4af37;
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px #d4af37, 0 0 20px #d4af37;
  animation: glowText 2.5s ease-in-out infinite;
}

@keyframes glowText {
  0%,
  100% {
    text-shadow: 0 0 8px #d4af37, 0 0 20px #d4af37, 0 0 30px #d4af37;
    color: #d4af37;
  }
  50% {
    text-shadow: 0 0 4px #fff, 0 0 15px #fff, 0 0 25px #d4af37;
    color: #fff;
  }
}
