@import url(//fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Outfit:wght@600;700;800&display=swap);

:root {
  --font-family-sans-serif: "Noto Sans JP", "Helvetica Neue", Helvetica, Arial, Meiryo, sans-serif;
}

p {
  font-family: var(--font-family-sans-serif);
}

body.login-session {
  --hoop-auth-deep: #0c0704;
  --hoop-auth-mid: #1a0d04;
  --hoop-auth-warm: #3a1c0c;
  --hoop-auth-accent: #c35f21;
  --hoop-auth-accent-soft: #e8a06a;
  --hoop-auth-text: #f4ebe3;
  --hoop-auth-muted: #b8a394;
  --hoop-auth-panel: rgba(18, 10, 6, 0.78);
  --hoop-auth-border: rgba(232, 160, 106, 0.22);
  --hoop-auth-glow: rgba(195, 95, 33, 0.38);
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family-sans-serif);
  color: var(--hoop-auth-text);
  background: var(--hoop-auth-deep);
}

body.login-session,
body.login-session html {
  height: 100%;
}

.hoop-auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hoop-auth-bg-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 82% 8%, rgba(195, 95, 33, 0.34) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 8% 88%, rgba(21, 10, 3, 0.95) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 48% 52%, rgba(58, 28, 12, 0.5) 0%, transparent 60%),
    linear-gradient(135deg, #150a03 0%, #1a0d04 42%, #3a1c0c 78%, #5a2a12 100%);
}

.hoop-auth-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(232, 160, 106, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 160, 106, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 16%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 16%, transparent 74%);
  animation: hoop-auth-grid-pan 42s linear infinite;
}

@keyframes hoop-auth-grid-pan {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, -48px, 0); }
}

.hoop-auth-rings {
  position: absolute;
  inset: 0;
}

.hoop-auth-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(232, 160, 106, 0.16);
  box-shadow: inset 0 0 40px rgba(195, 95, 33, 0.08);
}

.hoop-auth-ring-a {
  width: 520px;
  height: 520px;
  right: -140px;
  top: -80px;
  animation: hoop-auth-spin 48s linear infinite;
}

.hoop-auth-ring-b {
  width: 340px;
  height: 340px;
  right: -50px;
  top: 10px;
  border-color: rgba(195, 95, 33, 0.22);
  animation: hoop-auth-spin 36s linear infinite reverse;
}

.hoop-auth-ring-c {
  width: 240px;
  height: 240px;
  left: -70px;
  bottom: 8%;
  animation: hoop-auth-spin 54s linear infinite;
}

@keyframes hoop-auth-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hoop-auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.58;
}

.hoop-auth-orb-1 {
  width: 280px;
  height: 280px;
  left: -70px;
  top: 14%;
  background: radial-gradient(circle, rgba(195, 95, 33, 0.5) 0%, transparent 70%);
  animation: hoop-auth-orb-drift 18s ease-in-out infinite;
}

.hoop-auth-orb-2 {
  width: 380px;
  height: 380px;
  right: -90px;
  bottom: 6%;
  background: radial-gradient(circle, rgba(232, 160, 106, 0.28) 0%, transparent 70%);
  animation: hoop-auth-orb-drift 22s ease-in-out infinite reverse;
}

.hoop-auth-orb-3 {
  width: 170px;
  height: 170px;
  left: 44%;
  top: 8%;
  background: radial-gradient(circle, rgba(195, 95, 33, 0.26) 0%, transparent 70%);
  animation: hoop-auth-orb-drift 14s ease-in-out infinite;
}

@keyframes hoop-auth-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(22px, -16px) scale(1.08); }
}

.hoop-auth-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(195, 95, 33, 0.12), transparent);
  animation: hoop-auth-scan 11s ease-in-out infinite;
}

@keyframes hoop-auth-scan {
  0% { top: -10%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 95%; opacity: 0; }
}

.hoop-auth-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-session-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 2rem;
}

.hoop-auth-shell {
  width: 100%;
  max-width: 26.5rem;
}

.hoop-auth-shell--wide {
  max-width: 32rem;
}

.hoop-auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hoop-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--hoop-auth-text);
  text-decoration: none;
}

.hoop-auth-logo-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(232, 160, 106, 0.28), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hoop-auth-logo-word {
  font-family: Outfit, "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.12em;
  color: var(--hoop-auth-accent-soft);
}

.hoop-auth-eyebrow {
  margin: 0.85rem 0 0.2rem;
  font-family: Outfit, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--hoop-auth-accent-soft);
}

.hoop-auth-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--hoop-auth-muted);
}

.hoop-auth-panel {
  position: relative;
  overflow: hidden;
  background: var(--hoop-auth-panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--hoop-auth-border);
  border-radius: 1.05rem;
  padding: 1.7rem 1.6rem 1.45rem;
  box-shadow:
    0 18px 50px rgba(12, 7, 4, 0.58),
    inset 0 1px 0 rgba(255, 236, 220, 0.08);
}

.hoop-auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(195, 95, 33, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(21, 10, 3, 0.4) 0%, transparent 55%);
  pointer-events: none;
}

.hoop-auth-panel > * {
  position: relative;
  z-index: 1;
}

.hoop-auth-panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: var(--hoop-auth-text);
}

.hoop-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.hoop-auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--hoop-auth-muted);
}

.hoop-auth-input,
body.login-session .hoop-auth-input.form-control {
  width: 100%;
  height: auto;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(232, 160, 106, 0.22);
  background: rgba(12, 7, 4, 0.62);
  color: var(--hoop-auth-text);
  font-size: 0.95rem;
  margin: 0;
}

.hoop-auth-input::placeholder {
  color: rgba(184, 163, 148, 0.7);
}

.hoop-auth-input:focus {
  outline: none;
  border-color: rgba(195, 95, 33, 0.75);
  box-shadow: 0 0 0 3px rgba(195, 95, 33, 0.22);
}

.hoop-auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--hoop-auth-muted);
  margin: 0;
}

.hoop-auth-remember input {
  accent-color: var(--hoop-auth-accent);
}

.hoop-auth-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #c35f21 0%, #5a2410 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 28px var(--hoop-auth-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hoop-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(195, 95, 33, 0.52);
}

.hoop-auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hoop-auth-links {
  margin-top: 1.15rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--hoop-auth-muted);
}

.hoop-auth-links a,
.hoop-auth-legal a,
.hoop-auth-consent a,
.hoop-auth-brief a {
  color: var(--hoop-auth-accent-soft);
  font-weight: 600;
}

.hoop-auth-links a:hover,
.hoop-auth-legal a:hover,
.hoop-auth-consent a:hover,
.hoop-auth-brief a:hover {
  color: #f6d7bb;
}

.hoop-auth-legal {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--hoop-auth-muted);
}

.hoop-auth-legal span {
  margin: 0 0.4rem;
  opacity: 0.55;
}

.hoop-auth-brief {
  margin-bottom: 1.15rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.7rem;
  background: rgba(21, 10, 3, 0.45);
  border: 1px solid rgba(232, 160, 106, 0.14);
  font-size: 0.86rem;
  color: var(--hoop-auth-muted);
}

.hoop-auth-brief-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hoop-auth-accent-soft);
}

.hoop-auth-brief ul {
  margin: 0;
  padding-left: 1.1rem;
}

.hoop-auth-brief li + li {
  margin-top: 0.35rem;
}

.hoop-auth-consent {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--hoop-auth-muted);
}

.hoop-auth-extra {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hoop-auth-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid var(--hoop-auth-border);
  color: var(--hoop-auth-accent-soft) !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.hoop-auth-ghost:hover {
  background: rgba(195, 95, 33, 0.16);
  text-decoration: none;
}

.hoop-auth-hint {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--hoop-auth-muted);
}

body.login-session #error_explanation {
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.6rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.86rem;
}

body.login-session #error_explanation h2 {
  font-size: 0.86rem;
  margin: 0 0 0.4rem;
}

body.login-session #error_explanation ul {
  margin: 0;
  padding-left: 1.1rem;
}

body.login-session .login-session-content > .alert,
body.login-session .hoop-flash-host {
  width: 100%;
  max-width: 26.5rem;
}

body.login-session .hoop-flash-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(20rem, calc(100vw - 2rem));
  pointer-events: none;
}

body.login-session .hoop-flash-host .toast.hoop-toast {
  pointer-events: auto;
  font-size: 0.8125rem;
  border-radius: 0.65rem;
}

body.login-session .modal-content {
  background: #1a0d04;
  color: var(--hoop-auth-text);
  border: 1px solid var(--hoop-auth-border);
}

body.login-session .modal-header,
body.login-session .modal-footer {
  border-color: var(--hoop-auth-border);
  background: rgba(21, 10, 3, 0.8);
}

body.login-session .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

@media (prefers-reduced-motion: reduce) {
  .hoop-auth-grid,
  .hoop-auth-orb,
  .hoop-auth-scan,
  .hoop-auth-ring {
    animation: none;
  }
}
