html, body { background: transparent; }
body { padding: 0; margin: 0 }
#tuanjie-container {
  position: fixed;
  background: transparent;
}
#tuanjie-container.tuanjie-show-gradient {
  background: radial-gradient(circle closest-corner at 50% 42%, #A36CFF, #6e2fd6 90%);
}
#tuanjie-container.tuanjie-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
#tuanjie-container.tuanjie-mobile {
  width: 100%;
  height: 100%;
}
#tuanjie-canvas {
  position: fixed;
  z-index: 0;
  background: transparent;
}
.tuanjie-mobile #tuanjie-canvas {
  position: fixed;
  width: 100%;
  height: 100%;
}
#discord-loading-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #12061c;
  color: #fff;
  font-family: "Arial Rounded MT Bold", "Segoe UI", Arial, sans-serif;
  user-select: none;
  transition: opacity .45s ease;
}
#discord-loading-shell.discord-loading-hide {
  opacity: 0;
  pointer-events: none;
}
#tuanjie-loading-bar {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 80% at 50% 30%, #3b1457 0%, #1a0829 75%);
  text-align: center;
}
.discord-loading-ambient {
  position: absolute;
  inset: -10%;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(28px) saturate(1.3) brightness(.55);
  transform: scale(1.1);
}
.discord-loading-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,8,41,.55) 0%, rgba(26,8,41,.1) 40%, rgba(26,8,41,.95) 100%);
}
.discord-loading-top {
  position: relative;
  z-index: 2;
  padding: 18px 24px 4px;
}
.discord-loading-logo {
  display: block;
  width: auto;
  height: clamp(72px, 12vh, 120px);
  max-width: min(70%, 460px);
  margin: 0 auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.45));
}
.discord-loading-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.discord-loading-tag {
  padding: 8px 16px;
  border: 1.5px solid rgba(255,210,63,.8);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(105,48,158,.88) 0%, rgba(68,22,106,.92) 100%);
  box-shadow: 0 3px 8px rgba(0,0,0,.35), 0 0 10px rgba(255,210,63,.2);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.discord-loading-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.discord-loading-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.discord-loading-track {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  will-change: transform;
}
.discord-loading-stage.discord-layout-ready .discord-loading-track {
  visibility: visible;
}
.discord-loading-slide {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .55;
  transform: scale(.88);
  transition: transform .35s ease, opacity .35s ease;
}
.discord-loading-slide.active {
  opacity: 1;
  transform: scale(1);
}
.discord-loading-stage.discord-carousel-normalizing .discord-loading-slide {
  transition: none;
}
.discord-loading-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #2a0f3d;
  box-shadow: 0 12px 34px rgba(0,0,0,.55), 0 0 0 3px rgba(255,210,63,.85);
}
.discord-loading-slide:not(.active) .discord-loading-card {
  box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.25);
}
.discord-loading-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.discord-loading-arrow {
  visibility: hidden;
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 36px;
  transform: translateY(-50%);
}
.discord-loading-stage.discord-layout-ready .discord-loading-arrow {
  visibility: visible;
}
.discord-loading-arrow-left { left: 18px; }
.discord-loading-arrow-right { right: 18px; }
.discord-loading-arrow:focus-visible,
.discord-loading-dot:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}
.discord-loading-bottom {
  position: relative;
  z-index: 2;
  width: min(62%, 920px);
  margin: 0 auto;
  padding: 8px 0 32px;
}
.discord-loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.discord-loading-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: width .3s, background .3s;
}
.discord-loading-dot.on {
  width: 24px;
  background: #ffd23f;
}
.discord-loading-caption {
  display: block;
  min-height: 36px;
  margin: 2px 0 12px;
  overflow: hidden;
  font-size: 22px;
  font-weight: 700;
  line-height: 36px;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.discord-loading-caption b {
  color: #ffd23f;
}
#tuanjie-progress-bar-empty {
  position: relative;
  display: block;
  width: 100%;
  height: 22px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.65), 0 2px 10px rgba(0,0,0,.35);
}
#tuanjie-progress-bar-full {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0a0 0%, #ffd23f 40%, #ff9f1c 100%);
  box-shadow: 0 0 16px rgba(255,210,63,.8);
}
#discord-progress-shine {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.25) 0 12px, transparent 12px 24px);
  animation: discord-progress-stripe 1s linear infinite;
}
@keyframes discord-progress-stripe {
  from { background-position: 0 0; }
  to { background-position: 33.9px 0; }
}
.discord-loading-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 16px;
}
#discord-loading-status {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.discord-loading-status-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 4px;
  font-size: 8px;
  vertical-align: middle;
}
.discord-loading-status-dots span {
  opacity: .35;
  animation: discord-loading-dot 1.2s ease-in-out infinite;
}
.discord-loading-status-dots span:nth-child(2) { animation-delay: .2s; }
.discord-loading-status-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes discord-loading-dot {
  0%, 60%, 100% { opacity: .35; }
  30% { opacity: 1; }
}
#tuanjie-progress-text {
  flex: none;
  color: #ffd23f;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#startup-icon {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 256px;
  height: 148px;
  background: url('captain-game-logo.png') center / cover no-repeat;
  box-shadow: none;
  display: none;
}
#tuanjie-warning {
  position: fixed;
  left: 50%;
  top: 5%;
  z-index: 110;
  display: none;
  width: min(90vw, 520px);
  transform: translateX(-50%);
  background: white;
  padding: 10px;
}
@media (max-height: 640px) {
  .discord-loading-top { padding-top: 10px; }
  .discord-loading-logo { height: clamp(52px, 9vh, 72px); margin-bottom: 8px; }
  .discord-loading-bottom { padding-bottom: 16px; }
  .discord-loading-tag { padding: 6px 12px; font-size: 14px; }
  .discord-loading-caption { min-height: 28px; line-height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .discord-loading-status-dots span,
  #discord-progress-shine { animation: none; }
  .discord-loading-slide,
  .discord-loading-track,
  #tuanjie-progress-bar-full,
  #discord-loading-shell { transition: none !important; }
  .discord-loading-status-dots span { opacity: .75; }
  #discord-progress-shine { display: none; }
}
