@keyframes ctf-shine-move {
  0% {
    top: -120%;
    left: -120%;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 120%;
    left: 120%;
    opacity: 0;
  }
}

@keyframes ctf-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}


body.page-home {
  font-family: 'Outfit', 'Titillium Web', var(--font-sans);
  background-color: #0b0b0f;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(88, 166, 255, 0.08), transparent 50%);
  color: #e8eaed;
  min-height: 100vh;
}

.home-bg {
  background-image:
    radial-gradient(circle at 15% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(88, 166, 255, 0.06) 0%, transparent 40%);
}



.ctf-header {
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 15, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 993px) {
  .ctf-header {
    position: sticky;
  }
}

@media (max-width: 992px) {
  .ctf-header {
    position: relative;
  }
}

.ctf-header .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 1rem;
}

.ctf-site-logo img {
  height: 72px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.ctf-header__burger {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

.ctf-header-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.35rem;
  margin: 0;
  padding: 0;
}

.ctf-header-nav a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ctf-header-nav a:hover {
  color: var(--home-accent);
}

.home-main {
  position: relative;
  z-index: 1;
}


@media (prefers-reduced-motion: no-preference) {
  .ctf-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition:
      opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--ctf-reveal-delay, 0s);
  }

  .ctf-reveal.ctf-reveal--visible {
    opacity: 1;
    transform: translateY(0);
  }

  .ctf-reveal--from-left {
    transform: translateX(-40px);
  }

  .ctf-reveal--from-left.ctf-reveal--visible {
    transform: translateX(0);
  }

  .ctf-reveal--from-right {
    transform: translateX(40px);
  }

  .ctf-reveal--from-right.ctf-reveal--visible {
    transform: translateX(0);
  }

  
  .ctf-service__box.ctf-reveal--visible:hover {
    transform: translateY(-5px);
  }

  .ctf-joueur-wrap.ctf-reveal--visible:hover {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctf-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ctf-reveal--from-left,
  .ctf-reveal--from-right {
    transform: none;
  }
}


.ctf-heros {
  padding: 1.5rem 0 2.5rem;
}

.ctf-hero-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-hero-box {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: min(52vh, 420px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.5rem, 6vw, 10%);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  background:
    linear-gradient(105deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0.15) 70%, transparent 92%),
    url('../images/banner-hero.png') center top / cover no-repeat;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.ctf-hero-box > * {
  position: relative;
  z-index: 1;
}

.ctf-hero-box.shine-effect::after {
  content: '';
  position: absolute;
  top: -120%;
  left: -120%;
  width: 240%;
  height: 240%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: rotate(25deg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .ctf-hero-box.shine-effect:hover::after {
    animation: ctf-shine-move 1s forwards;
  }
}

.ctf-hero-box h1,
.ctf-hero-box h2 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ctf-hero-box h1 span,
.ctf-hero-box h2 span {
  color: var(--home-accent);
}

.ctf-hero-box > p {
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  line-height: 1.65;
  max-width: 34rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
}

.ctf-hero__btn {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}


.ctf-hero__btn[hidden] {
  display: none !important;
}

.ctf-hero__btn a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ctf-hero__btn a:first-child {
  background: linear-gradient(135deg, var(--home-accent) 0%, var(--home-accent-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.4);
}

.ctf-hero__btn a:first-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(59, 130, 246, 0.5);
}

.ctf-hero__btn a:last-child {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.ctf-hero__btn a:last-child:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}


.ctf-hero__btn a:only-child {
  background: linear-gradient(135deg, var(--home-accent) 0%, var(--home-accent-deep) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.4);
}

.ctf-hero__btn a:only-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(59, 130, 246, 0.5);
}


.ctf-about {
  padding: 3rem 0 3.5rem;
}

.ctf-about .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-about__flex {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.ctf-about__column {
  flex: 1;
  min-width: 200px;
}

.ctf-about__side {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0.85;
  max-width: 280px;
}

.ctf-about__side-inner {
  width: 100%;
  aspect-ratio: 3/4;
  max-height: 340px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(59, 130, 246, 0.12) 0%, rgba(88, 166, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.ctf-about__side-inner svg {
  width: 100%;
  max-width: 120px;
  height: auto;
  opacity: 0.85;
  color: var(--home-accent);
}

.ctf-about__center {
  flex: 1.4;
  min-width: min(100%, 320px);
}

.ctf-about__center h2,
.ctf-about__center h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.ctf-about__center h2 span,
.ctf-about__center h3 span {
  color: var(--home-accent);
}

.ctf-about__center > p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1.02rem;
}

.ctf-about__list h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.ctf-about__list ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.ctf-about__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}

.ctf-about__list li::before {
  content: '';
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  background: var(--home-accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.ctf-theme-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--home-accent) 0%, var(--home-accent-deep) 100%);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
  transition: transform 0.2s ease;
}

.ctf-theme-btn:hover {
  transform: translateY(-2px);
  color: #fff !important;
}


.ctf-service {
  padding: 2rem 0 3rem;
}

.ctf-service .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ctf-section-title span {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  text-transform: none;
}

.ctf-section-title h2,
.ctf-section-title h3 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.ctf-section-title h2 span,
.ctf-section-title h3 span {
  display: inline;
  color: var(--home-accent);
  font-size: inherit;
  letter-spacing: inherit;
}

.ctf-service__flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.ctf-service__box {
  flex: 1 1 220px;
  max-width: 280px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(20, 20, 28, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ctf-service__box:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.ctf-service__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.ctf-service__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(88, 166, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctf-service__icon svg {
  width: 26px;
  height: 26px;
  color: var(--home-accent);
  stroke: currentColor;
}

.ctf-service__content h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: #fff;
}

.ctf-service__content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}


.ctf-plat {
  position: relative;
  padding: 4rem 0;
  background:
    linear-gradient(180deg, rgba(11, 11, 15, 0.92) 0%, rgba(11, 11, 15, 0.75) 100%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(88, 166, 255, 0.08) 0%, transparent 55%),
    url('../images/banner-hero.png') center / cover no-repeat scroll;
  background-color: #0b0b0f;
  overflow: hidden;
}

.ctf-plat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 11, 15, 0.85) 100%);
  pointer-events: none;
}

.ctf-plat .container {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-plat .ctf-section-title h2 span,
.ctf-plat .ctf-section-title h3 span {
  color: var(--home-accent);
}

.ctf-plat__flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.5rem;
}

.ctf-plat__box {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
}

.ctf-plat__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctf-plat__icon svg {
  width: 28px;
  height: 28px;
  color: var(--home-accent);
}

.ctf-plat__text span {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.ctf-plat__text span span {
  font-size: 1.2rem;
  color: var(--home-accent);
  margin-left: 2px;
}

.ctf-plat__text p {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}


.ctf-joueur {
  padding: 4rem 0;
  background: #0b0b0f;
}

.ctf-joueur .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-joueur__flex {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ctf-joueur-empty {
  text-align: center;
  width: 100%;
  padding: 2rem;
}

.ctf-joueur-wrap {
  width: 220px;
  min-height: 240px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s ease;
  background: #14141a;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ctf-joueur-wrap:hover {
  transform: translateY(-6px);
}

.ctf-joueur-box {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 55%);
  border-radius: inherit;
  position: relative;
}

.ctf-joueur-wrap[data-rank='1'] .ctf-joueur-box {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.22) 0%, rgba(20, 20, 26, 0.95) 55%);
}

.ctf-joueur-wrap[data-rank='2'] .ctf-joueur-box {
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.18) 0%, rgba(20, 20, 26, 0.95) 55%);
}

.ctf-joueur-wrap[data-rank='3'] .ctf-joueur-box {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.18) 0%, rgba(20, 20, 26, 0.95) 55%);
}

.ctf-couronne {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 1.15rem;
  color: #ffd700;
  animation: ctf-float 3s ease-in-out infinite;
}

.ctf-couronne--silver {
  color: #c0c0c0;
  animation: none;
}

.ctf-couronne--bronze {
  color: #cd7f32;
  animation: none;
}

.ctf-ruban {
  position: absolute;
  right: -12px;
  top: 22px;
  background: linear-gradient(135deg, #ffd700, #e6ac00);
  color: #0b0b0f;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 14px;
  transform: rotate(45deg);
  transform-origin: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 5;
  min-width: 2rem;
}

.ctf-joueur-wrap[data-rank='2'] .ctf-ruban {
  background: linear-gradient(135deg, #e8e8e8, #a8a8a8);
}

.ctf-joueur-wrap[data-rank='3'] .ctf-ruban {
  background: linear-gradient(135deg, #e8a060, #b87333);
}

.ctf-joueur-wrap[data-rank='4'] .ctf-ruban {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.12));
  color: #fff;
}

.ctf-img-container {
  margin-top: 38px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(88, 166, 255, 0.15));
}

.ctf-avatar-initial {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.ctf-joueur-title h3 {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 6px;
}

.ctf-joueur-title a {
  color: #f1f5f9 !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ctf-joueur-title a:hover {
  color: var(--home-accent) !important;
}

.ctf-joueur-text {
  text-align: center;
  padding-bottom: 1rem;
}

.ctf-score {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
}

.ctf-joueur-text p {
  color: #94a3b8;
  font-size: 0.8rem;
  margin: 0;
}


.ctf-partners {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ctf-partners .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 720px;
  margin: 1.5rem auto 0;
}

.ctf-partner-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 500;
}


.ctf-footer {
  padding: 3rem 0 2rem;
  background: #070709;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ctf-footer .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ctf-footer__flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
}

.ctf-footer__wrap {
  flex: 1 1 200px;
  max-width: 280px;
}

.ctf-footer__logo img {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
}

.ctf-footer__text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.ctf-footer__title h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.ctf-footer__contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ctf-footer__contact li {
  margin-bottom: 0.5rem;
}

.ctf-footer__contact a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.ctf-footer__contact a:hover {
  color: var(--home-accent);
}

.ctf-footer__copy {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}


@media (max-width: 992px) {
  .ctf-header__burger {
    display: inline-flex;
  }

  .ctf-header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(11, 11, 15, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    display: none;
    overflow: visible;
  }

  .ctf-header-nav.is-open {
    display: block;
  }

  .ctf-header-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .ctf-header-nav a {
    padding: 0.65rem 0.5rem;
    border-radius: 8px;
  }

  .ctf-header-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .ctf-about__flex {
    flex-direction: column;
    align-items: center;
  }

  .ctf-about__side {
    max-width: 100%;
    width: 100%;
  }

  .ctf-about__side-inner {
    max-height: 220px;
    aspect-ratio: 16/9;
  }

  .ctf-service__box {
    max-width: 100%;
  }

  .ctf-hero-box {
    align-items: center;
    text-align: center;
    min-height: 46vh;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.45) 100%),
      url('../images/banner-hero.png') center top / cover no-repeat;
  }

  .ctf-hero__btn {
    justify-content: center;
  }

  .ctf-hero-box > p {
    margin-left: auto;
    margin-right: auto;
  }

  .ctf-partners-grid {
    grid-template-columns: 1fr;
  }

  .ctf-footer__flex {
    flex-direction: column;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .ctf-service__box {
    flex: 1 1 calc(50% - 1rem);
  }
}




body.page-app {
  font-family: 'Outfit', 'Titillium Web', var(--font-sans);
  background-color: #0b0b0f;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(88, 166, 255, 0.08), transparent 50%);
  color: #e8eaed;
  min-height: 100vh;
}

.page-app .home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(88, 166, 255, 0.06) 0%, transparent 40%);
}

.ctf-page-main {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-app .ctf-app-title {
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #fff;
}

.page-app .ctf-app-lead {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.page-app .text-muted {
  color: rgba(255, 255, 255, 0.55);
}

.page-app .card {
  background: linear-gradient(165deg, rgba(28, 26, 38, 0.92) 0%, rgba(14, 12, 22, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.page-app .card h2 {
  color: #fff;
}

.page-app .admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.page-app .admin-nav a {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.page-app .admin-nav a:hover,
.page-app .admin-nav a.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--home-accent);
}

.page-app .challenge-item {
  padding: 1.25rem;
}

.page-app .ctf-hint {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 10px;
  font-size: 0.9rem;
}

.page-app .ctf-hint summary {
  cursor: pointer;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  list-style: none;
}

.page-app .ctf-hint summary::-webkit-details-marker {
  display: none;
}

.page-app .ctf-hint summary::before {
  content: '💡 ';
}

.page-app .ctf-hint[open] summary {
  margin-bottom: 0.5rem;
}

.page-app .ctf-hint p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  white-space: pre-wrap;
}

.page-app .ctf-flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.page-app .ctf-flag-row input {
  flex: 1 1 180px;
  min-width: 0;
}


.ctf-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.ctf-cat-tabs__label {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.15rem 0;
}

.ctf-cat-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ctf-cat-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.ctf-cat-tab.is-active {
  background: linear-gradient(135deg, var(--home-accent) 0%, var(--home-accent-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
}

.page-app .btn-hint {
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  color: #1a1a12;
  border: 1px solid rgba(234, 179, 8, 0.85);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

.page-app .btn-hint:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ctf-flag-result-dialog.ctf-flag-result--success .ctf-modal-inner h2 {
  color: #4ade80;
}

.ctf-flag-result-dialog.ctf-flag-result--error .ctf-modal-inner h2 {
  color: #f87171;
}

.ctf-hint-dialog-body {
  white-space: pre-wrap;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.page-app .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.page-app .stats-grid .stat-box {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.page-app .stats-grid .stat-box h3 {
  font-size: 1.65rem;
  margin: 0 0 0.35rem;
  color: var(--home-accent);
}

.page-app .stats-grid .stat-box p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.ctf-modal-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  max-width: min(520px, 96vw);
  width: 100%;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(28, 26, 38, 0.98) 0%, rgba(14, 12, 22, 0.95) 100%);
  color: #e8eaed;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.55);
}

.ctf-modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.ctf-modal-dialog .ctf-modal-inner {
  padding: 1.5rem 1.35rem;
}

.ctf-modal-dialog h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.ctf-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.page-app .ctf-profile-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #fff;
}

.page-app .ctf-profile-meta {
  margin: 0;
}

.page-app .ctf-profile-meta dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.2rem;
}

.page-app .ctf-profile-meta dd {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}

.page-app .ctf-profile-meta dd:last-of-type {
  margin-bottom: 0;
}

.page-app .ctf-profile-danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(
    165deg,
    rgba(80, 20, 20, 0.35) 0%,
    rgba(14, 12, 22, 0.88) 100%
  );
}

.page-app .ctf-profile-danger .ctf-profile-section-title {
  color: #fca5a5;
}

.page-app .ctf-profile-2fa-lead {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.page-app .ctf-profile-2fa-status {
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.page-app .ctf-profile-2fa-status--on {
  color: #86efac;
}

.page-app .ctf-profile-2fa-status--off {
  color: rgba(255, 255, 255, 0.55);
}

.page-app .ctf-profile-2fa-qr-wrap {
  display: inline-block;
  padding: 0.75rem;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.page-app .ctf-profile-2fa-qr {
  display: block;
  border-radius: 8px;
}

.page-app .ctf-profile-backup-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.95rem;
  line-height: 1.8;
  color: #e8eaed;
}

.page-app .ctf-profile-backup-list code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.page-app .ctf-profile-2fa-loading {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.5rem 0;
}

.page-app .ctf-profile-2fa-secret-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.page-app .ctf-profile-2fa-secret-input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #e8eaed;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.88rem;
}

.page-app .form-group label {
  color: rgba(255, 255, 255, 0.78);
}

.page-app input[type='text'],
.page-app input[type='email'],
.page-app input[type='password'] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8eaed;
}


.ctf-cat-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem 1.1rem;
  margin-top: 0.5rem;
}

.ctf-cat-pick-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(32, 30, 44, 0.95) 0%, rgba(14, 12, 22, 0.92) 100%);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.ctf-cat-pick-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.ctf-cat-pick-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.ctf-cat-pick-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ctf-cat-pick-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.25) 0%, rgba(88, 166, 255, 0.08) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ctf-cat-pick-card__label {
  display: block;
  padding: 0.65rem 0.75rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}

.ctf-challenges-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.ctf-challenges-view-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.page-app .admin-cat-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: middle;
}

.page-app .admin-cat-thumb-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}


.page-app .admin-user-cell {
  vertical-align: middle;
  min-width: 7.5rem;
}

.page-app .admin-user-cell__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}

.page-app .admin-user-role-text {
  font-size: 0.9rem;
  color: var(--text-primary, #e6edf3);
}

.page-app .admin-user-score-text {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #e6edf3);
  min-width: 2.5rem;
}

.page-app .admin-user-cell .btn-sm {
  white-space: nowrap;
}

.page-app .admin-cat-upload-cell {
  vertical-align: top;
  min-width: 11rem;
}

.page-app .ctf-file-upload {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  max-width: 14rem;
}

.page-app .ctf-file-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-app .ctf-file-upload__btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.page-app .ctf-file-upload__btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.page-app .ctf-file-upload__status {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, #8b949e);
  word-break: break-word;
}

@media (max-width: 768px) {
  .page-app .ctf-flag-row {
    flex-direction: column;
  }
}
