/* モダンな縦レイアウト。デフォルトはテキスト非表示（小さく表示） */
.floating-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 100px;
  height: 100px;
  padding: px;
  display: flex;
  flex-direction: column; /* 垂直配置：画像の下に p を置ける */
  gap: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: none;
  box-shadow: 0 6px 18px rgba(75,59,219,0.26), 0 2px 6px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 9999;
  transition: transform .16s ease, box-shadow .16s ease, opacity .12s ease, width .18s ease, height .18s ease, padding .18s ease;
  overflow: hidden;
}

.floating-button:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 36px rgba(75,59,219,0.30);
}

.floating-button:active {
  transform: translateY(-1px) scale(.99);
}


/* デフォルトではテキスト非表示（以前と同様） */
.floating-button p {
  display: none;
  margin: 0;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  color: #ffffff;
  pointer-events: none;
}

/* p を表示したいときは親に show-text クラスを付与する（縦レイアウトのまま伸ばす） */
.floating-button.show-text {
  width: 100px;
  padding: 8px 10px;
  gap: 6px;
}
.floating-button.show-text p {
  display: block;
  pointer-events: auto;
  white-space: wrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 120px;
}

.floating-button.show-text img {
  width: 50px;
  height: 50px;
}

/* 内部の画像を小さくして丸みを付ける */
.floating-button img {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

/* テキスト要素があれば非表示にしてツールチップで対応 */
.floating-button p { display: none; }


.copyright{
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; /* 要素の横幅を指定 */
  height: 20px;
  text-align: center;
  font-size: 15px;
  color: black;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  font-weight: 550;
  border-radius: 20px;
  background-color: white
}

img{
height: 100px;
width: 100px;}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}


.buttons-container {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 395px;
  height: 100px;
  border-radius: 45px;
  background: #151515;
  box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.5);
}

ul {
  list-style: none;
  width: inherit;
  height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;}
  ul li {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px;
    height: 90px;
    width: 95px;
    background: #202020;
    border-top: 1px solid #353535;
    box-shadow: 0 15px 20px 0 rgba(0, 0, 0, 0.5);
    transition: all .5s;
}
ul li:nth-of-type(1) {
      border-top-left-radius: 40px;
      border-bottom-left-radius: 40px;
    }
    ul li:last-of-type {
      border-top-right-radius: 40px;
      border-bottom-right-radius: 40px;
    }
    ul li:hover {
      cursor: pointer;
    }
    ul li a {
      display: inline-block;
      color: gray;
      text-decoration: none;
      font-size: 40px;
      transition: all .5s;
    
}

.created-by {
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  bottom: 10%;
  width: 200px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.5em;
  text-transform: uppercase;}
  .created-by p {
    color: white;
  }
  .created-by a {
    color: crimson;
    text-shadow: 0 0 15px rgba(244, 0, 0, 0.71);
    text-decoration: none;
    font-weight: 700;}
    .created-by a:hover {
      text-decoration: underline;
    }
  


.active {
  background: #151515;
  border-top: none;
  border-bottom: 1px solid #252525;
  box-shadow: inset 0 0 10px 1px rgba(0, 0, 0, 0.8);
}

.active-text {
  color: crimson;
  text-shadow: 0 0 15px rgba(220, 10, 10, 0.5);
}




      .explain-popup {
            position: fixed;
            right: 20px;
            bottom: 20px;
            max-width: 280px;
            background: rgba(255,255,255,0.98);
            color: #111;
            border: 1px solid rgba(0,0,0,0.08);
            padding: 12px 14px;
            border-radius: 10px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.12);
            font-size: 14px;
            line-height: 1.4;
            z-index: 9999;
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 220ms ease, transform 220ms ease;
            pointer-events: none;
        }
        .explain-popup.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        .explain-popup .close-btn {
            position: absolute;
            top: 6px;
            right: 8px;
            background: transparent;
            border: none;
            font-size: 16px;
            cursor: pointer;
            color: #666;
        }
        .explain-popup p { margin: 6px 0; }
        @media (max-width:420px){
            .explain-popup { right: 12px; left: 12px; max-width: none; }
        }

        /* ここから取得中（ゲーム風）スタイル */
        #loader-overlay{
            position: fixed;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: radial-gradient(ellipse at center, rgba(5,7,26,0.9) 0%, rgba(2,3,10,0.95) 60%);
            z-index: 10000;
            color: #fff;
            pointer-events: auto;
        }
        .loader-box{
            width: 320px;
            max-width: calc(100% - 40px);
            background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
            border-radius: 12px;
            padding: 18px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.6);
            text-align: center;
            font-family: monospace;
        }
        .game-row{ display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:12px; }
        .pixel{
            width:12px; height:12px; background:#ffdd57; border-radius:2px;
            box-shadow: 0 0 6px rgba(255,221,87,0.18);
            animation: run 520ms steps(2) infinite;
        }
        .pixel:nth-child(2){ animation-delay: 80ms; background:#ff9f43; }
        .pixel:nth-child(3){ animation-delay: 160ms; background:#ffd166; }
        .pixel:nth-child(4){ animation-delay: 240ms; background:#9be15d; }
        @keyframes run{
            0% { transform: translateY(0) scaleY(1); }
            50% { transform: translateY(-8px) scaleY(0.95); }
            100% { transform: translateY(0) scaleY(1); }
        }
        .loading-text{ font-size:14px; letter-spacing:1px; margin-top:6px; color:#e6e6e6; }
        .dots::after{
            content: '';
            display: inline-block;
            width: 24px;
            text-align: left;
            animation: dots 1s steps(3, end) infinite;
        }
        @keyframes dots{
            0% { content: ''; }
            33% { content: '.'; }
            66% { content: '..'; }
            100% { content: '...'; }
        }