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

html, body {
  width: 100%;
  height: 100%;
  background: #05010c;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #e9dcff;
}

/* ===== Главная страница ===== */
/* Сцена всегда 16:9 и вписывается в экран, фото стоят в процентах */
.stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100vw, calc(100vh * 1672 / 941));
  aspect-ratio: 1672 / 941;
  transform: translate(-50%, -50%);
  background: url("bg.png") center / 100% 100% no-repeat;
}

.photo,
.photo-link {
  position: absolute;
  width: 46.0%;
  height: 41.2%;
}

.photo {
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.photo-link .photo {
  position: static;
  width: 100%;
  height: 100%;
}

/* Позиции под рамки на фоне */
.p1 { left: 2.5%;  top: 5.5%; }
.p2 { left: 51.6%; top: 5.5%; }
.p3 { left: 2.5%;  top: 52.9%; }
.p4 { left: 51.6%; top: 52.9%; }

.zoomable,
.photo-link {
  cursor: pointer;
  transition: filter .2s, box-shadow .2s;
}
.zoomable:hover,
.photo-link:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 24px rgba(160, 80, 255, .7);
}

/* ===== Увеличенное фото ===== */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 1, 12, .88);
  z-index: 10;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border: 2px solid #8a2be2;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(138, 43, 226, .6);
  animation: zoomIn .25s ease;
}

@keyframes zoomIn {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ===== Страница с никнеймами ===== */
.team-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("bg.png") center / cover no-repeat #05010c;
  overflow: auto;
}

.team-card {
  width: min(92vw, 520px);
  padding: 36px 28px;
  text-align: center;
  background: rgba(15, 4, 32, .78);
  border: 2px solid #8a2be2;
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(138, 43, 226, .45);
}

.team-icon {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 14px rgba(160, 80, 255, .8));
}

.team-name {
  font-size: 28px;
  margin-bottom: 24px;
  color: #fff;
}

.players {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.players li {
  padding: 12px 16px;
  font-size: 20px;
  background: rgba(138, 43, 226, .18);
  border: 1px solid rgba(160, 80, 255, .6);
  border-radius: 8px;
}

.back {
  display: inline-block;
  padding: 10px 28px;
  color: #fff;
  text-decoration: none;
  background: #6a1fc2;
  border-radius: 8px;
  transition: background .2s;
}
.back:hover { background: #8a2be2; }
