@import url("https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: "Vazirmatn", sans-serif;
  background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
  color: #ccc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  perspective: 1200px;
  direction: rtl;
}

/* کانتینر مرکزی */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* هدر */
header {
  padding: 40px 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

header h1 {
  color: #d4af37;
  font-size: 3rem;
  letter-spacing: 3px;
  text-shadow: 0 0 15px #d4af37;
  margin-bottom: 8px;
}

header p {
  color: #bbb;
  font-size: 1.2rem;
  font-weight: 500;
  text-shadow: 0 0 6px rgba(212, 175, 55, 0.7);
}

/* لیست بلاگ */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  padding-bottom: 80px;
  perspective: 1000px;
}

/* کارت بلاگ */
.blog-card {
  background: #2f2f2f;
  border-radius: 18px;
  padding: 25px 30px;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2),
    inset 0 0 10px rgba(212, 175, 55, 0.15);
  color: #ddd;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  border: 2px solid transparent;
}

/* پس‌زمینه درخشان متحرک */
.blog-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: radial-gradient(
    circle at center,
    rgba(212, 175, 55, 0.25) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  filter: blur(30px);
  z-index: 0;
}

/* وقتی موس روی کارت است */
.blog-card:hover {
  transform: translateZ(40px) scale(1.05);
  box-shadow: 0 15px 30px rgba(212, 175, 55, 0.8),
    inset 0 0 30px rgba(212, 175, 55, 0.3);
  border-color: #d4af37;
}

.blog-card:hover::before {
  opacity: 1;
  animation: glowRotate 4s linear infinite;
  filter: blur(50px);
  z-index: -1;
}

/* عنوان کارت */
.blog-card h2 {
  color: #d4af37;
  font-size: 1.7rem;
  margin-bottom: 14px;
  text-shadow: 0 0 10px #d4af37;
  transform-style: preserve-3d;
}

/* متن کارت */
.blog-card p {
  line-height: 1.65;
  font-size: 1.05rem;
  color: #ccc;
  transform-style: preserve-3d;
}

/* افکت چرخش نور */
@keyframes glowRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* فوتر */
footer {
  background: #222;
  text-align: center;
  padding: 20px 0;
  color: #999;
  font-size: 0.95rem;
  box-shadow: inset 0 3px 12px rgba(212, 175, 55, 0.15);
  user-select: none;
  letter-spacing: 0.3px;
}
a {
  text-decoration: none;
}
/* CSS */
.glass-gold-button {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 10px 28px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-family: "Vazirmatn", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, background 0.3s ease;
}

/* افکت نور طلایی در هاور */
.glass-gold-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 150%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  z-index: 0;
}

.glass-gold-button:hover::before {
  left: 100%;
}

.glass-gold-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.04);
}

/* افکت کلیک: نبض طلایی */
.glass-gold-button:active {
  animation: goldenPulse 0.4s ease;
}

@keyframes goldenPulse {
  0% {
    box-shadow: 0 0 0 rgba(212, 175, 55, 0);
  }
  50% {
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.5);
  }
  100% {
    box-shadow: 0 0 0 rgba(212, 175, 55, 0);
  }
}
#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;
  }
}
