
body {
  margin: 0;
  font-family: "Yu Gothic", sans-serif;
  background: #000;
  color: #fff;
}

/* ===== ローダー ===== */
#loader {
  position: fixed;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle, #5a4300, #000);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
}

.loader-text {
  font-size: 1.5em;
  color: gold;
  text-shadow: 0 0 10px gold;
  animation: blink 1.5s infinite;
}

.loader-bar {
  width: 200px;
  height: 6px;
  background: #222;
  overflow: hidden;
}

.loader-bar::before {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(to right, transparent, gold, transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

@keyframes blink {
  50% { opacity: 0.5; }
}

.fade-out {
  opacity: 0;
  transition: 1s;
  pointer-events: none;
}

/* ===== 背景 ===== */
.sky {
  position: fixed;
  width: 100%;
  height: 100vh;
  z-index: -1;

  background:
    radial-gradient(circle at center, rgba(255,215,0,0.2), transparent 40%),
    linear-gradient(180deg, #4d3900, #1a1300, #000);
}

.sparkle {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(gold 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.3;
  animation: sparkleMove 10s linear infinite;
}

@keyframes sparkleMove {
  from { transform: translateY(0); }
  to { transform: translateY(25px); }
}

/* ===== 王冠 ===== */
.crown {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 70px;

  filter: drop-shadow(0 0 6px gold);
  opacity: 0.9;

  animation: crownMove 12s linear infinite;
}

@keyframes crownMove {
  0% { transform: translateX(-50%) rotate(0deg); }
  50% { transform: translateX(-50%) rotate(180deg) translateY(-8px); }
  100% { transform: translateX(-50%) rotate(360deg); }
}

/* ===== メイン ===== */
main {
  max-width: 700px;
  margin: auto;
  padding: 60px 20px;
}

/* タイトル */
h1 {
  text-align: center;
  color: gold;

  text-shadow:
    0 0 10px gold,
    0 0 20px rgba(255,215,0,0.8);
}

/* ===== カード ===== */
.diary article {
  position: relative;
  margin-bottom: 40px;
  padding: 20px;
  border-radius: 12px;

  background: linear-gradient(
    135deg,
    rgba(255,215,0,0.15),
    rgba(0,0,0,0.85)
  );

  border: 2px solid gold;

  box-shadow:
    0 0 15px rgba(255,215,0,0.4),
    inset 0 0 10px rgba(255,215,0,0.2);

  overflow: hidden;
  transition: 0.4s;
  cursor: pointer;
}

/* 光 */
.diary article::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent
  );

  transform: skewX(-20deg);
  animation: shineLoop 6s infinite linear;
}

@keyframes shineLoop {
  0% { left: -60%; }
  100% { left: 160%; }
}

/* ホバー */
.diary article:hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.85),
    transparent
  );

  transform: skewX(-20deg);
  animation: shineHit 0.7s;
}

@keyframes shineHit {
  to { left: 150%; }
}

.diary article:hover {
  transform: scale(1.04);
  box-shadow:
    0 0 30px gold,
    inset 0 0 20px rgba(255,215,0,0.6);
}

/* push */
.diary article:active {
  transform: scale(0.98);
}

/* ===== 詳細 ===== */
.detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: 0.4s;
  margin-top: 10px;
}

/* 開状態 */
article.open .detail {
  max-height: 200px;
  opacity: 1;
}
