:root {
  --nav-height: 72px;
  --header-height: 112px;
  --footer-bg-light: #ffffff;
  --footer-bg-dark: #000000;
  --footer-bg-blue: #0b3d91;
  --footer-icon-light: #0b3d91;
  --footer-icon-dark: #ffffff;
  --footer-icon-blue: #ffffff;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  padding-top: var(--header-height);
  padding-bottom: var(--nav-height);
  background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%);
  font-family: 'Open Sans', sans-serif;
  color: #0b3d91;
}

body.dark-mode {
  background: #000;
  color: #fff;
}

body.theme-blue {
  background: linear-gradient(180deg, #0b3d91 0%, #0a2a66 40%, #021533 100%);
  color: #f0f6ff;
}

body.page-home,
body.page-play {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body.page-home {
  overflow-y: hidden;
}

body.page-play {
  overflow-y: hidden;
}

.site-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.96);
  color: inherit;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1250;
  box-shadow: 0 6px 18px rgba(15, 40, 90, 0.08);
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  box-sizing: border-box;
}

body.dark-mode .site-header {
  background: rgba(0, 0, 0, 0.75);
}

body.theme-blue .site-header {
  background: rgba(2, 21, 51, 0.82);
}

.site-header__profile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.site-header__avatar-container {
  --avatar-ring-color: #27ae60;
  --avatar-progress: 0deg;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(var(--avatar-ring-color) var(--avatar-progress), rgba(11, 61, 145, 0.15) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  order: 1;
  position: relative;
}

.site-header__avatar-container::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(11, 61, 145, 0.12);
  pointer-events: none;
}

.site-header__avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(197, 215, 255, 0.6), rgba(127, 168, 255, 0.55));
  position: relative;
  z-index: 1;
}

.site-header__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.site-header__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: flex-start;
  text-align: left;
}

.site-header__name {
  font-weight: 700;
  font-size: clamp(24px, 5vw, 33px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__level {
  font-size: clamp(18px, 3.8vw, 24px);
  opacity: 0.9;
  white-space: nowrap;
  font-weight: 600;
}

body.dark-mode .site-header__avatar-container {
  background: conic-gradient(var(--avatar-ring-color) var(--avatar-progress), rgba(255, 255, 255, 0.16) 0deg);
}

body.dark-mode .site-header__avatar-ring {
  background: linear-gradient(135deg, rgba(46, 64, 110, 0.85), rgba(81, 115, 186, 0.75));
}

body.theme-blue .site-header__avatar-container {
  background: conic-gradient(var(--avatar-ring-color) var(--avatar-progress), rgba(240, 246, 255, 0.18) 0deg);
}

body.theme-blue .site-header__avatar-ring {
  background: linear-gradient(135deg, rgba(111, 167, 255, 0.9), rgba(66, 130, 255, 0.82));
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  margin-left: auto;
}

.site-header__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: none;
  background: rgba(11, 61, 145, 0.12);
  color: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header__button:hover,
.site-header__button:focus {
  transform: translateY(-1px);
  opacity: 0.9;
}

.site-header__button--logout {
  background: rgba(220, 53, 69, 0.16);
  color: #c62828;
  display: none;
}

body.dark-mode .site-header__button {
  background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .site-header__button--logout {
  color: #ff7b7b;
}

body.theme-blue .site-header__button {
  background: rgba(240, 246, 255, 0.14);
  color: #f0f6ff;
}

body.theme-blue .site-header__button--logout {
  color: #ffd9d9;
}

@media (max-width: 720px) {
  .site-header {
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 16px;
  }

  .site-header__avatar-container {
    order: -1;
    width: 58px;
    height: 58px;
    padding: 3px;
    margin-right: 4px;
  }

  .site-header__actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 92px;
  }
}

body.theme-blue #pt,
body.theme-blue #texto-exibicao,
body.theme-blue #resultado,
body.theme-blue #acertos,
body.theme-blue #nivel-mensagem,
body.theme-blue #timer {
  color: #f0f6ff;
  caret-color: #f0f6ff;
}

body.dark-mode #pt,
body.dark-mode #texto-exibicao,
body.dark-mode #resultado,
body.dark-mode #acertos,
body.dark-mode #nivel-mensagem,
body.dark-mode #timer {
  color: #fff;
  caret-color: #fff;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-footer {
  position: relative;
  width: 100%;
}

#main-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 28px;
  background: var(--footer-bg-light);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1200;
  box-sizing: border-box;
  gap: 12px;
}

body.dark-mode #main-nav {
  background: var(--footer-bg-dark);
}

body.theme-blue #main-nav {
  background: var(--footer-bg-blue);
}

#main-nav .nav-item {
  color: var(--footer-icon-light);
  text-decoration: none;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

body.dark-mode #main-nav .nav-item {
  color: var(--footer-icon-dark);
}

body.theme-blue #main-nav .nav-item {
  color: var(--footer-icon-blue);
}

#main-nav .nav-item span[aria-hidden="true"] {
  display: block;
  line-height: 1;
}

.nav-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

#main-nav .nav-item:hover,
#main-nav .nav-item:focus-visible {
  transform: translateY(-4px);
  background: rgba(11, 61, 145, 0.08);
}

#main-nav .nav-item.active {
  background: rgba(11, 61, 145, 0.12);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode #main-nav .nav-item:hover,
body.dark-mode #main-nav .nav-item:focus-visible,
body.dark-mode #main-nav .nav-item.active {
  background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .nav-item--user-active .nav-item__trigger,
body.dark-mode .nav-item--user.nav-item--open .nav-item__trigger {
  background: rgba(255, 255, 255, 0.18);
}

body.theme-blue #main-nav .nav-item:hover,
body.theme-blue #main-nav .nav-item:focus-visible,
body.theme-blue #main-nav .nav-item.active {
  background: rgba(255, 255, 255, 0.18);
}

body.theme-blue .nav-item--user-active .nav-item__trigger,
body.theme-blue .nav-item--user.nav-item--open .nav-item__trigger {
  background: rgba(255, 255, 255, 0.24);
}

.nav-item--user {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
}

.nav-item__trigger {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.nav-item__trigger:focus {
  outline: none;
}

.nav-item--user .nav-item__menu {
  position: absolute;
  bottom: calc(var(--nav-height) + 12px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  min-width: 160px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.nav-item--user.nav-item--open .nav-item__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-item__menu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11, 61, 145, 0.08);
  color: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-item__menu-link:hover,
.nav-item__menu-link:focus-visible {
  background: rgba(11, 61, 145, 0.14);
  transform: translateY(-1px);
}

.nav-item__menu-link--button {
  width: 100%;
}

.nav-item--user-active .nav-item__trigger,
.nav-item--user-active .nav-item__trigger:hover,
.nav-item--user-active .nav-item__trigger:focus-visible,
.nav-item--user.nav-item--open .nav-item__trigger {
  background: rgba(11, 61, 145, 0.12);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .nav-item--user .nav-item__menu {
  background: rgba(12, 12, 12, 0.95);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

body.theme-blue .nav-item--user .nav-item__menu {
  background: rgba(2, 21, 51, 0.94);
  color: #f0f6ff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

body.dark-mode .nav-item__menu-link,
body.theme-blue .nav-item__menu-link {
  background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .nav-item__menu-link:hover,
body.dark-mode .nav-item__menu-link:focus-visible,
body.theme-blue .nav-item__menu-link:hover,
body.theme-blue .nav-item__menu-link:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.nav-item__menu-link[aria-current="page"] {
  background: rgba(11, 61, 145, 0.2);
}

body.dark-mode .nav-item__menu-link[aria-current="page"],
body.theme-blue .nav-item__menu-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.28);
}

body.dark-mode #intro-overlay {
  background: #000;
}

.login-flow {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 2000;
  box-sizing: border-box;
}

body.login-flow-open {
  overflow: hidden;
}

.login-flow__panel {
  width: min(340px, 90vw);
  padding: 32px 28px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: #0b3d91;
}

body.dark-mode .login-flow__panel {
  background: rgba(12, 12, 12, 0.92);
  color: #fff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

body.theme-blue .login-flow__panel {
  background: rgba(3, 18, 46, 0.95);
  color: #f0f6ff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.login-flow__logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.login-flow__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.login-flow__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-flow__step {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.login-flow__step--active {
  display: flex;
}

.login-flow__step label {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
}

.login-flow__step input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11, 61, 145, 0.3);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  box-sizing: border-box;
}

body.dark-mode .login-flow__step input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.theme-blue .login-flow__step input {
  background: rgba(240, 246, 255, 0.08);
  border-color: rgba(240, 246, 255, 0.2);
  color: #f0f6ff;
}

.login-flow__submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #0b3d91, #1c68e0);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-flow__submit:hover,
.login-flow__submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(12, 61, 145, 0.28);
}

body.dark-mode .login-flow__submit {
  background: linear-gradient(135deg, #0066cc, #249fff);
}

.login-flow__error {
  min-height: 18px;
  margin: 4px 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: #c62828;
}

body.dark-mode .login-flow__error {
  color: #ff8a80;
}

body.theme-blue .login-flow__error {
  color: #ffd1d1;
}

@media (max-width: 480px) {
  .login-flow {
    padding: 16px;
  }

  .login-flow__panel {
    padding: 24px 20px 20px;
  }
}

.custom-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
}

.custom-info {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  margin: 5px 0;
}

#visor {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: calc(100vh - var(--nav-height));
  padding: 0 5vw 200px 5vw;
  display: none;
}

#menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 28px 24px 36px;
  box-sizing: border-box;
}

body.page-home #menu {
  flex: 1 1 auto;
  min-height: 0;
}

#clock {
  font-size: clamp(40px, 8vw, 80px);
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  color: #000;
  text-align: center;
}

#menu-logo {
  width: 100px;
  height: auto;
}

body.dark-mode #menu-logo {
  filter: invert(1);
}

body.dark-mode #clock {
  color: #fff;
}

#menu-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  justify-items: center;
  width: min(720px, 100%);
}

#menu-modes img {
  width: min(207px, 100%);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s linear;
}


.hidden {
  display: none !important;
}

#auth-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
}

.auth-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-button,
.logout-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, #00b3b3, #00cccc);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logout-button {
  background: linear-gradient(90deg, #ff5a5a, #ff7a7a);
  display: none;
}

.login-button:hover,
.logout-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: min(90vw, 420px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.dark-mode .auth-modal-content,
body.theme-blue .auth-modal-content {
  background: #10203d;
  color: #fff;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: inherit;
}

.auth-tabs {
  display: flex;
  gap: 8px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 6px;
  background: #e0f7f9;
  color: #006a6a;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-tab.active {
  background: linear-gradient(90deg, #00b3b3, #00cccc);
  color: #fff;
}

body.dark-mode .auth-tab,
body.theme-blue .auth-tab {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f6ff;
}

body.dark-mode .auth-tab.active,
body.theme-blue .auth-tab.active {
  background: rgba(0, 179, 179, 0.7);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.auth-form.active {
  display: flex;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.auth-form input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d0d0d0;
  font-size: 14px;
}

body.dark-mode .auth-form input,
body.theme-blue .auth-form input {
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-submit {
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #00b3b3, #00cccc);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.auth-message {
  min-height: 20px;
  font-size: 13px;
  color: #c62828;
}

body.dark-mode .auth-message,
body.theme-blue .auth-message {
  color: #ff8a80;
}

#pt-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 90vw;
}

#pt {
  font-size: clamp(32px, 6vw, 50px);
  color: #333;
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  width: 100%;
  caret-color: #333;
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  display: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  resize: none;
}


#texto-exibicao {
  font-size: clamp(32px, 6vw, 50px);
  color: #333;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  text-align: center;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#score {
  display: none;
}

#barra-progresso {
  width: 100%;
  max-width: 90vw;
  height: 20px;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

#barra-preenchida {
  height: 100%;
  width: 0%;
  background-color: #ff0000;
  border-radius: 10px;
  transition: width 1.5s linear, background-color 1.5s linear;
}

#resultado, #acertos {
  color: #333;
}

#acertos {
  display: none;
}

#timer {
  display: none;
  font-size: 18px;
  color: #333;
}

#nivel-mensagem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: #444;
  font-family: 'Open Sans', sans-serif;
  display: none;
}

#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#intro-image {
  width: 250px;
  height: 250px;
}

#intro-progress {
  position: absolute;
  bottom: 30px;
  width: 100%;
  max-width: 90vw;
  height: 20px;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
}

#intro-progress-filled {
  width: 0%;
  height: 100%;
  background-color: #ff0000;
}

#mode-icon {
  width: 250px;
  height: 250px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms linear;
}

body.page-home #mode-buttons {
  position: fixed;
  bottom: calc(var(--nav-height) + 60px);
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, calc(6 * 117px + 5 * 20px));
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 10px;
  z-index: 999;
}

body.page-home #mode-buttons img {
  width: 117px;
  height: 117px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s linear;
}

#play-container {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px 16px 32px;
  box-sizing: border-box;
}

body.page-play #play-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 30px 20px 10px;
  text-align: center;
}

body.page-play #play-content.stats-wrapper {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

body.page-play #mode-buttons,
.stats-mode-icons {
  position: static;
  transform: none;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
  gap: 14px;
  padding: 0 8px;
  box-sizing: border-box;
}

body.page-play #mode-buttons img,
.stats-mode-icons img {
  width: 104px;
  height: 104px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease;
}

body.page-play #mode-buttons {
  order: -1;
}

.stats-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.stat-bar {
  width: min(250px, 85vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.stat-bar-label {
  font-weight: 700;
  text-align: center;
  color: #0c3d5e;
}

body.dark-mode .stat-bar-label,
body.theme-blue .stat-bar-label {
  color: #f0f6ff;
}

.stat-bar-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

body.dark-mode .stat-bar-track,
body.theme-blue .stat-bar-track {
  background: rgba(255, 255, 255, 0.18);
}

.stat-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b3b3, #00cccc);
  transition: width 0.7s ease;
}

@media (max-width: 640px) {
  #play-container {
    gap: 18px;
    padding: 20px 12px 24px;
  }

  body.page-play #play-content.stats-wrapper {
    width: 100%;
  }

  .stats-wrapper {
    gap: 16px;
  }

  .stat-bar {
    width: min(280px, 90vw);
  }

  body.page-play #mode-buttons,
  .stats-mode-icons {
    max-width: 344px;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 2px;
  }

  body.page-play #mode-buttons img,
  .stats-mode-icons img {
    width: 104px;
    height: 104px;
  }
}

#play-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

#fun-container {
  width: min(90vw, 520px);
  margin: 40px auto;
  padding: 30px 24px 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.dark-mode #fun-container {
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

#profile-container {
  width: min(90vw, 520px);
  margin: 40px auto 120px;
  padding: 30px 24px 40px;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

body.dark-mode #profile-container,
body.theme-blue #profile-container {
  background: transparent;
  color: #f0f6ff;
  box-shadow: none;
}

#profile-container h1 {
  font-size: 24px;
  margin: 0;
  text-align: center;
}

.profile-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.profile-field label {
  font-weight: 600;
  color: #0c3d5e;
}

body.dark-mode .profile-field label,
body.theme-blue .profile-field label {
  color: #f0f6ff;
}

.profile-field input[type="text"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 15px;
}

body.dark-mode .profile-field input[type="text"],
body.theme-blue .profile-field input[type="text"] {
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.profile-share {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-share-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #0c3d5e;
}

body.dark-mode .profile-share-toggle,
body.theme-blue .profile-share-toggle {
  color: #f0f6ff;
}

.profile-share-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #00b3b3;
}

.profile-share-description {
  margin: 0 0 0 32px;
  font-size: 13px;
  line-height: 1.5;
  color: #4f5d73;
}

body.dark-mode .profile-share-description,
body.theme-blue .profile-share-description {
  color: rgba(240, 246, 255, 0.85);
}

.profile-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-photo-preview {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #556;
  font-size: 14px;
  text-align: center;
  padding: 12px;
  border: 4px solid rgba(39, 174, 96, 0.18);
  box-shadow: 0 14px 26px rgba(11, 61, 145, 0.12);
}

.profile-photo-preview--icon {
  background: linear-gradient(135deg, rgb(61, 195, 34), rgb(82, 224, 141));
  color: #fff;
  font-size: 56px;
  font-weight: 700;
}

body.dark-mode .profile-photo-preview,
body.theme-blue .profile-photo-preview {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f6ff;
  border-color: rgba(39, 174, 96, 0.26);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.38);
}

.profile-photo-preview.has-photo {
  color: transparent;
  background-color: transparent;
  border-color: rgba(39, 174, 96, 0.4);
  box-shadow: 0 18px 32px rgba(11, 61, 145, 0.18);
}

.profile-photo-preview--fade-in {
  animation: profilePhotoDissolve 1s ease forwards;
}

@keyframes profilePhotoDissolve {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

body.dark-mode .profile-photo-preview.has-photo,
body.theme-blue .profile-photo-preview.has-photo {
  background-color: transparent;
  border-color: rgba(39, 174, 96, 0.5);
  box-shadow: 0 18px 34px rgba(2, 21, 51, 0.45);
}

[data-page-transition] {
  opacity: 0;
  transform: translateX(64px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

main[data-page-transition] {
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
}

body.page-transition-ready [data-page-transition] {
  opacity: 1;
  transform: translateX(0);
}

body.page-transition-leave [data-page-transition] {
  opacity: 0;
  transform: translateX(-64px);
}

.profile-photo-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(240, 246, 255, 0.88);
  border: 1px solid rgba(11, 61, 145, 0.18);
  box-shadow: 0 18px 32px rgba(11, 61, 145, 0.16);
  backdrop-filter: blur(4px);
}

.profile-photo-progress[hidden] {
  display: none !important;
}

body.dark-mode .profile-photo-progress {
  background: rgba(24, 32, 52, 0.9);
  border-color: rgba(127, 168, 255, 0.28);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.45);
}

body.theme-blue .profile-photo-progress {
  background: rgba(7, 30, 68, 0.88);
  border-color: rgba(135, 206, 255, 0.32);
  box-shadow: 0 22px 36px rgba(2, 21, 51, 0.6);
}

.profile-photo-progress__circle {
  --progress: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, rgba(79, 169, 255, 0.95) calc(var(--progress) * 1%), rgba(79, 169, 255, 0.2) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s ease;
}

.profile-photo-progress__circle::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

body.dark-mode .profile-photo-progress__circle::after {
  background: rgba(12, 17, 28, 0.94);
}

body.theme-blue .profile-photo-progress__circle::after {
  background: rgba(8, 26, 58, 0.92);
}

.profile-photo-progress__value {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  color: #1e4b9a;
}

body.dark-mode .profile-photo-progress__value,
body.theme-blue .profile-photo-progress__value {
  color: #f0f6ff;
}

.profile-photo-progress__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1b3e73;
  max-width: 200px;
}

body.dark-mode .profile-photo-progress__text,
body.theme-blue .profile-photo-progress__text {
  color: rgba(240, 246, 255, 0.92);
}

.profile-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00b3b3, #00cccc);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.profile-upload-label input {
  display: none;
}

.profile-publish-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a18, #ffb347);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.profile-publish-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.profile-publish-button:not(:disabled):hover {
  box-shadow: 0 6px 18px rgba(255, 122, 24, 0.35);
  transform: translateY(-1px);
}

.profile-publish-button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(255, 122, 24, 0.25);
}

@media (min-width: 768px) {
  #main-nav .nav-item {
    font-size: 30px;
  }

  body.page-play #mode-buttons {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }
}

@media (max-width: 480px) {
  #main-nav {
    padding: 0 10px;
  }

  #main-nav .nav-item {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  body.page-home #mode-buttons {
    bottom: calc(var(--nav-height) + 40px);
  }

  body.page-play #mode-buttons img {
    width: 82px;
    height: 82px;
  }
}

body.theme-blue #fun-container {
  background: rgba(7, 26, 73, 0.9);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

#fun-container h1 {
  font-size: 28px;
  text-align: center;
  margin: 0;
}

#fun-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.fun-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fun-section h2 {
  font-size: 20px;
  margin: 0;
}

.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.theme-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.fun-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
}

.fun-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 16px;
}

body.dark-mode .fun-field input,
body.theme-blue .fun-field input {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border-color: rgba(255, 255, 255, 0.25);
}

.fun-note {
  font-size: 14px;
  margin: 0;
  line-height: 1.4;
}

.fun-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fun-actions button {
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #00b3b3, #00cccc);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fun-actions button:hover,
.fun-actions button:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(0, 179, 179, 0.35);
}

body.dark-mode .fun-actions button,
body.theme-blue .fun-actions button {
  background: linear-gradient(90deg, #00cccc, #33ffff);
  color: #001b2e;
}

#fun-feedback {
  font-size: 14px;
  min-height: 20px;
}

@media (max-width: 600px) {
  #mode-icon {
    width: 150px;
    height: 150px;
    position: relative;
    top: -100px;
  }

  #texto-exibicao,
  #barra-progresso {
    position: relative;
    top: -100px;
  }

  #clock {
    font-size: 12vw;
  }

  :root {
    --nav-height: 61px;
  }

  #main-nav {
    justify-content: space-between;
    padding: 0 16px;
    gap: 8px;
  }

  #main-nav .nav-item {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .nav-item--user {
    min-width: 48px;
  }

  #menu {
    padding: 24px 16px 128px;
    gap: 22px;
  }

  #menu-modes {
    grid-template-columns: repeat(2, minmax(128px, 1fr));
    gap: 16px;
  }

  #menu-modes img {
    width: min(52vw, 162px);
  }

  body.page-home #mode-buttons {
    bottom: calc(var(--nav-height) + 24px);
    padding: 0 20px;
    width: min(92vw, 340px);
    gap: 16px;
  }

  body.page-home #mode-buttons img {
    width: min(22vw, 90px);
    height: min(22vw, 90px);
  }

  body.page-play #mode-buttons {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  #fun-container {
    padding: 24px 20px 32px;
    margin: 24px auto;
  }

  .fun-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .fun-actions button {
    width: 100%;
  }
}

@keyframes mode1Zoom {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

@keyframes modeZoom {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

#logo-top {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: auto;
  z-index: 1000;
  display: none;
}

#tutorial-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20%;
  height: auto;
  z-index: 10000;
  display: none;
}

#ilife-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#ilife-logo {
  width: 20%;
  height: auto;
  opacity: 0;
  animation: fadeIn 1000ms forwards;
}

#ilife-text {
  margin-top: 10px;
  color: #777;
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  font-size: 17px;
  text-align: center;
}

#next-level-msg {
  margin-top: 10px;
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  font-size: 14px;
  color: #777;
  opacity: 0;
  transition: opacity 500ms linear;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Legacy circle stats used dentro do jogo */
.stat-circle {
  position: relative;
  width: 210px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-circle svg {
  width: 210px;
  height: 210px;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: #444;
  stroke-width: 9.75;
  opacity: 0.3;
}

.circle-progress {
  fill: none;
  stroke-width: 9.75;
  stroke-linecap: butt;
  transition: stroke-dashoffset 1s;
}

.circle-icon {
  position: absolute;
  top: calc(50% - 30px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  pointer-events: none;
}

.circle-value {
  margin-top: 12px;
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.circle-label {
  margin-top: 8px;
  font-size: 18px;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
}

.circle-extra {
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  margin-top: 7px;
  text-align: center;
}

.page-ranking {
  --ranking-background: radial-gradient(circle at 20% -10%, rgba(149, 213, 255, 0.45) 0%, rgba(245, 251, 255, 0) 55%),
    radial-gradient(circle at 80% 0%, rgba(255, 225, 196, 0.38) 0%, rgba(243, 248, 255, 0) 60%),
    linear-gradient(180deg, #f5fbff 0%, #e6f1ff 100%);
  --ranking-heading-color: #0b3d91;
  --ranking-subheading-color: #35506f;
  --ranking-status-bg: rgba(255, 255, 255, 0.88);
  --ranking-status-text: #2f425b;
  --ranking-status-error-bg: rgba(255, 236, 240, 0.96);
  --ranking-status-error-text: #a6002b;
  --ranking-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(227, 241, 255, 0.95));
  --ranking-card-border: rgba(11, 61, 145, 0.18);
  --ranking-card-shadow: 0 20px 38px rgba(11, 61, 145, 0.14);
  --ranking-card-hover-shadow: 0 26px 48px rgba(11, 61, 145, 0.2);
  --ranking-card-top-bg: linear-gradient(135deg, rgba(255, 250, 237, 0.97), rgba(255, 234, 183, 0.95));
  --ranking-card-top-border: rgba(255, 193, 7, 0.55);
  --ranking-position-color: #09a0c7;
  --ranking-position-top-color: #d68c00;
  --ranking-name-color: #0f2641;
  --ranking-level-color: #3b4a5a;
  --ranking-avatar-border: rgba(11, 61, 145, 0.25);
  --ranking-avatar-border-top: rgba(255, 193, 7, 0.55);
  color: var(--ranking-name-color);
  background: var(--ranking-background);
}

.page-ranking.dark-mode {
  --ranking-background: radial-gradient(circle at 30% -20%, rgba(0, 160, 255, 0.24) 0%, rgba(3, 9, 24, 0) 60%),
    linear-gradient(180deg, #01030a 0%, #060c1c 100%);
  --ranking-heading-color: #f2f6ff;
  --ranking-subheading-color: #c3d8ff;
  --ranking-status-bg: rgba(16, 28, 48, 0.78);
  --ranking-status-text: #e3eeff;
  --ranking-status-error-bg: rgba(88, 0, 30, 0.82);
  --ranking-status-error-text: #ff9dc3;
  --ranking-card-bg: linear-gradient(135deg, rgba(14, 24, 43, 0.92), rgba(8, 16, 32, 0.94));
  --ranking-card-border: rgba(0, 168, 255, 0.28);
  --ranking-card-shadow: 0 24px 46px rgba(0, 0, 0, 0.65);
  --ranking-card-hover-shadow: 0 30px 56px rgba(0, 0, 0, 0.72);
  --ranking-card-top-bg: linear-gradient(135deg, rgba(26, 42, 77, 0.94), rgba(45, 70, 115, 0.94));
  --ranking-card-top-border: rgba(120, 206, 255, 0.55);
  --ranking-position-color: #52c7ff;
  --ranking-position-top-color: #ffe082;
  --ranking-name-color: #f2f6ff;
  --ranking-level-color: #cbd8ff;
  --ranking-avatar-border: rgba(0, 168, 255, 0.42);
  --ranking-avatar-border-top: rgba(255, 224, 130, 0.65);
  color: var(--ranking-name-color);
  background: var(--ranking-background);
}

.page-ranking.theme-blue {
  --ranking-background: linear-gradient(180deg, #021533 0%, #032c66 42%, #0a56a0 100%);
  --ranking-heading-color: #ffffff;
  --ranking-subheading-color: #d6e6ff;
  --ranking-status-bg: rgba(7, 26, 66, 0.75);
  --ranking-status-text: #f0f6ff;
  --ranking-status-error-bg: rgba(130, 24, 52, 0.84);
  --ranking-status-error-text: #ffd8e3;
  --ranking-card-bg: linear-gradient(135deg, rgba(10, 42, 92, 0.95), rgba(7, 30, 68, 0.92));
  --ranking-card-border: rgba(130, 202, 255, 0.32);
  --ranking-card-shadow: 0 26px 52px rgba(2, 21, 51, 0.6);
  --ranking-card-hover-shadow: 0 32px 60px rgba(2, 21, 51, 0.7);
  --ranking-card-top-bg: linear-gradient(135deg, rgba(21, 77, 150, 0.95), rgba(34, 118, 206, 0.94));
  --ranking-card-top-border: rgba(135, 206, 255, 0.58);
  --ranking-position-color: #6fd1ff;
  --ranking-position-top-color: #ffe082;
  --ranking-name-color: #ffffff;
  --ranking-level-color: #d6e6ff;
  --ranking-avatar-border: rgba(135, 206, 255, 0.5);
  --ranking-avatar-border-top: rgba(255, 245, 157, 0.65);
  color: var(--ranking-name-color);
  background: var(--ranking-background);
}

.ranking-main {
  max-width: min(960px, 92vw);
  margin: 0 auto;
  padding: 48px 16px calc(var(--nav-height) + 48px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ranking-header h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 700;
  color: var(--ranking-heading-color);
}

.ranking-header p {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--ranking-subheading-color);
}

.ranking-status {
  font-size: 15px;
  color: var(--ranking-status-text);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ranking-status-bg);
  box-shadow: 0 12px 28px rgba(9, 34, 71, 0.18);
}

.ranking-status[hidden] {
  display: none;
}

.ranking-status--error {
  color: var(--ranking-status-error-text);
  background: var(--ranking-status-error-bg);
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border-radius: 28px;
  background: var(--ranking-card-bg);
  border: 1px solid var(--ranking-card-border);
  box-shadow: var(--ranking-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.ranking-card:hover,
.ranking-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--ranking-card-hover-shadow);
}

.ranking-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ranking-card:hover::before,
.ranking-card:focus-within::before {
  opacity: 1;
}

.ranking-card--top {
  position: relative;
  background: var(--ranking-card-top-bg);
  border: 2px solid var(--ranking-card-top-border);
}

.ranking-card__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.ranking-avatar-wrapper {
  position: relative;
  width: 112px;
  height: 112px;
}

.ranking-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--ranking-avatar-border);
  box-shadow: 0 16px 32px rgba(11, 61, 145, 0.18);
}

.ranking-card--top .ranking-avatar {
  border-color: var(--ranking-avatar-border-top);
  box-shadow: 0 20px 36px rgba(214, 140, 0, 0.24);
}

.ranking-position-badge {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2386ff, #31b4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(49, 168, 255, 0.28);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.ranking-card--top .ranking-position-badge {
  background: linear-gradient(135deg, #ffe082, #ffb74d);
  color: #5b3600;
  box-shadow: 0 14px 26px rgba(255, 193, 7, 0.32);
  border-color: rgba(255, 255, 255, 0.95);
}

.ranking-level-indicator {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--ranking-level-color);
}

.ranking-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

.ranking-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ranking-name-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-level {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ranking-level-color);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ranking-main {
    padding: 32px 12px calc(var(--nav-height) + 36px);
  }

  .ranking-card {
    gap: 18px;
    padding: 18px 18px;
  }

  .ranking-avatar-wrapper {
    width: 96px;
    height: 96px;
  }

  .ranking-position-badge {
    width: 48px;
    height: 48px;
    font-size: 18px;
    top: -10px;
    left: -10px;
  }

  .ranking-name {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .ranking-card {
    gap: 14px;
    padding: 16px 14px;
  }

  .ranking-avatar-wrapper {
    width: 88px;
    height: 88px;
  }

  .ranking-position-badge {
    width: 42px;
    height: 42px;
    font-size: 16px;
    top: -8px;
    left: -8px;
  }

  .ranking-name {
    font-size: 17px;
  }

  .ranking-level {
    font-size: 14px;
  }
}

