:root {
  color: #f8f8fb;
  background: #182338;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
#artcade-auth-root {
  width: 100%;
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.artcade-auth-page {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 32px;
  background: linear-gradient(135deg, #2c2f4d 0%, #243f5b 100%);
}

.artcade-auth-card {
  width: min(100%, 520px);
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 28px;
  border: 3px solid #b7893b;
  border-radius: 0;
  background: #202231;
  box-shadow: none;
}

.artcade-auth-brand {
  margin: 0;
  color: #b7893b;
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
}

.artcade-auth-product {
  margin: 6px 0 26px;
  color: #c9cfdd;
  font-size: 1.05rem;
}

.artcade-auth-card h2 {
  margin: 0 0 8px;
  color: #f8f8fb;
  font-size: 1.35rem;
}

.artcade-auth-copy {
  margin: 0 0 20px;
  color: #c9cfdd;
  line-height: 1.45;
}

.artcade-auth-field {
  display: grid;
  gap: 7px;
  margin: 0 0 17px;
  color: #eef0f6;
  font-weight: 650;
}

.artcade-auth-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 2px solid #11131d;
  border-radius: 0;
  outline: none;
  color: #fff;
  background: #171923;
}

.artcade-auth-field input:focus-visible {
  border-color: #d1a14b;
  box-shadow: none;
}

.artcade-auth-action,
.artcade-auth-secondary,
.artcade-auth-signout {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid #11131d;
  border-radius: 0;
  cursor: pointer;
  color: #111520;
  background: #b7893b;
  font-weight: 700;
}

.artcade-auth-action {
  width: 100%;
}

.artcade-auth-action:hover,
.artcade-auth-action:focus-visible {
  border-color: #f2d38c;
  background: #c99a46;
}

.artcade-auth-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.artcade-auth-secondary {
  width: 100%;
  color: #f4f5f8;
  border-color: #11131d;
  background: #292b3e;
}

.artcade-auth-error,
.artcade-auth-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: #ffaaa4;
  line-height: 1.45;
}

.artcade-auth-status {
  color: #c9cfdd;
}

.artcade-app-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #182338;
}

.artcade-auth-signout {
  position: fixed;
  z-index: 9000;
  top: 14px;
  right: 14px;
  bottom: auto;
  min-height: 38px;
  padding: 7px 14px;
  color: #f8f8fb;
  border-color: #b7893b;
  background: #202231;
}

.artcade-auth-signout:hover,
.artcade-auth-signout:focus-visible {
  border-color: #f2d38c;
  background: #2d3047;
}

.artcade-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(12 16 28 / 78%);
}

.artcade-upload-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(100%, 540px);
  padding: 20px;
  border: 3px solid #b7893b;
  background: #202231;
}

.artcade-upload-panel strong {
  display: block;
  font-size: 1.1rem;
}

.artcade-upload-panel p {
  max-width: 300px;
  margin: 4px 0 0;
  overflow: hidden;
  color: #c9cfdd;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artcade-upload-spinner {
  width: 30px;
  height: 30px;
  border: 4px solid #53566f;
  border-top-color: #d1a14b;
  border-radius: 50%;
  animation: artcade-upload-spin 0.8s linear infinite;
}

.artcade-upload-cancel {
  width: auto;
  min-width: 92px;
}

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

@media (prefers-reduced-motion: reduce) {
  .artcade-upload-spinner { animation-duration: 1.8s; }
}

@media (max-width: 520px) {
  .artcade-upload-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .artcade-upload-cancel {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px), (max-height: 620px) {
  .artcade-auth-page {
    padding: 12px;
  }

  .artcade-auth-card {
    max-height: calc(100vh - 24px);
    padding: 20px;
  }
}
