#my-loader {
  position: fixed;
  inset: 0;
  background: #f4f7f4;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transition: opacity 1s ease;
}

#my-loader.loaded {
  opacity: 0;
  pointer-events: none;
}

/* ===== ロゴ ===== */
#my-loader .loader-logo {
  position: relative;
  z-index: 3;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  margin-bottom: 30px;

  /* グラデーション文字 */
  background: linear-gradient(90deg, #1d943c, #00ffc3, #0078ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  opacity: 0;
  animation: fadeInGlow 2s ease 0.5s forwards, shine 2.5s ease-in-out 0.5s infinite;
  text-align: center;
}

#my-loader .loader-logo span {
  color: #00ffc3;
}

/* ===== コンパス ===== */
#my-loader .compass {
  position: relative;
  z-index: 3; /* ← ロゴと同じ最前面 */
  width: 80px;
  height: 80px;
  border: 2px solid #00ffc3;
  border-radius: 50%;
  animation: spin 3s linear infinite;
  box-shadow: 0 0 10px rgba(0, 255, 195, 0.4);
}

.compass::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 2px;
  height: 35px;
  background: #00ffc3;
  transform: translateX(-50%);
  border-radius: 2px;
}

#my-loader .compass .circle {
  width: 100%;
  height: 100%;
  border: 3px solid #0078ff;
  border-radius: 50%;
  box-sizing: border-box;
  animation: rotate 2s linear infinite;
}
#my-loader .compass .needle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 40%;
  background: #ff3b3b;
  transform-origin: bottom center;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: needleRotate 1.5s linear infinite;
}

/* ===== 背景グリッド ===== */
#my-loader .grid-lines {
  position: absolute;
  inset: 0;
  z-index: 1; /* ← 背景側に */
  background: repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 20px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 20px
    );
  background-size: 100% 100%;
  animation: gridMove 8s linear infinite;
  opacity: 0.4; /* ← 薄くしてチカチカを抑える */
}

/* ===== アニメーション ===== */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes needleRotate {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg);
  }
}
@keyframes gridMove {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: -40px -40px, -40px -40px;
  }
}
/* フェードイン＋少し浮かせる */
@keyframes fadeInGlow {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 光の動き（左から右にハイライトが流れる） */
@keyframes shine {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

