
@layer base {
  html,
  body {
    margin: 0;
    padding: 0;
  }
  body {
    overscroll-behavior: none;
    background-color: #030a12;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* اسکرول‌بار مخفی به‌صورت پیش‌فرض در کل سایت */
::-webkit-scrollbar {
  display: none;
}

/* پس‌زمینه شطرنجی اختیاری — برای صفحات ثبت‌نام و پنل کاربری */
body.bg-grid {
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

[dir="ltr"],
.ltr-num {
  direction: ltr;
  unicode-bidi: isolate;
}

.neon-text {
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

/* ===== Buttons ===== */
.btn-cyan {
  background-color: #00f0ff;
  color: #030a12;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}
.btn-cyan:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
  transform: translateY(-2px) scale(1.02);
}
.btn-outline {
  border: 1px solid #00f0ff;
  color: #00f0ff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

/* ===== Cards ===== */
.cyber-border {
  border: 1px solid rgba(0, 240, 255, 0.15);
  background: linear-gradient(135deg, rgba(5, 17, 28, 0.8) 0%, rgba(3, 10, 18, 0.9) 100%);
  backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cyber-border:hover {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
}
.cyber-card {
  background: rgba(5, 17, 28, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.06);
  border-radius: 1rem;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cyber-card:hover {
  border-color: rgba(0, 240, 255, 0.15);
  box-shadow: 0 4px 24px rgba(0, 240, 255, 0.04);
  transform: translateY(-2px);
}

.globe-container {
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
}

.pulse {
  animation: pulse-animation 2s infinite;
}
@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0px rgba(0, 240, 255, 0.7);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(0, 240, 255, 0);
  }
}

@keyframes breathing-glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  }
}
.animate-breathing {
  animation: breathing-glow 3s infinite ease-in-out;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.hashed-text {
  cursor: default;
  transition: color 0.2s;
}

.timeline-separator {
  flex: 1;
  height: 1px;
  background: rgba(0, 240, 255, 0.2);
  min-width: 8px;
}

/* تنظیم ارتفاع یکسان برای تمام کارت‌های گرید */
.grid-card {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .grid-card {
    aspect-ratio: auto;
    min-height: 380px;
  }
}

/* ===== Category Card ===== */
.category-card {
  background: rgba(5, 17, 28, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem 0.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.category-card:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.4);
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.1);
}
.category-card svg {
  transition: all 0.3s ease;
}
.category-card:hover svg {
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
}
.category-card .cat-name {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: white;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}
.category-card .cat-count {
  font-size: 0.6rem;
  color: #94a3b8;
  letter-spacing: 0.05em;
}
@media (max-width: 640px) {
  .category-card {
    padding: 0.75rem 0.25rem;
  }
  .category-card .cat-name {
    font-size: 0.6rem;
  }
  .category-card svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* ===== FAQ ===== */
.faq-question {
  width: 100%;
  text-align: right;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Vazirmatn", sans-serif;
  transition: all 0.25s ease;
  border-radius: 1rem;
}
.faq-question:hover .faq-question-text {
  color: #00f0ff;
}
.faq-question .faq-icon-box {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.faq-question .faq-icon-box .faq-icon {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: #94a3b8;
}
.faq-question .faq-icon-box .faq-icon.open {
  transform: rotate(180deg);
  color: #00f0ff;
}
.faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.9;
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1rem;
  font-weight: 300;
}
.faq-answer.open {
  display: block;
  animation: fadeInUp 0.4s ease forwards;
}
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
  }
  .faq-answer {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.75rem;
  }
  .faq-question .faq-icon-box {
    width: 1.75rem;
    height: 1.75rem;
  }
  .faq-question .faq-icon-box svg {
    width: 0.9rem;
    height: 0.9rem;
  }
}

/* ===== index.html specific widgets (بی‌ضرر برای بقیه صفحات) ===== */
.countdown-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.countdown-label {
  color: #94a3b8;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: "Rajdhani", sans-serif;
}
.countdown-label strong {
  display: block;
  font-size: 1rem;
  color: #00f0ff;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}
.countdown {
  display: flex;
  gap: 1.2rem;
}
.unit {
  text-align: center;
}
.unit b {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.unit span {
  display: block;
  font-size: 0.55rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.1em;
  margin-top: 0.1rem;
}
@media (max-width: 640px) {
  .countdown-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .countdown {
    gap: 0.8rem;
  }
  .unit b {
    font-size: 1.3rem;
  }
}

/* ===== login.html specific (اسکن نوار بالای فرم ورود) ===== */
@keyframes scan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(400%);
  }
}
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.shimmer-effect {
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* Sponsor Slider */
.sponsor-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.5rem 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.sponsor-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: scrollSponsors 30s linear infinite;
  will-change: transform;
}
.sponsor-slider:hover .sponsor-track {
  animation-play-state: paused;
}
.sponsor-item {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}
.sponsor-item:hover {
  color: #00f0ff;
  transform: scale(1.1);
  background: rgba(0, 240, 255, 0.05);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
@keyframes scrollSponsors {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@media (max-width: 640px) {
  .sponsor-track {
    gap: 2rem;
  }
  .sponsor-item {
    font-size: 0.85rem;
  }
}

/* فشرده‌سازی کارت‌های Team Registration و Leaderboard در index */
.compact-card .space-y-6 {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.compact-card .mb-8 {
  margin-bottom: 0.5rem;
}
.compact-card .text-xs {
  font-size: 0.6rem;
}
.compact-card .text-\[10px\] {
  font-size: 0.5rem;
}
.compact-card .gap-4 {
  gap: 0.5rem;
}
.compact-card .p-2 {
  padding: 0.25rem 0.5rem;
}
