/* BLauncher — account modal (login / register / profile / skin). Self-contained. */

.acc-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.acc-dialog[hidden] { display: none; }

.acc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(8px);
}

.acc-modal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 420px);
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 26, 33, 0.96), rgba(12, 16, 21, 0.98));
  box-shadow: var(--shadow);
  animation: acc-pop 0.22s ease;
}
@keyframes acc-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.acc-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  font-size: 22px;
  line-height: 0;
  padding: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}
.acc-close:hover { background: rgba(168, 58, 53, 0.4); }

/* ---- Left art panel ---- */
.acc-aside {
  position: relative;
  padding: 32px 28px;
  background:
    radial-gradient(circle at 30% 20%, rgba(123, 63, 190, 0.45), transparent 60%),
    radial-gradient(circle at 75% 85%, rgba(45, 155, 90, 0.4), transparent 60%),
    linear-gradient(160deg, #161a22, #0c0f14);
  overflow: hidden;
}
.acc-aside__glow {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 70%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.18), transparent 70%);
  pointer-events: none;
}
.acc-aside__content { position: relative; }
.acc-aside__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
}
.acc-aside h3 {
  margin: 18px 0 8px;
  font-size: 24px;
  letter-spacing: 0.5px;
}
.acc-aside p { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.acc-aside__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.acc-aside__list li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}
.acc-aside__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(45, 155, 90, 0.18);
}
.acc-aside__list li::after {
  content: "✓";
  position: absolute;
  left: 3px;
  top: 1px;
  font-size: 11px;
  color: #07090c;
  font-weight: 700;
}

/* ---- Right working panel ---- */
.acc-panel {
  padding: 30px 30px 26px;
  overflow-y: auto;
}
.acc-eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  color: var(--gold);
}
.acc-head h2 { margin: 0 0 6px; font-size: 23px; }
.acc-intro { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* Tabs */
.acc-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
}
.acc-tab {
  position: relative;
  z-index: 1;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  transition: color 0.18s;
}
.acc-tab.is-active { color: var(--text); }
.acc-tabs__pill {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--green), #247a47);
  transition: transform 0.22s ease;
}
.acc-tabs:has(#tabRegister.is-active) .acc-tabs__pill { transform: translateX(100%); }

/* Form fields */
.acc-form { display: grid; gap: 14px; }
.acc-form--tight { gap: 10px; }
.acc-field { display: grid; gap: 6px; }
.acc-field[hidden] { display: none; }
.acc-field__label { font-size: 12px; color: var(--muted); letter-spacing: 0.3px; }
.acc-field__hint { font-size: 11.5px; color: var(--soft); }

.acc-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, rgba(255, 255, 255, 0.7));
  cursor: pointer;
}
.acc-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--gold);
  cursor: pointer;
}
.acc-consent a { color: var(--gold); text-decoration: underline; }

.acc-field input,
.acc-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.acc-field textarea { resize: vertical; min-height: 46px; }
.acc-field input::placeholder,
.acc-field textarea::placeholder { color: var(--soft); }
.acc-field input:focus,
.acc-field textarea:focus {
  outline: none;
  border-color: var(--green);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(45, 155, 90, 0.2);
}

.acc-input-wrap { position: relative; display: block; }
.acc-input-wrap input { padding-right: 44px; }
.acc-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
  opacity: 0.5;
  transition: opacity 0.18s;
}
.acc-eye:hover, .acc-eye.is-on { opacity: 1; }

.acc-submit {
  margin-top: 4px;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green), #247a47);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.15s, filter 0.18s, box-shadow 0.18s;
  box-shadow: 0 10px 26px rgba(36, 122, 71, 0.3);
}
.acc-submit:hover { filter: brightness(1.07); transform: translateY(-1px); }
.acc-submit:active { transform: translateY(0); }
.acc-submit--ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
.acc-submit--ghost:hover { background: rgba(255, 255, 255, 0.1); }

.acc-switch {
  margin: 4px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.acc-link {
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.acc-link:hover { filter: brightness(1.15); }

/* ---- Profile ---- */
.acc-profile { display: grid; gap: 16px; }
.acc-profile__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.skinview {
  position: relative;
  width: 100px;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.04) 0% 25%, transparent 0% 50%) 50% / 18px 18px,
    radial-gradient(circle at 50% 28%, rgba(123, 63, 190, 0.25), transparent 70%),
    #0b0e12;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.skinview.has-skin::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background-image: var(--skin-image);
  background-size: 800% 800%;
  background-position: 14.285% 14.285%;
  image-rendering: pixelated;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.42);
}
.skinview.has-skin.is-canvas-ok::before {
  display: none;
}
.skinview canvas {
  width: 80px;
  height: 160px;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}
.skinview__empty {
  position: absolute;
  inset: auto 0 0;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--soft);
}
.acc-profile__id { min-width: 0; }
.acc-profile__id h3 { margin: 0 0 2px; font-size: 20px; }
.acc-profile__email {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skin-drop {
  display: grid;
  gap: 2px;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(232, 232, 224, 0.28);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, background 0.18s;
}
.skin-drop:hover { border-color: var(--green); background: rgba(45, 155, 90, 0.08); }
.skin-drop.is-drag { border-color: var(--gold); background: rgba(201, 162, 39, 0.12); }
.skin-drop strong { font-size: 13.5px; color: var(--text); }
.skin-drop span { font-size: 11.5px; color: var(--soft); }

.acc-collapse {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.acc-collapse summary {
  cursor: pointer;
  list-style: none;
  font-size: 13.5px;
  color: var(--gold);
  font-weight: 600;
  padding: 4px 0;
}
.acc-collapse summary::-webkit-details-marker { display: none; }
.acc-collapse summary::after { content: " ▾"; color: var(--muted); }
.acc-collapse[open] summary::after { content: " ▴"; }
.acc-collapse .acc-form { margin-top: 12px; }

.acc-logout {
  justify-self: center;
  color: var(--muted);
  text-decoration: none;
}
.acc-logout:hover { color: var(--red); }

/* Status message */
.acc-message {
  margin: 14px 0 0;
  min-height: 18px;
  font-size: 13px;
  text-align: center;
}
.acc-message[data-kind="error"] { color: #e88a85; }
.acc-message[data-kind="success"] { color: #6fc593; }
.acc-message[data-kind="info"] { color: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 680px) {
  .acc-modal { grid-template-columns: 1fr; width: min(440px, 100%); }
  .acc-aside { display: none; }
  .acc-panel { padding: 26px 22px 22px; }
  .acc-profile__top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .acc-profile__email { text-align: center; }
}

/* Small phones: the modal fills the screen and scrolls, never clipped. */
@media (max-width: 480px) {
  .acc-dialog { padding: 12px; align-items: stretch; }
  .acc-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }
  .acc-panel { padding: 22px 18px 18px; overflow-y: auto; }
  .acc-close { top: 10px; right: 10px; }
  .acc-head h2 { font-size: 21px; }
  .acc-tabs { margin-bottom: 16px; }
  .skinview { width: 92px; height: 184px; }
}
