@font-face {
  font-family: 'Badaboom BB';
  src: url('../assets/fonts/BADABB__.TTF') format('truetype');
  font-display: swap;
}

:root {
  --bg-dark: #1a0f0a;
  --bg-card: #241410;
  --bg-deep: #0f0805;
  --chakra-orange: #FFA726;
  --chakra-orange-glow: rgba(255, 167, 38, 0.5);
  --chakra-blue: #4FC3F7;
  --chakra-red: #FF6B35;
  --online-green: #4ade80;
  --offline-red: #ef4444;
  --glass-dark: rgba(36, 20, 16, 0.6);
  --glass-light: rgba(255, 200, 150, 0.08);
  --glass-border: rgba(255, 167, 38, 0.12);
  --glass-border-strong: rgba(255, 167, 38, 0.25);
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --container-max: 1200px;
  --ease-premium: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-sine: cubic-bezier(0.37, 0, 0.63, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 700ms;
  --font-main: 'Exo 2', system-ui, sans-serif;
  --font-light: 'Exo 2', system-ui, sans-serif;
  --font-display: 'Orbitron', monospace, sans-serif;
  --font-title: 'Cinzel', serif;
  --font-naruto: 'Orbitron', sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  font-weight: var(--font-weight-regular);
  background: var(--bg-dark);
  color: #fff;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

p, span, a, button {
  font-family: var(--font-main);
  font-weight: var(--font-weight-regular);
}

body {
  background-image: url('../assets/images/Background.png');
  background-size: cover;
  background-position: center;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255, 167, 38, 0.35) 0%,
    rgba(255, 140, 50, 0.25) 30%,
    rgba(255, 107, 53, 0.15) 60%,
    transparent 80%
  );
  z-index: -2;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(43, 25, 15, 0.92) 0%,
    rgba(25, 15, 10, 0.88) 40%,
    rgba(15, 8, 5, 0.92) 100%
  );
  z-index: -1;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 1366px) {
  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }
}

.top-nav {
  position: fixed;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 100;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(180deg, rgba(255, 167, 38, 0.2), rgba(255, 140, 50, 0.15));
  border: 2px solid rgba(255, 167, 38, 0.5);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: all var(--duration-normal) var(--ease-premium);
  text-decoration: none;
  color: #fff;
  box-shadow:
    0 0 20px rgba(255, 167, 38, 0.3),
    inset 0 1px 0 rgba(255, 200, 100, 0.1);
}

.nav-link:hover {
  background: linear-gradient(180deg, rgba(255, 167, 38, 0.35), rgba(255, 140, 50, 0.25));
  border-color: rgba(255, 200, 100, 0.9);
  box-shadow:
    0 0 50px rgba(255, 167, 38, 0.5),
    inset 0 1px 0 rgba(255, 220, 150, 0.2);
  transform: translateY(-3px);
}

.nav-link:focus-visible {
  outline: 2px solid rgba(255, 200, 100, 0.8);
  outline-offset: 2px;
}

.nav-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
}

.nav-site .nav-icon,
.nav-boutique .nav-icon {
  fill: rgba(255, 200, 100, 0.95);
  transition: all var(--duration-fast) var(--ease-premium);
}

.nav-discord .nav-icon {
  fill: rgba(255, 255, 255, 0.95);
  transition: all var(--duration-fast) var(--ease-premium);
}

.nav-link:hover .nav-site .nav-icon,
.nav-link:hover .nav-boutique .nav-icon {
  fill: rgba(255, 230, 160, 1);
  filter: drop-shadow(0 0 12px rgba(255, 167, 38, 0.8));
}

.nav-link:hover .nav-discord .nav-icon {
  fill: rgba(255, 255, 255, 1);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

@media (max-width: 1024px) {
  .top-nav {
    right: 20px;
  }
  .nav-link {
    width: 56px;
    height: 56px;
  }
  .nav-icon {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    position: absolute;
    top: var(--space-md);
    right: var(--space-sm);
    transform: none;
    flex-direction: row;
    gap: var(--space-xs);
  }
  .nav-link {
    width: 48px;
    height: 48px;
  }
  .nav-icon {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    right: var(--space-sm);
    gap: var(--space-xs);
  }
  .nav-link {
    width: 40px;
    height: 40px;
  }
}

.header-section {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md);
  flex-shrink: 0;
}

.logo-wrapper {
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 0 40px rgba(255, 167, 38, 0.3));
}

.main-logo {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (min-width: 1920px) {
  .main-logo { width: 220px; }
}

@media (max-width: 1366px) {
  .main-logo { width: 160px; }
}

@media (max-width: 768px) {
  .main-logo { width: 120px; }
}

.title-serveurs {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 var(--space-xs);
  background: linear-gradient(180deg, #fff 0%, #FFA726 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 167, 38, 0.5));
}

@media (min-width: 1920px) {
  .title-serveurs { font-size: 3rem; }
}

@media (max-width: 1366px) {
  .title-serveurs { font-size: 2rem; }
}

@media (max-width: 768px) {
  .title-serveurs { font-size: 1.5rem; }
}

.status-global {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-lg);
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 200, 100, 0.9);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 200, 100, 0.1);
  text-shadow: 0 0 20px rgba(255, 167, 38, 0.4);
}

.status-indicators {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot--online {
  background: #FFA726;
  box-shadow: 0 0 10px #FFA726;
}

.status-dot--offline {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.status-dot--online-green {
  width: 12px;
  height: 12px;
  background: #4ade80;
  box-shadow: 0 0 15px #4ade80;
  margin-right: 10px;
  border-radius: 50%;
}

.status-dot--offline-red {
  width: 12px;
  height: 12px;
  background: #ef4444;
  box-shadow: 0 0 15px #ef4444;
  margin-right: 10px;
  border-radius: 50%;
}

.servers-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) 0;
}

.server-cards {
  display: flex;
  gap: 80px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .server-cards {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
  }
}

.server-card,
.server-card--online,
.server-card--offline {
  display: none;
}

.server-cards-wrapper {
  position: relative;
  display: inline-block;
}

.server-render-link {
  position: relative;
  display: block;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-premium);
  will-change: transform;
}

.server-render {
  width: 500px;
  height: auto;
  display: block;
  transition: all var(--duration-normal) var(--ease-premium);
  will-change: filter, transform;
}

.server-render--offline {
  width: 500px;
}

@media (max-width: 1366px) {
  .server-render,
  .server-render--offline {
    width: 420px;
  }
}

@media (max-width: 768px) {
  .server-render,
  .server-render--offline {
    width: 340px;
  }
}

.server-status-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 10;
}

.server-render-link--online .server-status-indicator--online {
  background: #4ade80;
  box-shadow: 0 0 25px #4ade80;
}

.server-render-link--online .server-render {
  filter: drop-shadow(0 0 30px rgba(255, 50, 50, 0.3));
}

.server-render-link--online:hover .server-render {
  filter: drop-shadow(0 0 60px rgba(255, 50, 50, 0.6))
          drop-shadow(0 0 100px rgba(255, 50, 50, 0.4));
  transform: scale(1.03);
}

.server-render-link--offline .server-status-indicator--offline {
  background: #ef4444;
  box-shadow: 0 0 25px #ef4444;
}

.server-render--offline {
  opacity: 0.5;
  filter: grayscale(0.3) drop-shadow(0 0 20px rgba(74, 222, 128, 0.2));
}

.server-render-link--offline {
  cursor: not-allowed;
}

.server-render-link--offline:hover .server-render {
  filter: drop-shadow(0 0 40px rgba(74, 222, 128, 0.4))
          drop-shadow(0 0 70px rgba(74, 222, 128, 0.2));
  transform: scale(1.02);
}

.server-info {
  position: absolute;
  bottom: 85%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  z-index: 10;
  width: 100%;
  margin-bottom: 0;
  pointer-events: none;
  will-change: transform;
}

.server-render-link--online:hover .server-info {
  transform: translateX(-50%) scale(1.03);
}

.server-render-link--offline:hover .server-info {
  transform: translateX(-50%) scale(1.02);
}

.server-cards-wrapper:nth-child(2) .server-info {
  bottom: 88%;
}

.server-name--naruto {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #FFA726;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(255, 167, 38, 1),
    0 0 40px rgba(255, 167, 38, 0.9),
    0 0 80px rgba(255, 167, 38, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
  line-height: 1.2;
}

.server-name--dev {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #FFA726;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(255, 167, 38, 1),
    0 0 40px rgba(255, 167, 38, 0.9),
    0 0 80px rgba(255, 167, 38, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
  line-height: 1.2;
  transform: translateY(3px);
}

.player-count--online,
.player-count--dev {
  background: rgba(10, 5, 2, 0.95);
  border: 2px solid rgba(255, 167, 38, 0.6);
  box-shadow:
    0 4px 30px rgba(255, 167, 38, 0.4),
    inset 0 1px 0 rgba(255, 167, 38, 0.3);
  padding: 10px 32px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.player-count--online .count-value,
.player-count--dev .count-value {
  color: #FFA726;
  font-size: 1.5rem;
  font-weight: 900;
  text-shadow: 0 0 30px rgba(255, 167, 38, 1);
}

.player-count--online .count-max,
.player-count--dev .count-max {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.status-label {
  font-family: var(--font-light);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
}

.server-name {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  margin: var(--space-lg) 0 var(--space-sm);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 200, 100, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 30px rgba(255, 167, 38, 0.4);
  filter: drop-shadow(0 0 8px rgba(255, 167, 38, 0.3));
}

.player-count {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-lg);
  background: rgba(36, 20, 16, 0.85);
  border: 1px solid rgba(255, 167, 38, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-md);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 200, 100, 0.1);
}

.count-value {
  color: var(--chakra-orange);
  text-shadow: 0 0 20px rgba(255, 167, 38, 0.4);
}

.count-max {
  color: rgba(255, 255, 255, 0.5);
}

.player-count--pain {
  background: rgba(40, 10, 10, 0.9);
  border: 1px solid rgba(255, 50, 50, 0.3);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 50, 50, 0.15);
}

.player-count--pain .count-value {
  color: #ff6b6b;
  text-shadow: 0 0 25px rgba(255, 50, 50, 0.5);
}

.card-content {
  padding-bottom: var(--space-lg);
}

.site-footer {
  padding: var(--space-sm) 0;
  text-align: center;
  flex-shrink: 0;
}

.copyright {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--chakra-orange);
  outline-offset: 2px;
}
