:root {
  --bg-color: #0d0113;
  --primary: #ff007f;
  --secondary: #7000ff;
  --accent: #ff00e6;
  --text-main: #ffffff;
  --text-muted: #ffb3d9;
  --glass-bg: rgba(20, 5, 30, 0.6);
  --glass-border: rgba(255, 0, 128, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  /* 修复：改为 flex-start，这样当内容超出屏幕时最顶部不会被遮挡，能滑上去 */
  align-items: flex-start; 
  /* 修复：将完全隐藏滚动条改为仅隐藏横向滚动条，允许手机端上下滑动 */
  overflow-x: hidden; 
}

/* 移动端主容器 */
.app-container {
  width: 100%;
  max-width: 480px; /* 适配移动端并在PC上居中显示 */
  /* 修复：改为 min-height，允许小屏幕上内容撑大容器产生滚动条 */
  min-height: 100vh; 
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 1.5rem;
  z-index: 1;
}

/* --- 背景毛玻璃光效 --- */
.background-effects {
  /* 修复：改为 position: fixed 这样上下滑动时背景特效不会跟着滚动而断层 */
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  /* 修复：穿透所有点击事件，绝对保证特效不遮挡底层按钮点击 */
  pointer-events: none; 
  background: radial-gradient(circle at 50% 50%, #150222 0%, #0d0113 100%);
}

.blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.5;
  animation: float 8s infinite alternate ease-in-out;
}

.blob-1 {
  top: -5%;
  left: -20%;
  width: 350px;
  height: 350px;
  background: var(--primary);
  opacity: 0.4;
}

.blob-2 {
  bottom: 10%;
  right: -20%;
  width: 250px;
  height: 250px;
  background: var(--secondary);
  animation-delay: -4s;
}

.blob-3 {
  top: 40%;
  left: 20%;
  width: 200px;
  height: 200px;
  background: var(--accent);
  opacity: 0.3;
  animation-duration: 12s;
}

.noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 40px) scale(1.1); }
}

/* --- 头部标题区 --- */
.header {
  text-align: center;
  animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tag {
  display: inline-block;
  background: linear-gradient(90deg, #ff007f, #7000ff);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(255, 0, 128, 0.4);
  animation: throb 2s infinite;
}

@keyframes throb {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 0, 128, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 0, 128, 0.7); }
}

.title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 4rem;
  color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #ffb3d9 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 2px 2px 20px rgba(255, 0, 128, 0.3);
  margin-bottom: 0.5rem;
  line-height: 1.1;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.9;
}

/* --- 队伍成员区 --- */
.team-section {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

.player-grid > div:nth-child(5) {
  grid-column: span 2;
  justify-self: center;
  width: 70%; 
}

.player-slot {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.2rem 0.8rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.5s ease-out backwards;
}

/* 依次浮现动画 */
.player-slot:nth-child(1) { animation-delay: 0.1s; }
.player-slot:nth-child(2) { animation-delay: 0.2s; }
.player-slot:nth-child(3) { animation-delay: 0.3s; }
.player-slot:nth-child(4) { animation-delay: 0.4s; }
.player-slot.empty { animation-delay: 0.6s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.player-slot.filled:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(255, 0, 128, 0.2);
}

.player-slot img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  margin-bottom: 0.6rem;
  object-fit: cover;
  background-color: #fff;
}

.role {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
}

/* 缺人位特殊样式 */
.player-slot.empty {
  border: 2px dashed var(--primary);
  background: rgba(255, 0, 128, 0.08);
  cursor: pointer;
  min-height: 120px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.player-slot.empty::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

.player-slot.empty.pulse {
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 10px rgba(255, 0, 128, 0.2); }
  to { box-shadow: 0 0 30px rgba(255, 0, 128, 0.6); }
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.add-icon {
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--primary);
}

.role.waiting {
  color: #fff;
  font-size: 1.1rem;
}

.status.blink {
  color: var(--primary);
  background: rgba(255, 0, 128, 0.2);
  margin-top: 0.3rem;
  animation: blinkText 1.5s infinite;
}

@keyframes blinkText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- 底部操作区 --- */
.footer {
  text-align: center;
  animation: slideUp 0.8s ease-out;
  margin-top: auto; 
  padding-bottom: 2rem;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.action-btn {
  position: relative;
  background: linear-gradient(45deg, #ff007f, #7000ff, #ff007f);
  background-size: 200% auto;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 1.2rem 2rem;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(112, 0, 255, 0.4);
  transition: all 0.3s ease;
  width: 100%;
  animation: gradientText 3s linear infinite;
  /* 确保按钮能被点击 */
  z-index: 10;
}

@keyframes gradientText {
  to { background-position: 200% center; }
}

.action-btn:active {
  transform: scale(0.96);
  box-shadow: 0 5px 15px rgba(112, 0, 255, 0.4);
}

.btn-text {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1;
}

.action-btn:hover .btn-glow {
  opacity: 1;
  transform: scale(1);
  animation: rotate-glow 3s linear infinite;
}

@keyframes rotate-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.disclaimer {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}
