@charset "utf-8";

/* ====== Wonderland Palette ====== */
:root {
  --rose: #ffb3d9;
  --lavender: #c9b6ff;
  --mint: #a7fff1;
  --ink: #2d1b33;
  --cream: #fff9f9;
  --shadow: 0 8px 24px rgba(80, 40, 120, 0.25);
  --radius: 20px;
  --font-serif: "Playfair Display", "Cochin", "Didot", "游明朝", serif;
  --font-fantasy: "Henny Penny", "IM Fell English", cursive;
}

/* ====== Base Style ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at 50% 10%, var(--cream) 0%, #f7e6ff 70%, #fdf0ff 100%);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* ====== Header (夢の門) ====== */
header {
  text-align: center;
  margin: 5rem auto 4rem;
  position: relative;
  overflow: hidden;
}

header h1 {
  font-family: var(--font-fantasy);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: 0.05em;
  color: transparent;
  background: linear-gradient(120deg, var(--rose), var(--lavender), var(--mint));
  -webkit-background-clip: text;
  text-shadow: 0 0 12px rgba(255,200,255,0.6);
  animation: shimmer 8s linear infinite;
}


header::after {
  content: "🕰️🐇☕️";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  opacity: 0.6;
  animation: bounceIcons 4s ease-in-out infinite;
}

@keyframes bounceIcons {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

/* ====== Navigation Cards (トランプ札の庭) ====== */
nav ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  list-style: none;
  max-width: 960px;
  margin: 0 auto 5rem;
}

nav a {
  display: block;
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(255,240,250,0.7));
  border-radius: var(--radius);
  border: 3px solid rgba(200,180,255,0.4);
  box-shadow: var(--shadow);
  padding: 1.8rem 1rem;
  font-family: var(--font-fantasy);
  font-size: 1.3rem;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.03em;
  transform: rotate(calc(-3deg + 6deg * var(--r, 0)));
  transition: all 0.6s ease;
  overflow: hidden;
}

nav a::before {
  content: "♣";
  position: absolute;
  top: 8px;
  left: 10px;
  color: var(--rose);
  opacity: 0.4;
}
nav a::after {
  content: "♦";
  position: absolute;
  bottom: 8px;
  right: 12px;
  color: var(--lavender);
  opacity: 0.4;
}

nav a:hover {
  background: linear-gradient(135deg, var(--rose), var(--lavender), var(--mint));
  color: #fff;
  transform: scale(1.07) rotate(0deg);
  box-shadow: 0 12px 28px rgba(219,101,161,0.4);
  text-shadow: 0 0 6px rgba(255,255,255,0.6);
}

nav a:active {
  transform: scale(0.96);
}

/* ====== Loader (時の淵) ====== */
#loader {
  position: fixed;
  inset: 0;
  background: rgba(255,240,250,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

#loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-spinner {
  width: 70px;
  height: 70px;
  border: 5px dotted var(--rose);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 2s linear infinite;
  filter: drop-shadow(0 0 10px var(--lavender));
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  margin-top: 18px;
  font-family: var(--font-fantasy);
  font-size: 1.1rem;
  color: var(--brand);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ====== Responsive ====== */
@media (max-width: 600px) {
  nav a {
    font-size: 1.1rem;
    padding: 1.3rem;
  }
  header h1 {
    font-size: 2.3rem;
  }
}
