:root {
  --an-blue: #00aaff;
  --an-blue-deep: #0077aa;
  --an-ink: #0b1018;
  --an-panel: #ffffff;
  --an-soft: #f1f5f9;
  --an-line: #d8e1eb;
  --an-text: #18202b;
  --an-muted: #607083;
  --an-danger: #c62828;
  --an-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body.dark-mode {
  --an-panel: #111925;
  --an-soft: #182331;
  --an-line: #2c3a4c;
  --an-text: #f5f8fc;
  --an-muted: #aeb9c8;
  --an-shadow: 0 24px 70px rgba(0, 0, 0, 0.56);
}

.armino-account-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  position: relative;
  z-index: 3;
}

.an-player-button {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  background: #30343a;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.an-player-button:hover,
.an-player-button:focus-visible {
  transform: translateY(-2px);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.34);
  outline: none;
}

.an-player-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.an-unknown-icon {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  background: linear-gradient(145deg, #484d54, #262a2f);
}

.an-unknown-icon::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a7adb4;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
}

.an-unknown-icon::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 16px;
  border-radius: 14px 14px 7px 7px;
  background: #8f969e;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
}

.an-root,
.an-root * {
  box-sizing: border-box;
}

.an-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 5, 12, 0.75);
  backdrop-filter: blur(10px);
}

.an-modal {
  width: min(500px, 100%);
  max-height: min(800px, calc(100vh - 44px));
  overflow: auto;
  color: var(--an-text);
  background: var(--an-panel);
  border: 1px solid var(--an-line);
  border-radius: 22px;
  box-shadow: var(--an-shadow);
  padding: 28px;
  position: relative;
  text-align: left;
  font-family: "Inter", Arial, sans-serif;
}

.an-modal h2,
.an-modal h3,
.an-menu h3 {
  color: var(--an-text);
  margin: 0;
  line-height: 1.2;
}

.an-modal p {
  color: var(--an-muted);
  margin: 8px 0 20px;
}

.an-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--an-text);
  background: var(--an-soft);
  font-size: 25px;
  cursor: pointer;
}

.an-auth-tabs,
.an-profile-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: 14px;
  background: var(--an-soft);
}

.an-auth-tabs {
  margin: 22px 0;
}

.an-auth-tab,
.an-profile-tab {
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--an-muted);
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.an-auth-tab[aria-selected="true"],
.an-profile-tab[aria-selected="true"] {
  color: #00131d;
  background: var(--an-blue);
}

.an-field {
  display: block;
  margin: 14px 0;
  color: var(--an-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.an-field input,
.an-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--an-line);
  border-radius: 10px;
  color: var(--an-text);
  background: var(--an-soft);
  font: inherit;
  padding: 10px 12px;
  margin-top: 6px;
  outline: none;
}

.an-field input:focus,
.an-field select:focus {
  border-color: var(--an-blue);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.2);
}

.an-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--an-muted);
  font-size: 0.88rem;
  margin: 15px 0;
}

.an-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--an-blue);
}

.an-primary,
.an-secondary,
.an-danger,
.an-link-button {
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.an-primary {
  width: 100%;
  color: #00131d;
  border: 1px solid var(--an-blue);
  background: var(--an-blue);
}

.an-secondary {
  color: var(--an-text);
  border: 1px solid var(--an-line);
  background: var(--an-soft);
}

.an-danger {
  color: #fff;
  border: 1px solid #e04444;
  background: var(--an-danger);
}

.an-link-button {
  border: 0;
  color: var(--an-blue-deep);
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.an-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--an-muted);
  font-size: 0.9rem;
}

.an-status[data-kind="error"] {
  color: #e44747;
}

.an-status[data-kind="success"] {
  color: #14884d;
}

.an-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.an-menu {
  position: fixed;
  z-index: 100000;
  width: min(330px, calc(100vw - 28px));
  top: 78px;
  right: 18px;
  border-radius: 18px;
  padding: 18px;
  color: var(--an-text);
  background: var(--an-panel);
  border: 1px solid var(--an-line);
  box-shadow: var(--an-shadow);
  font-family: "Inter", Arial, sans-serif;
}

.an-menu-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--an-line);
}

.an-menu-head img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--an-blue);
}

.an-menu-head small {
  color: var(--an-muted);
}

.an-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--an-text);
  background: var(--an-soft);
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.an-menu-item.an-logout {
  justify-content: center;
  color: #fff;
  background: var(--an-danger);
}

.an-switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  position: relative;
  background: #8995a3;
}

.an-switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.an-switch[data-on="true"] {
  background: var(--an-blue-deep);
}

.an-switch[data-on="true"]::after {
  transform: translateX(18px);
}

.an-profile-page {
  min-height: 100vh;
  background: #eef3f8;
}

body.dark-mode.an-profile-page {
  background: #090f17;
}

.an-profile-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 130px 0 70px;
  font-family: "Inter", Arial, sans-serif;
}

.an-profile-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(125deg, #06131f, #073c58 60%, #00aaff);
  box-shadow: var(--an-shadow);
}

.an-profile-hero img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
}

.an-profile-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.an-profile-hero p {
  margin: 4px 0 0;
  opacity: 0.8;
}

.an-profile-tabs {
  margin: 24px 0;
  overflow-x: auto;
}

.an-profile-tab {
  min-width: 130px;
}

.an-panel {
  padding: 26px;
  border: 1px solid var(--an-line);
  border-radius: 18px;
  color: var(--an-text);
  background: var(--an-panel);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.an-panel + .an-panel {
  margin-top: 18px;
}

.an-panel h2,
.an-panel h3 {
  margin-top: 0;
  color: var(--an-text);
}

.an-panel p {
  color: var(--an-muted);
}

.an-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.an-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 12px;
}

.an-avatar-choice {
  aspect-ratio: 1;
  padding: 3px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.an-avatar-choice[aria-pressed="true"] {
  border-color: var(--an-blue);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.2);
}

.an-avatar-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.an-game-grid,
.an-achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.an-game-card,
.an-achievement-card {
  padding: 18px;
  border: 1px solid var(--an-line);
  border-radius: 14px;
  color: var(--an-text);
  background: var(--an-soft);
}

.an-game-card h3,
.an-achievement-card h3 {
  margin: 0 0 8px;
}

.an-game-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 14px 0;
}

.an-game-card dt {
  color: var(--an-muted);
}

.an-game-card dd {
  margin: 0;
  font-weight: 900;
}

.an-achievement-card .an-tier {
  display: inline-block;
  color: #00131d;
  background: var(--an-blue);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.an-empty {
  padding: 36px;
  border: 1px dashed var(--an-line);
  border-radius: 14px;
  color: var(--an-muted);
  text-align: center;
}

.an-hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .armino-account-slot {
    position: absolute;
    right: 72px;
    top: 16px;
  }

  .an-modal {
    padding: 24px 18px;
  }

  .an-profile-shell {
    padding-top: 110px;
  }

  .an-profile-hero {
    align-items: flex-start;
    padding: 22px;
  }

  .an-profile-hero img {
    width: 72px;
    height: 72px;
  }

  .an-grid-2 {
    grid-template-columns: 1fr;
  }

  .an-avatar-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
  }
}

@media (max-width: 460px) {
  .an-profile-hero {
    flex-direction: column;
  }

  .an-profile-tab {
    min-width: 110px;
  }

  .an-avatar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

