﻿/* ---------------------------------------------------------------- 地图内元素 */

.fill-lake {
  fill: url(#g-lake);
}

.fill-forest {
  fill: url(#g-forest);
}

.fill-mountain {
  fill: url(#g-mountain);
}

.fill-plaza {
  fill: url(#g-plaza);
}

.fill-volcano {
  fill: url(#g-volcano);
}

/*
 * 每种地形是「一条 path + 多个子路径」，合并处的边是重合的。
 * 所以不能描边（会在内部画出网格线），改用投影把整块地形托起来。
 */
.fill-lake,
.fill-forest,
.fill-mountain,
.fill-plaza,
.fill-volcano {
  filter: drop-shadow(0 4px 0 rgba(75, 58, 44, 0.1));
}

.plot {
  transition: filter 0.14s ease;
}

.plot:hover {
  filter: brightness(1.07);
}

/* 名字默认收起来，只在自己和悬停时出现 —— 否则邻居一多，标签会糊成一片 */
.nametag {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.actor:hover .nametag,
.actor.me .nametag {
  opacity: 1;
}

.nametag rect {
  fill: rgba(255, 250, 240, 0.92);
  stroke: rgba(75, 58, 44, 0.22);
  stroke-width: 1;
}

.nametag text {
  font-size: 11px;
  font-weight: 700;
  fill: var(--ink);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 250, 240, 0.9);
  stroke-width: 2.5px;
}

.actor {
  transition: opacity 0.25s ease;
}

.actor.offline {
  opacity: 0.6;
  filter: grayscale(0.35);
}

.me-ring {
  animation: spin 7s linear infinite;
  opacity: 0.85;
}

@keyframes spin {
  to {
    stroke-dashoffset: -56;
  }
}

.smoke {
  animation: smoke 5s ease-out infinite;
}

.smoke:nth-of-type(2) {
  animation-delay: 1.6s;
}

@keyframes smoke {
  0% {
    transform: translateY(0);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-30px);
    opacity: 0;
  }
}



/* ---------------------------------------------------------------- 目标格 */

.cursor {
  fill: rgba(255, 250, 240, 0.16);
  stroke: rgba(255, 250, 240, 0.8);
  stroke-width: 2.5;
}

.cursor.mine {
  fill: rgba(242, 193, 78, 0.2);
  stroke: #f2c14e;
  stroke-width: 3.2;
}

button.primary:disabled {
  background: #c3cbb6;
  box-shadow: 0 3px 0 #9aa48c;
  cursor: not-allowed;
}

button.primary:disabled:hover {
  filter: none;
}

