body {
  font-family: 'Oswald', sans-serif;
}


@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600&display=swap');

/* Сброс стандартных отступов браузера */
*{
margin:0;
padding:0;
box-sizing:border-box;
}

/* Базовый стиль страницы */


/* Чтобы ссылки не были синими */
a{
text-decoration:none;
color:inherit;
}

/* Контейнер для страниц авторизации */
.auth-container{
display:flex;
justify-content:center;
align-items:center;

min-height:calc(100vh - 80px);
}

/* Небольшая плавность для интерфейса */

html {
  background: #050816;
}

/* ===== CUSTOM SCROLLBAR (INVISIBLE STYLE) ===== */

html {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(167, 139, 250, 0.3) transparent;
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent; /* УБИРАЕМ белый фон */
}

::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.25);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.45);
}

html,
body {
  background: #050816;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  background: transparent;
  color: white;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.video-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

#background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) brightness(1.1);
}

.video-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(20,20,40,0.18),
    rgba(0, 0, 0, 0.101)
  );
  z-index: 1;
}

#navbar {
  position: relative;
  z-index: 1000;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#app {
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#player {
  position: relative;
  z-index: 1200;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.boot-loading {
  overflow: hidden;
}

body.boot-loading #navbar,
body.boot-loading #app,
body.boot-loading #player {
  opacity: 0;
  visibility: hidden;
}
@media (max-width: 768px) {
  #background-video {
    filter: blur(5px) brightness(0.45);
  }

  .xp-toast {
    width: min(calc(100vw - 28px), 360px);
    text-align: center;
    padding: 12px 16px;
  }

  .rank-up-box {
    width: min(calc(100vw - 24px), 700px);
    min-height: 0;
    padding: 38px 20px 30px;
    border-radius: 24px;
  }

  .rank-up-medal {
    width: 120px;
    height: 120px;
  }

  .rank-up-transition,
  .rank-up-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  body {
    -webkit-text-size-adjust: 100%;
  }

  .rank-up-box {
    width: min(calc(100vw - 16px), 700px);
    padding: 30px 16px 24px;
    border-radius: 20px;
  }

  .rank-up-burst {
    width: 320px;
    height: 320px;
  }

  .rank-up-medal {
    width: 96px;
    height: 96px;
    margin-bottom: 14px;
  }

  .rank-up-label {
    letter-spacing: 0.18em;
    font-size: 11px;
  }

  .rank-up-gain {
    min-width: 0;
    width: 100%;
    max-width: 220px;
    padding: 10px 14px;
    font-size: 14px;
  }
}

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(10,10,15,0.6);
  backdrop-filter: blur(25px);

  z-index: 99999;
}

/* 🔥 КРАСИВЫЙ СПИННЕР */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(20px);

  z-index: 999999;

  opacity: 1;
  transition: 0.2s;
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;

  border: 4px solid rgba(255,255,255,0.1);
  border-top: 4px solid #ff7ac6;

  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 👇 DISCOVER FULLSCREEN */
/* ТОЛЬКО ДЛЯ DISCOVER */
body.discover-mode {
  overflow: hidden;
}

.xp-toast {
  position: fixed;
  bottom: 118px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9f43, #ff4d9d, #8a2eff);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(255, 77, 157, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: 0.32s ease;
  z-index: 9999;
}

.xp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.rank-up-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.rank-up-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

body.rank-up-active {
  overflow: hidden;
}

.rank-up-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 77, 157, 0.18), transparent 34%),
    rgba(8, 6, 18, 0.88);
  backdrop-filter: blur(12px);
}

.rank-up-box {
  position: relative;
  z-index: 2;
  width: min(700px, calc(100vw - 40px));
  min-height: 420px;
  padding: 54px 36px 42px;
  border-radius: 36px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.1), rgba(20,20,35,0.96) 58%),
    linear-gradient(160deg, rgba(255, 77, 157, 0.08), rgba(138, 46, 255, 0.04));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 30px 90px rgba(0,0,0,0.58),
    0 0 120px rgba(255, 77, 157, 0.22);
  text-align: center;
  overflow: hidden;
  transform: scale(0.84) translateY(22px);
  transition: transform 0.42s ease;
}

.rank-up-overlay.show .rank-up-box {
  transform: scale(1) translateY(0);
}

.rank-up-burst {
  position: absolute;
  inset: 50%;
  width: 540px;
  height: 540px;
  transform: translate(-50%, -50%) scale(0.7);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 77, 157, 0.18), rgba(255, 77, 157, 0.04) 44%, transparent 72%);
  filter: blur(8px);
  opacity: 0;
}

.rank-up-overlay.show .rank-up-burst {
  opacity: 1;
  animation: rankUpBurst 0.9s ease-out;
}

.rank-up-glow {
  position: absolute;
  inset: auto 50% -100px 50%;
  width: 320px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,159,67,0.34), rgba(255,77,157,0.2), transparent 72%);
  filter: blur(20px);
  pointer-events: none;
}

.rank-up-medal {
  width: 156px;
  height: 156px;
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
  filter:
    drop-shadow(0 0 22px rgba(255, 180, 0, 0.45))
    drop-shadow(0 0 42px rgba(255, 77, 157, 0.26));
  animation: rankUpMedalFloat 2.2s ease-in-out infinite;
}

.rank-up-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}

.rank-up-title {
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 800;
  color: #fff;
  line-height: 0.94;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(255,255,255,0.16);
}

.rank-up-transition {
  font-size: 17px;
  font-weight: 700;
  color: rgba(255,255,255,0.76);
  margin-bottom: 18px;
}

.rank-up-gain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,159,67,0.18), rgba(255,77,157,0.24));
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 auto 18px;
  box-shadow: 0 12px 36px rgba(255, 77, 157, 0.16);
}

.rank-up-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  max-width: 420px;
  margin: 0 auto;
}

@keyframes rankUpMedalFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.04);
  }
}

@keyframes rankUpBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}
