@charset "utf-8";

/* ========== BASE ========== */

body {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}

/* ========== LOADER ========== */

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

.loader {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar {
  width: 150px;
  height: 4px;
  border-radius: 999px;
  background: #0bf;
  opacity: 0;
  animation: barAnimation 1.5s infinite ease-in-out;
}

.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes barAnimation {
  0%, 100% {
    transform: scaleX(0);
    opacity: 0;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

body.loaded {
  color: #000;
}

body.loaded #loader {
  opacity: 0;
  pointer-events: none;
}

.content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* ========== Glow Effect on Button ========== */

.glow-bg {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.glow-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #08f;
  opacity: 0.5;
  animation: fadeGlow 1.5s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes fadeGlow {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ========== Gradient Border ========== */

.gradient-background {
  position: relative;
  width: 100%;
  height: 3px;
  overflow: hidden;
}

.gradient-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(0, 136, 255, 0) 0%,
    rgba(0, 136, 255, 0.8) 50%,
    rgba(0, 136, 255, 0) 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  animation: blue-expand-fade 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes blue-expand-fade {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  40%,
  60% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}
