/* =============================
   全体リセットと基本設定
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --glow-color-strong: rgba(136, 221, 211, 0.5);
  --glow-color-mid: rgba(136, 221, 211, 0.2);
  --glow-color-faint: rgba(200, 240, 255, 0.0);
}

body {
  width: 100vw;
  height: 100vh;
  font-family: 'Helvetica Neue', YuGothic,'Yu Gothic', sans-serif;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: background 1s ease, filter 1s ease, opacity 1s ease;
}

/* =============================
   背景画像とフィルター処理
============================= */
#body {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 1s ease;
}

#bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: filter 0.8s ease, background-image 1s ease;
  transform: scale(1.1); /* 少し拡大 */
}

#overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 1s ease, opacity 1s ease;
}

/* =============================
   夜間モード（全体暗色系）
============================= */
body.night {
  color: #f0f0f0;
  transition: background-color 1s ease;
  background-color: black;
}

/* =============================
   月光演出（四隅の光）
============================= */
.edge-glow {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(12px);
  opacity: var(--moon-opacity, 0);
  transition: all 0.8s ease;
}

.top-glow {
  top: 0;
  left: 0;
  width: 100%;
  height: 20vw;
  background: linear-gradient(to bottom, var(--glow-color-strong), var(--glow-color-mid) 40%, var(--glow-color-faint));
}

.bottom-glow {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3vw;
  background: linear-gradient(to top, var(--glow-color-strong), var(--glow-color-mid) 40%, var(--glow-color-faint));
}

.left-glow {
  top: 0;
  left: 0;
  width: 3vw;
  height: 100%;
  background: linear-gradient(to right, var(--glow-color-strong), var(--glow-color-mid) 40%, var(--glow-color-faint));
}

.right-glow {
  top: 0;
  right: 0;
  width: 3vw;
  height: 100%;
  background: linear-gradient(to left, var(--glow-color-strong), var(--glow-color-mid) 40%, var(--glow-color-faint));
}

/* =============================
   コントロールUI（天気/地域/モード）
============================= */
#controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 110;
}

#controls select {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: none;
  font-size: 0.9rem;
}

#prefSelect, #modeSelect {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s, background-color 0.3s;
}

#prefSelect:hover, #modeSelect:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.15);
}

#prefSelect:focus, #modeSelect:focus {
  outline: none;
  border-color: #c0f0ff;
  box-shadow: 0 0 0 2px rgba(192, 240, 255, 0.3);
}

/* =============================
   時計とタイマー
============================= */
#clock-container {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: white;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin-right: 0.5rem;
}

#controls {
  display: flex;
  align-items: center;
}


/* =============================
   ロゴ表示（中央）
============================= */
#logo-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: "Ballet", cursive;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 200px;
  color:white !important;
  z-index: 10000;
  opacity: 0.7;
  text-shadow: 2px 2px 10px #808080;
}

#logo {
  width: 200px;
  height: auto;
  opacity: 0.9;
  transition: opacity 1s ease;
}

/* =============================
   音楽プレイヤー
============================= */
#player-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.7)!important;
  color: #000;
  padding: 0.4rem 0.9rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 30;
  transition: background 0.3s;
}
.player-hint {
position: fixed;
  bottom: 2rem;
  left: 4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}


#player-toggle:hover {
  background: rgba(255, 255, 255, 1)!important;
}

#player-container {
  position: fixed;
  bottom: 3.5rem;
  left: 1rem;
  width: 300px;
  background: rgba(255, 255, 255, 0.398)!important;
  backdrop-filter: blur(6px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 20;
}

#player-container.collapsed {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}


#quote-box {
  position: fixed;
  bottom: 3em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  color: #f5f5f5;
  opacity: 0.85;
  pointer-events: none;
  font-style: italic;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
#quote-credit {
  position: fixed;
  bottom: 1.5em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-top: 0.2rem;
  pointer-events: auto;
  z-index: 20;
}

#quote-credit a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

#quote-credit a:hover {
  text-decoration: underline;
  color: rgba(255, 255, 255, 0.6);
}

#detail-icon{
  position:absolute;
  bottom: 1em;
  right: 1rem;
  z-index:5000;
  background: rgba(255, 255, 255,0.6);
  padding: 0.4rem 0.9rem;
  border-radius: 50%;}


#status-display {
  position: fixed;
  bottom: -100px; /* 初期は隠れてる */
  right: 10px;
  max-width:95%;
  font-size: 12px;
  font-family: sans-serif;
  color: #ccc;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 10px;
  border-radius: 6px;
  z-index: 9999;
  line-height: 1.4;
  transition: bottom 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}
#status-display a{text-decoration: none;color: #ccc;}
body.show-status #status-display {
  bottom: 10px;
  opacity: 1;
}




#raindrops {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 50vw;
  height: 50vh;
  pointer-events: none;
  z-index: 50;
  filter: blur(2px);
}

.raindrop {
  position: absolute;
  border:1px solid rgb(173, 216, 230);
  border-radius: 50%;
  animation: fall 1.5s infinite ease-in;
}

@keyframes fall {
  0% {  opacity: 0.7; }
  100% {  opacity: 0.6; }
}

.status-toggle {
  position: fixed;
  top: 1em;
  left: 1em;
  z-index: 200;
  font-size: 1.2rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255,0.3);
  padding: 0.4rem 1rem;
  display: none;
  color:white;
}


@media screen and (max-width: 768px) {
	/* 480px以下に適用されるCSS（スマホ用） */
  #logo-container { font-size: 80px;}
  .player-hint{display: none;}
  #status-display {
  background: rgba(0, 0, 0, 0.8);
  right: 2.5%;}
  #quote-box{font-size: 0.6em;bottom:8em;text-align: center;}
   .status-toggle {
    display: block;
  }
  #detail-icon{display: none;}
}