/* 全体の基本設定 */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #e3f7ff;
  background-size: 300% 300%;
  animation: bgMove 20s ease infinite;
  overflow-x: hidden;
}

/* 背景アニメーション */
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ヒーロー部分（上の大きい背景） */
.hero {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #cff1ff, #c4e7ff);
  background-size: 400% 400%;
  animation: bgMove2 6s infinite linear;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes bgMove2 {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* タイトルのアニメーション（使ってるページ用） */
.hero-title {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px #ff00ff, 0 0 20px #0cf;
  animation: textBounce 1.5s infinite ease-in-out;
}

@keyframes textBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* 上のナビゲーション */
.top-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  background: #fff;
  padding: 12px;
  border-bottom: 3px solid #6cf;
}

.top-nav a {
  text-decoration: none;
  font-weight: 700;
  color: #09c;
  padding: 6px 12px;
  border-radius: 6px;
  transition: 0.2s;
}

.top-nav a:hover {
  background: #e0f7ff;
  transform: scale(1.1);
}

.top-nav .active {
  background: #6cf;
  color: #fff;
}

/* ホームのカード類 */
.info-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  gap: 20px;
}

.info-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 3px solid #6cf;
  box-shadow: 0 0 10px rgba(0,150,255,.3);
  transition: 0.25s;
}

.info-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,215,0,.6);
  border-color: #fc0;
}

.info-card h2 {
  margin-top: 0;
  color: #00a7f5;
}

.info-card p {
  color: #47aff5;
}

/* 小さいヒーロー（別ページ用） */
.small-hero {
  height: 150px;
  background: linear-gradient(135deg, #4ac7ff, #0066ff);
  background-size: 400% 400%;
  animation: bgMove2 6s infinite linear;
}

/* ダウンロードページ */
.download-section {
  max-width:800px;
  margin: 30px auto;
  padding: 0 20px;
  text-align: center;
}

.download-section h2 {
  color: #00a7f5;
}

.download-section h1,
.download-section h3,
.download-section p {
  color: #30bfff;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ダウンロードボタン */
.dl-btn {
  display: block;
  padding: 18px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: #09c;
  background: #fff;
  border: 3px solid #6cf;
  box-shadow: 0 0 15px rgba(0,0,0,.15);
  transition: 0.25s;
  margin-bottom: 10px;
}

.dl-btn:hover {
  transform: scale(1.08);
  background: #e6f7ff;
  box-shadow: 0 0 25px rgba(0,150,255,.5);
}

/* コミュニティページ */
.community-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.community-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comm-btn {
  display: block;
  padding: 20px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  border: 3px solid #fff;
  transition: 0.25s;
}

.comm-btn.oc { background: #9fe57f; }
.comm-btn.dc { background: #86aaff; }
.comm-btn.yt { background: #ff6f6f; }

.comm-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(255,255,255,.8);
}

/* スクリプトページ */
.script-section {
  padding: 0 25px;
  text-align: center;
}

.select-toggle {
  display: block;
  margin: 0 auto 20px auto;
  padding: 12px 18px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
  border: 3px solid #6cf;
  background: #fff;
  color: #09c;
  cursor: pointer;
  transition: 0.25s;
}

h2 {
  color: #00a7f5;
}

.category-list.hidden {
  display: none;
}

.category-table {
  background: #fff;
  border: 3px solid #6cf;
  border-radius: 12px;
  padding: 15px;
  max-width: 450px;
  margin: 0 auto 30px auto;
  display: grid;
  gap: 10px;
}

.cat-btn {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  border: 2px solid #6cf;
  background: #fff;
  color: #09c;
  cursor: pointer;
  transition: 0.25s;
}

.cat-btn:hover {
  background: #e6f7ff;
  transform: scale(1.05);
}

/* スクリプトカード */
.script-card {
  background: #fff;
  border: 3px solid #6cf;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 20px;
  text-align: left;
  box-shadow: 0 0 15px rgba(0,0,0,.15);
}

.script-body {
  background: #f0faff;
  border: 2px solid #b3e7ff;
  padding: 10px;
  border-radius: 8px;
  height: 70px;
  overflow-y: scroll;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

/* タップエフェクト */
.tap-effect {
  position: relative;
  overflow: hidden;
}

.tap-effect::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.6), transparent);
  transition: 0.4s;
}

.tap-effect:active::after {
  left: 100%;
}

/* クリック時の波紋 */
.tap-ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid #6cf;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  from { transform: translate(-50%, -50%) scale(.2); opacity: 1; }
  to   { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* 浮遊ライト（背景演出） */
#floating-lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.light-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #6cf;
  border-radius: 50%;
  opacity: .7;
  animation: floatUp 6s linear infinite;
  z-index: -2; /* ← これを追加するだけで直る */
}

@keyframes floatUp {
  from { transform: translateY(0); opacity: .7; }
  to   { transform: translateY(-200px); opacity: 0; }
}

/* 流れ星 */
.shooting-star {
  position: fixed;
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, #66ccff, transparent);
  opacity: .8;
  transform: rotate(45deg);
  pointer-events: none;
  animation: starMove 1s linear forwards;
}

@keyframes starMove {
  from { transform: translate(0,0) rotate(45deg); opacity: 1; }
  to   { transform: translate(300px,300px) rotate(45deg); opacity: 0; }
}

/* 中央のリング背景 */
.bg-ring {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  border: 3px solid rgba(102,204,255,.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ringSpin 25s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes ringSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* マウスのライン演出 */
.pointer-line {
  position: fixed;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #66ccff, transparent);
  pointer-events: none;
  transform-origin: left center;
  opacity: .9;
  animation: lineFade 0.4s linear forwards;
  z-index: 9999;
}

@keyframes lineFade {
  from { opacity: 1; transform: scaleX(1); }
  to   { opacity: 0; transform: scaleX(0); }
}

/* マウス追従ライン */
.cursor-follow-line {
  position: fixed;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #66ccff, transparent);
  pointer-events: none;
  transform-origin: left center;
  z-index: 9999;
  border-radius: 2px;
}

/* マウスの点 */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #6cf;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity 0.25s linear, transform 0.25s linear;
  z-index: 9999;
}

/* Q&A セクション */
.qa-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.qa-box {
  margin-bottom: 8px;
  background: #fff;
  border-left: 6px solid #6cf;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 0 15px rgba(0,150,255,.25);
  transition: 0.25s;
  width: fit-content;
  max-width: 100%;
}

.qa-box:hover {
  transform: translateX(10px);
  box-shadow: 0 0 25px rgba(255,215,0,.6);
  border-left-color: #fc0;
}

.qa-q {
  font-size: 20px;
  font-weight: 700;
  color: #09c;
  margin-bottom: 8px;
  text-align: left;
}

.qa-a {
  font-size: 16px;
  color: #19afe6;
  line-height: 1.6;
  text-align: left;
}

/* コピーボタン */
.copy-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  padding: 8px 14px;
  background: #6cf;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.copy-btn:hover {
  background: #09c;
  transform: scale(1.05);
}

.copy-msg {
  font-size: 14px;
  color: #78d1f5;
  font-weight: 700;
}

/* ダウンロードタイトル */
.dl-title {
  font-size: 26px;
  font-weight: 900;
  color: #00a7f5;
  margin: 40px 0 10px 0;
  border-left: 6px solid #6cf;
  padding-left: 12px;
}

/* Q&A の説明文 */
.qa-info-simple {
  font-size: 18px;
  color: #222;
  margin-bottom: 20px;
  padding: 0;
  line-height: 1.5;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .qa-q { font-size: 16px; }
  .qa-a { font-size: 14px; }

  .hero {
    height: 220px;
  }

  .hero .nn-logo,
  .index-hero .nn-logo,
  img.nn-logo {
    height: 240px;
    max-width: 100%;
  }

  .top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .top-nav a {
    font-size: 19px;
    padding: 8px 0;
    flex: 1 1 auto;
    text-align: center;
  }

  .top-nav a:nth-child(1),
  .top-nav a:nth-child(2),
  .top-nav a:nth-child(3) {
    width: 33%;
  }

  .top-nav a:nth-child(4),
  .top-nav a:nth-child(5) {
    width: 33%;
  }

  .dl-btn {
    font-size: 16px;
    padding: 14px;
  }

  /* ▼▼ スクリプトページ（スマホ：左右5px） ▼▼ */
  .script-section {
    padding: 0 5px;
  }

  #script-results {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .script-card {
    font-size: 15px;
    padding: 14px 10px !important;
    margin-left: 5px;
    margin-right: 5px;
  }

  .script-body {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  /* ▲▲ スクリプトページ（スマホ） ▲▲ */

  .qa-box {
    font-size: 15px;
    padding: 14px;
  }

  .download-section {
    max-width: 400px;
    margin: 15px auto;
    padding: 0 20px;
    text-align: center;
  }
}

/* スクリプトタイトル */
.script-title {
  color: #52c8ff;
  font-weight: 700;
}

/* ロゴのふわふわアニメ */
.logo-wrapper {
  display: inline-block;
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* ロゴ本体 */
.nn-logo {
  height: 300px;
  display: block;
  margin: 0 auto;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Q&A アコーディオン */
.qa-a {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

.qa-a.open {
  max-height: 500px;
  opacity: 1;
}

/* ▼▼ PC用：スクリプトページ余白（左右20px） ▼▼ */
@media (min-width: 900px) {

  .script-section {
    padding: 0 20px;
  }

  #script-results {
    padding-left: 20px;
    padding-right: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .script-card {
    padding-left: 20px;
    padding-right: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .script-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .download-section p {
    max-width: 900px !important;
    width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }
}
/* ▲▲ PC用：スクリプトページ余白 ▲▲ */