/* Call of Duty inspired styling */
:root {
  --cod-primary: #ff3b3b;
  --cod-secondary: #12080b;
  --cod-accent: #5a2a33;
  --cod-light: #c9c9c9;
  --cod-muted: #c9c9c9;
  --cod-gradient: linear-gradient(
    135deg,
    rgba(23, 3, 7, 0.96),
    rgba(85, 16, 24, 0.9)
  );
  --cod-bg-texture: url("https://www.transparenttextures.com/patterns/asfalt-dark.png");
  --cod-font: "Oxanium", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

html {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

/* Loading Screen */
.cod-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cod-gradient), var(--cod-bg-texture);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.cod-loading-screen.cod-loaded {
  opacity: 0;
  visibility: hidden;
}

.cod-loader-content {
  text-align: center;
}

.cod-loader-logo {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 6px;
  margin-bottom: 2rem;
}

.cod-loader-logo .cod-brand-accent {
  color: var(--cod-primary);
}

.cod-loader-logo .cod-loader-text {
  color: var(--cod-light);
  margin-left: 0.5rem;
}

.cod-loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 59, 59, 0.15);
  border-top: 4px solid var(--cod-primary);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: cod-spin 1s linear infinite;
}

@keyframes cod-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cod-loader-tagline {
  color: var(--cod-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
  font-weight: 600;
}

body.cod-body {
  font-family: var(--cod-font);
  background: var(--cod-gradient), var(--cod-bg-texture);
  background-attachment: fixed;
  color: var(--cod-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cod-body,
.cod-body p,
.cod-body span,
.cod-body li,
.cod-body a,
.cod-body h1,
.cod-body h2,
.cod-body h3,
.cod-body h4,
.cod-body h5,
.cod-body h6 {
  color: #c9c9c9;
}

.cod-body .text-white,
.cod-body .text-white-50,
.cod-body .text-muted {
  color: #c9c9c9 !important;
}

.cod-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 59, 59, 0.1);
}

.cod-navbar {
  background: transparent;
}

.cod-navbar .navbar-brand {
  letter-spacing: 3px;
  transition: transform 0.3s ease;
}

.cod-navbar .navbar-brand:hover {
  transform: translateY(-2px);
}

.cod-brand-accent {
  color: var(--cod-primary);
}

.cod-navbar .nav-link {
  color: var(--cod-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  transition: color 0.2s ease;
}

.cod-navbar .nav-link.active,
.cod-navbar .nav-link:hover {
  color: var(--cod-light);
}

.cod-navbar .nav-link::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: var(--cod-primary);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.cod-navbar .nav-link.active::after,
.cod-navbar .nav-link:hover::after {
  transform: scaleX(1);
}

.cod-language-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cod-language-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.15rem 0.65rem;
  border: 1px solid rgba(255, 59, 59, 0.35);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--cod-primary);
  background: rgba(255, 59, 59, 0.08);
  text-align: center;
}

.cod-language-menu {
  background: rgba(15, 10, 12, 0.95);
  border: 1px solid rgba(255, 59, 59, 0.25);
  border-radius: 0.75rem;
  padding: 0.35rem;
  min-width: 170px;
}

.cod-language-menu .dropdown-item {
  color: var(--cod-light);
  font-weight: 600;
  border-radius: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.55rem 0.85rem;
}

.cod-language-menu .dropdown-item.active,
.cod-language-menu .dropdown-item:active,
.cod-language-menu .dropdown-item:hover {
  background: rgba(255, 59, 59, 0.18);
  color: var(--cod-light);
}

.cod-main {
  flex: 1;
  padding: 4rem 0;
}

.cod-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: rgba(8, 15, 20, 0.8);
  border: 1px solid rgba(255, 59, 59, 0.25);
  box-shadow: 0 30px 80px rgba(61, 10, 18, 0.45);
}

.cod-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1580126681132-3b4f2eabf2ae?auto=format&fit=crop&w=1600&q=80")
    center/cover;
  mix-blend-mode: screen;
  opacity: 0.35;
  filter: grayscale(60%);
}

.cod-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6),
    rgba(90, 12, 24, 0.4)
  );
}

.cod-hero > * {
  position: relative;
  z-index: 2;
}

.cod-tagline {
  text-transform: uppercase;
  letter-spacing: 8px;
  color: var(--cod-primary);
  font-weight: 600;
}

.cod-btn-primary {
  background: var(--cod-primary);
  color: #c9c9c9;
  border: none;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 999px;
  padding: 0.85rem 2.8rem;
  box-shadow: 0 10px 25px rgba(255, 59, 59, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cod-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(255, 59, 59, 0.3);
  color: #c9c9c9;
}

/* Filter bar */
.cod-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.cod-filter-btn {
  background: rgba(12, 17, 22, 0.85);
  border: 1px solid rgba(255, 59, 59, 0.22);
  color: var(--cod-light);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.cod-filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 59, 59, 0.35);
  box-shadow: 0 10px 22px rgba(70, 10, 18, 0.35);
}

.cod-filter-btn.active {
  background: rgba(255, 59, 59, 0.15);
  border-color: rgba(255, 59, 59, 0.5);
  box-shadow: 0 10px 24px rgba(70, 10, 18, 0.45);
}

.cod-section-title {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 1.2rem;
  color: var(--cod-muted);
}

.cod-section-heading {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
}

.cod-card {
  background: rgba(12, 17, 22, 0.85);
  border: 1px solid rgba(255, 59, 59, 0.1);
  border-radius: 1.25rem;
  padding: 2.5rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.cod-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 59, 59, 0.05);
  border-radius: 1.25rem;
  pointer-events: none;
}

.cod-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 59, 59, 0.35);
  box-shadow: 0 25px 55px rgba(70, 10, 18, 0.5);
}

.cod-card h3 {
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cod-divider {
  width: 80px;
  height: 3px;
  background: var(--cod-primary);
  border-radius: 999px;
  margin: 1.5rem 0;
}

.cod-footer {
  background: rgba(5, 7, 9, 0.9);
  border-top: 1px solid rgba(255, 59, 59, 0.18);
  padding: 2rem 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cod-muted);
}

.team-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Centered + bigger cards for videos page */
.videos-grid {
  justify-items: center;
}
.videos-grid .cod-card {
  max-width: 440px; /* larger cards */
  width: 100%;
  padding: 2rem;
}
/* TikTok thumbnail (reuse styling; allow slight accent) */
.tiktok-thumb {
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.team-rank-badge.watch-now-badge i.fa-tiktok {
  color: #fff;
}

/* Video thumbnail styling to reuse card layout */
.video-thumb {
  width: 100%;
  border-radius: 0.75rem;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid rgba(255, 59, 59, 0.2);
}

/* Media empty state box */
.media-empty-box {
  max-width: 560px;
  margin: 1.25rem auto 1.75rem;
  padding: 2.2rem 2rem 1.9rem;
  text-align: center;
  background: linear-gradient(
      135deg,
      rgba(23, 3, 7, 0.85),
      rgba(85, 16, 24, 0.65)
    ),
    var(--cod-bg-texture);
  border: 1px solid rgba(255, 59, 59, 0.18);
  border-radius: 1.25rem;
  position: relative;
  box-shadow: 0 22px 55px rgba(70, 10, 18, 0.45);
  backdrop-filter: blur(6px);
}
.media-empty-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 59, 59, 0.08);
  border-radius: 1.25rem;
  pointer-events: none;
}
.media-empty-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.65rem;
  color: #ffc107; /* warning accent */
  filter: drop-shadow(0 6px 18px rgba(255, 193, 7, 0.25));
}
.media-empty-text {
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cod-muted);
  opacity: 0.9;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Global Alert (top-centered) */
.cod-alert-container {
  position: fixed;
  top: 76px; /* below sticky header */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  width: min(920px, 92vw);
  pointer-events: none; /* clicks pass through except on alert */
}

.cod-alert {
  display: none;
  pointer-events: auto;
  background: var(--cod-gradient), var(--cod-bg-texture);
  border: 1px solid rgba(255, 59, 59, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 18px 48px rgba(61, 10, 18, 0.45);
  color: var(--cod-light);
  backdrop-filter: blur(6px);
  animation: cod-alert-slide 200ms ease-out;
}

.cod-alert.show {
  display: block;
}

.cod-alert .cod-alert-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.cod-alert .cod-alert-msg {
  margin: 0;
  opacity: 0.9;
}

.cod-alert.success {
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 18px 48px rgba(14, 70, 36, 0.45);
}
.cod-alert.error {
  border-color: rgba(255, 59, 59, 0.6);
  box-shadow: 0 18px 48px rgba(70, 10, 18, 0.6);
}

.cod-alert .cod-alert-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cod-light);
  opacity: 0.8;
  transition: opacity 0.15s ease;
  padding: 0.25rem;
  border-radius: 0.5rem;
}
.cod-alert .cod-alert-close:hover {
  opacity: 1;
}

@keyframes cod-alert-slide {
  from {
    transform: translateY(-6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Cookie banner */
.cod-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1050;
  width: min(980px, 94vw);
  background: var(--cod-gradient), var(--cod-bg-texture);
  border: 1px solid rgba(255, 59, 59, 0.25);
  border-radius: 1rem;
  padding: 0.9rem 1.2rem;
  color: var(--cod-light);
  box-shadow: 0 18px 48px rgba(70, 10, 18, 0.45);
  backdrop-filter: blur(6px);
}
.cod-cookie-banner .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.cod-cookie-banner .btn-accept {
  background: var(--cod-primary);
  color: #fff;
  border: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 1px;
}
.cod-cookie-banner .btn-manage {
  background: transparent;
  border: 1px solid rgba(255, 59, 59, 0.35);
  color: var(--cod-light);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 1px;
}

@media (min-width: 576px) {
  /* sm */
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  /* Landscape phones/tablets: slightly reduce height for better fit */
  @media (max-width: 768px) and (orientation: landscape) {
    .discord-widget {
      height: min(55vh, 420px);
    }
  }

  /* Fallback overlay if widget fails to load */
  .discord-widget-fallback {
    position: absolute;
    inset: 0;
    display: none; /* toggled via .is-error */
    place-items: center;
    border-radius: 1rem;
    background: linear-gradient(
      135deg,
      rgba(23, 3, 7, 0.9),
      rgba(85, 16, 24, 0.75)
    );
    border: 1px dashed rgba(255, 59, 59, 0.35);
    color: var(--cod-light);
    text-align: center;
    padding: 1rem;
  }
  .discord-widget-fallback .fallback-inner {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
  }
  .discord-widget-fallback .fallback-text {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    opacity: 0.9;
  }
  .discord-widget-wrap.is-error .discord-widget-fallback {
    display: grid;
  }
  /* md */
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  /* lg */
  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  /* xl */
  .team-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.team-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center; /* hard-center all children horizontally */
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* Override columns specifically for videos grid so cards can be larger and centered */
.team-grid.videos-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  justify-items: center;
}
@media (min-width: 576px) {
  .team-grid.videos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .team-grid.videos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Also ensure larger card width wins over generic .team-card limit */
.team-grid.videos-grid .cod-card {
  max-width: 440px;
}

/* Center the name + badges stack as a single unit */
.team-card .team-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0.25rem auto 0.2rem;
}

.team-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid rgba(255, 59, 59, 0.4);
  box-shadow: 0 15px 30px rgba(255, 59, 59, 0.18);
  margin-bottom: 1rem;
  object-fit: cover;
}

/* Navbar maintenance indicator spacing and subtle emphasis */
.nav-maint-indicator {
  letter-spacing: 0.3px;
  font-weight: 600;
}

/* Ensure centered indicator sits above background and doesn't shift layout */
.cod-navbar .nav-maint-center {
  z-index: 2;
}

/* Force dark text/icon on yellow maintenance badge */
.cod-navbar .nav-maint-indicator.bg-warning {
  /* Force black text on Bootstrap badge component */
  --bs-badge-color: #000;
  color: #000 !important;
}
.cod-navbar .nav-maint-indicator.bg-warning i {
  color: #000 !important;
}
/* Inherit black for any direct children (like the label span) */
.cod-navbar .nav-maint-indicator.bg-warning > * {
  color: #000 !important;
}

/* Make the centered badge link look like a badge (no underline, inherit colors) */
.cod-navbar .nav-maint-link {
  text-decoration: none !important;
  color: inherit !important;
  display: inline-block;
}

/* Subtle center glow behind CTA on maintenance page */
.cod-cta-glow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cod-cta-glow::before {
  content: "";
  position: absolute;
  top: 8px;
  width: 320px;
  height: 70px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 59, 59, 0.35) 0%,
    rgba(255, 59, 59, 0.18) 55%,
    rgba(255, 59, 59, 0) 75%
  );
  filter: blur(18px);
  opacity: 0.8;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
}
.cod-cta-glow > * {
  position: relative;
  z-index: 1;
}
.cod-cta-button {
  padding-left: 2.25rem;
  padding-right: 2.25rem;
}

.team-group + .team-group {
  margin-top: 2rem;
}

.team-group {
  text-align: center;
}

.team-group .team-grid {
  /* Center rows and wrap nicely */
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  justify-content: center;
  align-items: flex-start;
}

.team-group .team-grid .team-card {
  /* Keep consistent card width for neat rows */
  flex: 0 1 280px;
}

.cod-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 0.1rem 0.6rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 59, 59, 0.35);
  color: var(--cod-light);
  background: rgba(255, 59, 59, 0.12);
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 0.8rem;
}

/* Team rank badge */
.team-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* center icon/text inside pill */
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 59, 59, 0.28);
  background: linear-gradient(
    180deg,
    rgba(255, 59, 59, 0.16),
    rgba(255, 59, 59, 0.1)
  );
  color: var(--cod-light);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(70, 10, 18, 0.25);
}

.team-rank-badge:hover {
  box-shadow: 0 8px 18px rgba(70, 10, 18, 0.35);
  transform: translateY(-1px);
}

/* Watch-now badge special hover/focus glow */
.team-rank-badge.watch-now-badge {
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease;
}
.team-rank-badge.watch-now-badge:hover,
.team-rank-badge.watch-now-badge:focus,
.team-rank-badge.watch-now-badge:active {
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.35),
    0 10px 28px rgba(70, 10, 18, 0.55);
  border-color: rgba(255, 59, 59, 0.55);
  transform: translateY(-2px);
}

.team-rank-badge i {
  color: inherit;
  font-size: 0.95em;
  vertical-align: -0.05em;
}

/* Icon-only platform badges: remove right margin added by .me-1 */
.team-rank-badge i:only-child {
  margin-right: 0 !important;
}

/* Rank preview in admin forms: a touch larger for clarity */
.rank-preview-badge {
  margin-top: 0.5rem;
  padding: 0.35rem 0.8rem;
  font-size: 1rem;
}

/* Container for additional ranks under primary */
.team-subranks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

/* Sub-rank variant: slightly smaller and softer */
.team-rank-badge.sub {
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  border-color: rgba(255, 59, 59, 0.22);
  box-shadow: 0 2px 8px rgba(70, 10, 18, 0.2);
}

/* Founder badge (smaller golden pill) */
.team-founder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  margin-bottom: 0.5rem; /* extra breathing room above avatar */
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.55);
  background: linear-gradient(
    180deg,
    rgba(255, 215, 0, 0.2),
    rgba(255, 215, 0, 0.12)
  );
  color: var(--cod-light);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(115, 90, 10, 0.28);
}

/* Ensure name is always centered and tighten spacing above/below */
.team-card h3 {
  text-align: center;
  /* Multiline clamp to 2 lines with ellipsis */
  display: -webkit-box;
  line-clamp: 2; /* standard (where supported) */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center; /* center as flex item */
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 1.5px; /* slightly reduced vs generic .cod-card h3 for better optical centering */
  margin-bottom: 0.25rem;
  max-width: 100%;
  white-space: normal; /* ensure multi-line */
  overflow-wrap: anywhere; /* break long unspaced names */
  word-break: break-word; /* fallback for older engines */
}
/* Override Bootstrap utility margin (mt-3) inside team cards to reduce top gap */
.team-card h3.mt-3 {
  margin-top: 0.6rem !important;
}
/* Reduce gap specifically between name and the primary badge (direct child) */
.team-card > .team-rank-badge {
  margin-top: 0.2rem;
}

/* Per-rank subtle accents */
.team-rank-badge.rank-clan_leaders {
  border-color: rgba(255, 215, 0, 0.6);
  background: linear-gradient(
    180deg,
    rgba(255, 215, 0, 0.18),
    rgba(255, 215, 0, 0.12)
  );
}
.team-rank-badge.rank-co_leaders {
  border-color: rgba(173, 216, 230, 0.55);
  background: linear-gradient(
    180deg,
    rgba(173, 216, 230, 0.18),
    rgba(173, 216, 230, 0.12)
  );
}
.team-rank-badge.rank-psn {
  border-color: rgba(80, 120, 255, 0.5);
  background: linear-gradient(
    180deg,
    rgba(80, 120, 255, 0.18),
    rgba(80, 120, 255, 0.12)
  );
}
.team-rank-badge.rank-xbox {
  border-color: rgba(80, 200, 120, 0.5);
  background: linear-gradient(
    180deg,
    rgba(80, 200, 120, 0.18),
    rgba(80, 200, 120, 0.12)
  );
}
.team-rank-badge.rank-pc {
  border-color: rgba(200, 200, 200, 0.5);
  background: linear-gradient(
    180deg,
    rgba(200, 200, 200, 0.18),
    rgba(200, 200, 200, 0.12)
  );
}
.team-rank-badge.rank-content {
  border-color: rgba(255, 105, 180, 0.5);
  background: linear-gradient(
    180deg,
    rgba(255, 105, 180, 0.18),
    rgba(255, 105, 180, 0.12)
  );
}
.team-rank-badge.rank-dev {
  border-color: rgba(0, 200, 200, 0.5);
  background: linear-gradient(
    180deg,
    rgba(0, 200, 200, 0.18),
    rgba(0, 200, 200, 0.12)
  );
}
.team-rank-badge.rank-staff {
  /* Discord Blurple */
  border-color: rgba(88, 101, 242, 0.55);
  background: linear-gradient(
    180deg,
    rgba(88, 101, 242, 0.2),
    rgba(88, 101, 242, 0.12)
  );
}
.team-rank-badge.rank-team {
  border-color: rgba(255, 59, 59, 0.4);
  background: linear-gradient(
    180deg,
    rgba(255, 59, 59, 0.18),
    rgba(255, 59, 59, 0.12)
  );
}

/* (removed) single-column stacked variant; using default responsive grid per group */

.cod-contact-form .form-control {
  background: rgba(12, 17, 22, 0.85);
  border: 1px solid rgba(255, 59, 59, 0.22);
  color: var(--cod-light);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
}

.cod-contact-form .form-control:focus {
  border-color: var(--cod-primary);
  box-shadow: 0 0 0 0.25rem rgba(255, 59, 59, 0.18);
}

.cod-contact-form label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: var(--cod-muted);
}

/* Themed checkbox (Founder, etc.) */
.cod-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cod-check .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 6px;
  background-color: rgba(12, 17, 22, 0.85);
  border: 1.5px solid rgba(255, 59, 59, 0.35);
  box-shadow: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease,
    background-color 0.15s ease;
}
.cod-check .form-check-input:focus {
  border-color: var(--cod-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 59, 59, 0.25);
}
.cod-check .form-check-input:checked {
  background-color: var(--cod-primary);
  border-color: var(--cod-primary);
  box-shadow: 0 6px 16px rgba(255, 59, 59, 0.25);
}
.cod-check .form-check-label {
  color: var(--cod-light);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: none;
}
.cod-check .form-check-label i {
  color: #ffd700; /* golden accent to match founder badge */
}

/* Themed toggle switch (uses Bootstrap .form-switch structure) */
.cod-switch.form-switch {
  padding-left: 3.25rem; /* align label nicely */
}
.cod-switch .form-check-input {
  width: 2.9rem;
  height: 1.4rem;
  background-color: rgba(12, 17, 22, 0.85);
  border: 1.5px solid rgba(255, 59, 59, 0.35);
  cursor: pointer;
  box-shadow: inset 0 0 0 0.25rem rgba(0, 0, 0, 0.2);
}
.cod-switch .form-check-input:focus {
  border-color: var(--cod-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 59, 59, 0.25);
}
.cod-switch .form-check-input:checked {
  background-color: var(--cod-primary);
  border-color: var(--cod-primary);
}
.cod-switch .form-check-label {
  color: var(--cod-light);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.cod-switch .form-check-label i {
  color: #ffd700;
}

/* Compact variant for small screens */
@media (max-width: 576px) {
  .cod-switch.form-switch {
    padding-left: 2.6rem;
  }
  .cod-switch .form-check-input {
    width: 2.2rem;
    height: 1.1rem;
  }
  .cod-switch .form-check-label {
    font-size: 0.95rem;
  }
}

/* COD-styled Banner */
.cod-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 59, 59, 0.25);
  background: rgba(12, 17, 22, 0.85);
  color: var(--cod-light);
  position: relative;
  overflow: hidden;
}

.cod-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--cod-primary);
  box-shadow: 0 0 20px rgba(255, 59, 59, 0.4);
}

.cod-banner-warning {
  border-color: rgba(255, 59, 59, 0.35);
  box-shadow: 0 12px 28px rgba(70, 10, 18, 0.35);
}

.cod-banner-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: var(--cod-primary);
  filter: drop-shadow(0 0 6px rgba(255, 59, 59, 0.35));
}

.cod-banner-text {
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cod-highlight-box {
  background: rgba(255, 59, 59, 0.08);
  border: 1px solid rgba(255, 59, 59, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
}

/* Discord widget (iframe) styling to match COD theme */
.discord-widget-wrap {
  position: relative;
  border-radius: 1rem;
}
.discord-widget {
  display: block;
  width: 100%;
  /* Taller on desktop but still viewport-aware */
  height: min(70vh, 600px);
  border: 1px solid rgba(255, 59, 59, 0.22);
  border-radius: 1rem;
  background: rgba(12, 17, 22, 0.85);
  box-shadow: 0 18px 48px rgba(70, 10, 18, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.discord-widget:hover,
.discord-widget:focus {
  transform: translateY(-2px);
  border-color: rgba(255, 59, 59, 0.35);
  box-shadow: 0 26px 60px rgba(70, 10, 18, 0.45);
}
.discord-widget-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  border: 1px solid rgba(255, 59, 59, 0.08);
  pointer-events: none;
}

/* Loading skeleton overlay while widget initializes */
.discord-widget-skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: linear-gradient(
    135deg,
    rgba(23, 3, 7, 0.8),
    rgba(85, 16, 24, 0.65)
  );
  color: var(--cod-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  overflow: hidden;
}
.discord-widget-skeleton::before {
  content: "";
  position: absolute;
  width: 60%;
  height: 120%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(20deg) translateX(-150%);
  animation: codDiscordShimmer 1.6s ease-in-out infinite;
}
@keyframes codDiscordShimmer {
  0% {
    transform: rotate(20deg) translateX(-150%);
  }
  100% {
    transform: rotate(20deg) translateX(150%);
  }
}
.discord-widget-wrap.is-loaded .discord-widget-skeleton {
  display: none;
}

/* Responsive height tweaks */
@media (max-width: 576px) {
  .discord-widget {
    height: 520px;
  }
}
@media (max-width: 400px) {
  .discord-widget {
    height: 440px;
  }
}

/* Status rows (e.g., Bot status items) */
.cod-status-item {
  background: rgba(12, 17, 22, 0.85);
  border: 1px solid rgba(255, 59, 59, 0.22);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 20px rgba(70, 10, 18, 0.28);
}
.cod-status-name {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-right: 0.75rem;
}
.cod-status-meta {
  color: #c9c9c9;
  opacity: 0.85;
}

/* Tiny pulsing status dot */
.cod-status-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cod-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}
.cod-status-dot.is-checking {
  background: #f1c40f;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.6);
  animation: codDotPulse 1.6s ease-in-out infinite;
}
.cod-status-dot.is-online {
  background: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.55);
  animation: codDotPulse 2s ease-in-out infinite;
}
.cod-status-dot.is-offline {
  background: var(--cod-primary);
  box-shadow: 0 0 10px rgba(255, 59, 59, 0.55);
  animation: codDotPulse 1.4s ease-in-out infinite;
}
.cod-status-dot.is-disabled {
  background: #7a7a7a;
  box-shadow: 0 0 8px rgba(140, 140, 140, 0.4);
}

@keyframes codDotPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* Responsive height tweaks */
@media (max-width: 576px) {
  .discord-widget {
    height: min(65vh, 520px);
  }
  .discord-widget-skeleton {
    font-size: 0.9rem;
    letter-spacing: 0.8px;
  }
}
@media (max-width: 400px) {
  .discord-widget {
    height: min(60vh, 440px);
  }
  .discord-widget-skeleton {
    font-size: 0.85rem;
  }
}

/* Themed status pills (for Online/Offline/Disabled) */
.cod-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}
.cod-pill-success {
  background: linear-gradient(
    180deg,
    rgba(46, 204, 113, 0.18),
    rgba(46, 204, 113, 0.12)
  );
  border-color: rgba(46, 204, 113, 0.45);
  color: var(--cod-light);
  box-shadow: 0 4px 14px rgba(14, 70, 36, 0.28);
}
.cod-pill-danger {
  background: linear-gradient(
    180deg,
    rgba(255, 59, 59, 0.18),
    rgba(255, 59, 59, 0.12)
  );
  border-color: rgba(255, 59, 59, 0.45);
  color: var(--cod-light);
  box-shadow: 0 4px 14px rgba(70, 10, 18, 0.28);
}
.cod-pill-secondary {
  background: rgba(12, 17, 22, 0.85);
  border-color: rgba(255, 59, 59, 0.2);
  color: var(--cod-light);
  box-shadow: 0 2px 8px rgba(70, 10, 18, 0.2);
}

/* Hero logo block (replaces highlight box on home) */
.cod-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cod-hero-logo-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  border-radius: 50%;
}

.cod-hero-logo-glow {
  box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.18),
    0 0 40px 20px rgba(255, 59, 59, 0.32),
    0 0 120px 40px rgba(255, 59, 59, 0.18);
  background: transparent;
}

/* Enhanced framed circular logo */
.cod-hero-logo-frame {
  background: rgba(12, 17, 22, 0.85);
  border: 1px solid rgba(255, 59, 59, 0.2);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(70, 10, 18, 0.35),
    inset 0 0 0 1px rgba(255, 59, 59, 0.05);
}

.cod-hero-logo-ring {
  position: relative;
  width: min(80vw, 360px);
  height: min(80vw, 360px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(
    60% 60% at 50% 50%,
    rgba(255, 59, 59, 0.18),
    rgba(12, 17, 22, 0.85)
  );
  box-shadow: inset 0 0 40px rgba(255, 59, 59, 0.15);
}

.cod-hero-logo-ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 59, 59, 0.35),
      transparent 60%
    ),
    radial-gradient(circle at 70% 70%, rgba(255, 59, 59, 0.25), transparent 60%);
  border: 3px solid rgba(255, 59, 59, 0.55);
  filter: drop-shadow(0 10px 25px rgba(255, 59, 59, 0.25));
  pointer-events: none;
}

.cod-hero-logo-ring .cod-hero-logo-img {
  width: 75%;
  max-width: 260px;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(255, 59, 59, 0.25);
}

@keyframes codPulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.25);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 59, 59, 0.05);
  }
}

.cod-hero-logo-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: codPulseGlow 3.2s ease-in-out infinite;
}

.badge-callout {
  background: rgba(255, 59, 59, 0.12);
  color: var(--cod-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Logo variant for the Home highlight badge */
.badge-callout.badge-callout-logo {
  background: rgba(255, 59, 59, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
}

.badge-callout-logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(255, 59, 59, 0.25));
  border-radius: 6px;
}

@media (max-width: 991.98px) {
  .cod-main {
    padding: 3rem 0;
  }

  .cod-hero {
    border-radius: 1rem;
  }

  .cod-section-heading {
    font-size: 2.2rem;
  }
}

/* Admin: place rank preview to the right of the select on lg+ screens */
.rank-inline-lg {
  display: block;
}

@media (min-width: 992px) {
  .rank-inline-lg {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .rank-inline-lg > .form-select {
    max-width: 280px;
  }
  .rank-preview-control {
    justify-content: flex-start;
  }
}
