body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #3a0d0d 0%, #1a0505 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.wrapper { max-width: 900px; }

.text-title { letter-spacing: 0.08em; font-weight: 700; }

.card-wrap {
  background-color: #5a2d2d6b;
  border-radius: 8px;
  padding: 1.5rem 1.5rem 0.5rem;
}

.list-game .tile { text-align: center; }

.list-game .tile img {
  width: 80%;
  object-fit: cover;
  background-color: #fff;
  border-radius: 5px;
  display: block;
  margin: 0 auto;
}

.list-game .tile a { display: block; cursor: pointer; }

.list-game { opacity: 0; }
.list-game.show { animation: fadeIn 1s linear forwards; }
@keyframes fadeIn { to { opacity: 1; } }

.user-corner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1030;
}

.avatar-btn {
  background: transparent;
  border: 0;
  padding: 0;
}
.avatar-btn::after { display: none; }

.passcode-progress {
  height: 26px;
  border-radius: 13px;
  background: #efeaea;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.passcode-progress .progress-bar {
  background-color: transparent;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent),
    linear-gradient(90deg, #3a0d0d 0%, #1a0505 100%);
  background-size: 1rem 1rem, auto;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
  transition: none;
}

.game-view {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: #000;
}
.game-view iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.game-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-close:hover { background: rgba(0, 0, 0, 0.85); }

.fab-ai-container {
  position: absolute;
  cursor: grab;
  user-select: none;
  z-index: 3;
  touch-action: none;
  animation: fabBounce 1.8s ease-in-out infinite;
  will-change: transform;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}
.fab-ai-container:active { cursor: grabbing; }
.fab-ai-container.dragging { animation: none; }

.fab-ai {
  width: 110px;
  height: 110px;
  object-fit: contain;
  -webkit-user-drag: none;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.fab-ai-bubble {
  background: #fff;
  color: #000;
  border: 3px solid #000;
  border-radius: 28px;
  padding: 14px 24px;
  min-width: 100px;
  max-width: 260px;
  font-size: 1rem;
  line-height: 1.2;
  font-style: italic;
  font-weight: 700;
  text-align: left;
  position: relative;
  word-break: break-word;
  white-space: pre-wrap;
  box-sizing: border-box;
  margin-top: -20px;
  margin-left: -20px;
}
.fab-ai-bubble::before {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -24px;
  width: 0;
  height: 0;
  border-top: 24px solid #000;
  border-right: 32px solid transparent;
}
.fab-ai-bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -18px;
  width: 0;
  height: 0;
  border-top: 18px solid #fff;
  border-right: 24px solid transparent;
}

@keyframes fabBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.page-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #3a0d0d 0%, #1a0505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.4s ease;
}
.page-loader.hide { opacity: 0; pointer-events: none; }

.dots-loader { display: flex; gap: 0.7rem; }
.dots-loader span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: dotBounce 1.4s infinite ease-in-out both;
}
.dots-loader span:nth-child(1) { background: #4285f4; animation-delay: -0.32s; }
.dots-loader span:nth-child(2) { background: #34a853; animation-delay: -0.16s; }
.dots-loader span:nth-child(3) { background: #fbbc04; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.5; }
  40%           { transform: scale(1);   opacity: 1;   }
}

.tile-loader {
  width: 80%;
  height: 110px;
  margin: 0 auto;
  background: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.tile-loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: dotBounce 1.4s infinite ease-in-out both;
}
.tile-loader span:nth-child(1) { background: #4285f4; animation-delay: -0.32s; }
.tile-loader span:nth-child(2) { background: #34a853; animation-delay: -0.16s; }
.tile-loader span:nth-child(3) { background: #fbbc04; }

.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0a800;
  color: #1a0505;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
