:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0b0b0b;
  --panel-2: #121212;
  --line: #303030;
  --text: #ffffff;
  --muted: #b8b8b8;
  --soft: #1f1f1f;
  --accent: #f2f2f2;
  --accent-text: #050505;
  --danger: #d03e3e;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-ExtraBold.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, .72), rgba(5, 5, 5, .96)),
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, .1) 0, transparent 34rem),
    url("/assets/background.jpg") center / cover fixed,
    var(--bg);
  color: var(--text);
  font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 8px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(5, 5, 5, .72), rgba(5, 5, 5, .34));
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.nav form {
  display: flex;
  margin: 0;
}

.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover,
.nav-primary {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: clamp(28px, 5vw, 64px) 0 32px;
}

.hero-content h1,
.cabinet-head h1,
.form-head h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: .95;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.lead.small {
  font-size: 15px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.button.secondary {
  background: var(--soft);
  color: var(--text);
}

.button.ghost {
  background: transparent;
  color: var(--muted);
}

.button.full {
  width: 100%;
}

.panel,
.form-card,
.grid-three article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

code,
pre {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-three article,
.panel,
.download-card {
  padding: 22px;
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
}

.form-card {
  width: min(460px, 100%);
  padding: 28px;
}

.form-head h1 {
  font-size: 36px;
}

.form-head p {
  margin: 10px 0 22px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.muted {
  color: var(--muted);
  text-align: center;
}

.muted a {
  color: var(--text);
  font-weight: 800;
}

.alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.alert.error {
  background: rgba(208, 62, 62, .16);
  color: #ffb5b5;
}

.alert.success {
  background: rgba(255, 255, 255, .12);
  color: var(--text);
}

.cabinet-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.download-head {
  margin-bottom: 24px;
}

.download-head h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.download-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
}

.cabinet-head h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 360px));
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.preview-panel {
  position: relative;
  display: grid;
  place-items: center;
  justify-items: center;
  align-content: center;
  gap: 16px;
  min-height: 390px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.preview-panel h2 {
  position: absolute;
  top: 24px;
  left: 24px;
  margin: 0;
}

.skin-canvas,
.cloak-canvas {
  display: block;
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
  image-rendering: pixelated;
}

.upload-form {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.panel a {
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .hero,
  .grid-three,
  .download-grid,
  .preview-grid,
  .cabinet-grid {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .cabinet-head,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }
}
