body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #0d1b2a, #1b263b, #415a77);
  color: #ffffff;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
  overflow-x: hidden;

  /* 最初から透明にしない */
  opacity: 1;
}

main, header, footer, .mini-links {
  opacity: 0;
  transition: opacity 1s ease-out;
}

body.page-loaded main,
body.page-loaded header,
body.page-loaded footer,
body.page-loaded .mini-links {
  opacity: 1;
  animation: pageFadeIn 1.2s ease-out both;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent url('asfalt-light.png') repeat;
  opacity: 0.3;
  z-index: 0;
}

#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease, visibility 1s ease;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loader .logo {
  color: #fff;
  font-size: 2.5em;
  font-weight: bold;
  font-family: 'Segoe UI', sans-serif;
  user-select: none;
  z-index: 10000;
}

header {
  text-align: center;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
}

header h1 {
  margin: 0;
  font-size: 2.5em;
  color: #e0eaff;
}

.mini-links {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  z-index: 1;
}

.mini-links a {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 12px 20px;
  color: #e0eaff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s, transform 0.3s;
}

.mini-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.card-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  width: 280px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: float 6s ease-in-out infinite;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.card img {
  width: 100%;
  border-radius: 10px;
  height: 180px;
  object-fit: cover;
  margin-bottom: 15px;
}

.card h2 {
  margin: 10px 0;
  font-size: 1.4em;
  color: #f0f8ff;
}

.card p {
  font-size: 0.95em;
  color: #cfd8dc;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #90a4ae;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) {
  animation-delay: 0s;
}

.card:nth-child(2) {
  animation-delay: 1s;
}

.card:nth-child(3) {
  animation-delay: 2s;
}
