@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  font-family: "Vazirmatn", sans-serif;
}

@layer base {

  html,
  body {
    margin: 0;
    padding: 0;
  }

  body {
    overscroll-behavior-y: none;
    background-color: #030a12;
  }

  body.nav-locked {
    overflow: hidden !important;
    touch-action: none;
  }

  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);
}

.hero-bg-video {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  width: auto;
  height: auto;
  border-radius: 1rem;
}

@media (min-width: 768px) {
  .hero-bg-video {
    top: 3rem;
    left: 3rem;
    right: 3rem;
    bottom: 3rem;
    border-radius: 1.5rem;
  }
}

.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);
}

.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;
}

.form-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #b9cacb;
}

.material-filled {
  font-variation-settings: "FILL" 1;
}

.field-underline-group {
  position: relative;
}

.field-underline {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-bottom: 1px solid rgba(59, 73, 75, 0.3);
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 1rem;
  color: #dae3ef;
  font-size: 1rem;
  outline: none;
  box-shadow: none;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-underline::placeholder {
  color: transparent;
}

.field-underline:focus {
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.field-underline:disabled {
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom-color: rgba(59, 73, 75, 0.2);
  color: #94a3b8;
  cursor: not-allowed;
}

.field-underline.ltr {
  direction: ltr;
  text-align: left;
}

.field-underline.select {
  appearance: none;
}

.field-underline option {
  background: #030a12;
  color: #ffffff;
}

.field-underline.textarea {
  resize: none;
  min-height: 6rem;
}

.field-underline.sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.field-underline.is-danger {
  border-bottom-color: rgba(255, 77, 77, 0.3);
}

.field-underline.is-danger:focus {
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.field-underline-label {
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: rgba(185, 202, 203, 0.6);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.field-underline-group.ltr .field-underline-label {
  right: auto;
  left: 1rem;
}

.field-underline:focus+.field-underline-label,
.field-underline:not(:placeholder-shown)+.field-underline-label {
  top: -1.5rem;
  font-size: 0.75rem;
  color: #00dbe9;
}

.field-underline.is-danger:focus+.field-underline-label,
.field-underline.is-danger:not(:placeholder-shown)+.field-underline-label {
  color: #ff4d4d;
}

.field-underline:disabled+.field-underline-label {
  color: rgba(148, 163, 184, 0.8);
}

.field-underline-label-static {
  display: block;
  font-size: 0.625rem;
  color: #00dbe9;
  margin-top: 0.25rem;
}

.field-underline-label-static.muted {
  color: #94a3b8;
}

.field-underline-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #00f0ff;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}

.field-underline:focus~.field-underline-bar {
  width: 100%;
}

.field-underline.is-danger:focus~.field-underline-bar {
  background-color: #ff4d4d;
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.5);
}

.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  min-width: 260px;
  max-width: 360px;
  padding: 0.85rem 1.1rem;
  border-radius: 0.75rem;
  color: #030a12;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.25s ease-out;
}

.toast--error {
  background: #ff4d4d;
}

.toast--success {
  background: #2bd4a0;
}

.toast--info {
  background: #00dbe9;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.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 {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

/* cards with a background video: the video is absolute, the real content is the next sibling */
.grid-card>video+* {
  flex: 1 1 auto;
  height: auto;
}

/* main area grows to fill the card (no forced display/direction on children) */
.grid-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

/* body centered vertically between header and footer */
.grid-card__body--center {
  flex: 0 1 auto;
  margin-block: auto;
}

/* pinned to the bottom of the card */
.grid-card__footer {
  margin-top: auto;
  flex-shrink: 0;
}

/* keep hover lift working on .reveal cards and keep timing consistent */
.cyber-border.reveal {
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.4s ease, box-shadow 0.4s ease;
}

.cyber-border.reveal.active:hover {
  transform: translateY(-2px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.4s ease, box-shadow 0.4s ease;
}

.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;
  margin-top: 0.2rem;
}

.category-card .cat-count {
  font-size: 0.6rem;
  color: #94a3b8;
}

@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-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;
  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;
  }
}

.countdown-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.countdown-label {
  color: #94a3b8;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.countdown-label strong {
  display: block;
  font-size: 1rem;
  color: #00f0ff;
  font-weight: 700;
  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;
  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;
  }
}

@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-section {
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  background: linear-gradient(to bottom,
      transparent,
      rgba(0, 240, 255, 0.025) 15%,
      rgba(0, 240, 255, 0.025) 85%,
      transparent);
}

.sponsor-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 900px);
  height: 100%;
  background: radial-gradient(ellipse 55% 90% at 50% 45%, rgba(0, 240, 255, 0.08), transparent 75%);
  pointer-events: none;
}

.sponsor-eyebrow {
  font-weight: 600;
  color: #00f0ff;
  letter-spacing: .4em;
}

.sponsor-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #e2f5ff;
}

.sponsor-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .sponsor-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .sponsor-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
  }
}

.sponsor-plate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2rem 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(160deg, rgba(0, 240, 255, 0.03), rgba(255, 255, 255, 0) 60%),
    rgba(8, 20, 32, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.07);
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.4s ease, background 0.4s ease;
}

.sponsor-plate::before,
.sponsor-plate::after {
  content: "";
  position: absolute;
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid transparent;
  transition: border-color 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

.sponsor-plate::before {
  top: -1px;
  inset-inline-start: -1px;
  border-inline-start-color: #00f0ff;
  border-top-color: #00f0ff;
}

.sponsor-plate::after {
  bottom: -1px;
  inset-inline-end: -1px;
  border-inline-end-color: #00f0ff;
  border-bottom-color: #00f0ff;
}

.sponsor-plate .sponsor-icon {
  width: 2rem;
  height: 2rem;
  color: rgba(148, 163, 184, 0.6);
  transition: color 0.4s ease, filter 0.4s ease, transform 0.4s ease;
}

.sponsor-plate .sponsor-name {
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.6);
  transition: color 0.4s ease;
}

.sponsor-plate:hover {
  border-color: rgba(0, 240, 255, 0.12);
  background: linear-gradient(160deg, rgba(0, 240, 255, 0.06), rgba(255, 255, 255, 0) 60%),
    rgba(8, 20, 32, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(0, 240, 255, 0.15);
}

.sponsor-plate:hover::before,
.sponsor-plate:hover::after {
  opacity: 1;
}

.sponsor-plate:hover .sponsor-icon {
  color: #00f0ff;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
  transform: scale(1.08);
}

.sponsor-plate:hover .sponsor-name {
  color: #e2f5ff;
}

@media (max-width: 640px) {
  .sponsor-plate {
    padding: 1.5rem 0.75rem;
  }

  .sponsor-plate .sponsor-icon {
    width: 1.7rem;
    height: 1.7rem;
  }

  .sponsor-plate .sponsor-name {
    font-size: 0.75rem;
  }
}

.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;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.visually-hidden-sr-exact {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.w-66 {
  width: 66%;
}

.w-75 {
  width: 75%;
}

.cyber-grid-overlay {
  background-image:
    linear-gradient(var(--cyber-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--cyber-border) 1px, transparent 1px);
  background-size: 40px 40px;
}

.btn-cyan-outline {
  border: 2px solid rgb(0, 240, 255);
  color: rgb(0, 240, 255);
}

.password-toggle {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgb(148, 163, 184);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.2s;
  z-index: 10;
}

.password-toggle:hover {
  color: rgb(0, 240, 255);
}

/* ==========================================================================
   Mobile/WebKit Video Controls Suppression (Decorative Loops)
   ========================================================================== */
video:not([controls])::-webkit-media-controls,
video:not([controls])::-webkit-media-controls-enclosure,
video:not([controls])::-webkit-media-controls-panel,
video:not([controls])::-webkit-media-controls-play-button,
video:not([controls])::-webkit-media-controls-start-playback-button,
video:not([controls])::-webkit-media-controls-overlay-play-button,
video:not([controls])::-webkit-media-controls-current-time-display,
video:not([controls])::-webkit-media-controls-time-remaining-display,
video:not([controls])::-webkit-media-controls-timeline,
video:not([controls])::-webkit-media-controls-volume-slider,
[data-decorative-video="true"]::-webkit-media-controls,
[data-decorative-video="true"]::-webkit-media-controls-start-playback-button,
[data-decorative-video="true"]::-webkit-media-controls-overlay-play-button,
.hero-bg-video::-webkit-media-controls,
.hero-bg-video::-webkit-media-controls-start-playback-button,
.hero-bg-video::-webkit-media-controls-overlay-play-button,
.prize-trophy-video::-webkit-media-controls,
.prize-trophy-video::-webkit-media-controls-start-playback-button,
.prize-trophy-video::-webkit-media-controls-overlay-play-button,
[data-purpose="card-what-is-ctf"] video::-webkit-media-controls,
[data-purpose="card-what-is-ctf"] video::-webkit-media-controls-start-playback-button,
[data-purpose="card-what-is-ctf"] video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

video:not([controls]),
[data-decorative-video="true"],
.hero-bg-video,
.prize-trophy-video,
[data-purpose="card-what-is-ctf"] video {
  pointer-events: none !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* Explicitly preserve intentional user-facing media players (e.g. History_of_the_event.html) */
video[controls] {
  pointer-events: auto !important;
}

video[controls]::-webkit-media-controls,
video[controls]::-webkit-media-controls-enclosure,
video[controls]::-webkit-media-controls-panel,
video[controls]::-webkit-media-controls-play-button {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}