/*html-------------------------------------------------------------------*/

/* マウスカーソル */

/* ベース */
html,
body,
* {
  cursor: url("../images/plusCursor.png") 16 16, auto;
}

/* クリックできるもの リンク / ボタン / サイドメニュー類 */
a,
button,
[role="button"],
.menu-toggle,
.side-menu__close,
.side-link,
.opennewtab a,
.scroll-top-btn {
  cursor: url("../images/arrowCursor.png") 0 0, pointer;
}

/* テキスト メモ帳 textarea*/
textarea,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
[contenteditable="true"] {
  cursor: url("../images/textarea.png") 8 16, text;
}

/* 描画（十字）DrawingToolのcanvas */
#drawingCanvas,
canvas {
  cursor: url("../images/drawing.png") 16 16, crosshair;
}

/* 移動window のヘッダーを掴む所 */
.window-header {
  cursor: url("../images/plusCursor.png") 16 16, move;
}

/* リサイズ：右下を掴む（あなたの実装が .resizer ならこれでOK）
   - もし .resizer が無い場合は、JSで付けてるクラス名に合わせてください */
.resizer,
.resize-handle,
.window-resizer {
  cursor: url("../images/plusCursor.png") 16 16, se-resize;
  /*---------------aaaaaaaa*/
}

/* ドラッグ&ドロップ系 ファイル入力（画像/音/動画アップロード） */
input[type="file"],
#image-upload,
#fileInput,
.js-video-file {
  cursor: url("../images/plusCursor.png") 16 16, copy;
}

/* スライダー 線の太さ（range） */
input[type="range"],
#lineWidth {
  cursor: url("../images/slider.png") 16 16, ew-resize;
}

/* チェックボックス ループ等 */
input[type="checkbox"] {
  cursor: url("../images/arrowCursor.png") 0 0, pointer;
}

/* 無効（disabled なボタン等） */
button:disabled,
.disabled,
[disabled] {
  cursor: url("../images/notallowed.png") 16 16, not-allowed;
  /*未設定*/
}

/* “処理中” を出したい時用（JSで body に .is-loading を付ける想定） */
body.is-loading,
body.is-loading * {
  cursor: url("../images/wait.png") 16 16, wait;
  /*未設定*/
}

/* 全リンク：visited でも色を固定 */
a:link,
a:visited {
  color: #FADAC1;
  /* 既存テーマに合わせる */
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  color: #50A3AB;
}

/*body-----------------------------------------------------------------------------*/
body {
  min-height: 1900px;
  /*ここでbodyの高さを調整*/
  background-color: #1f1f1f;
  /* 背景を黒に */
  color: #FADAC1;
  /*テキストカラー*/
  font-family: 'Consolas', monospace;
  /* モノスペースフォントでデジタル感 */
  font-size: 1rem;
  margin: 0;
  text-align: center;
  overflow-x: hidden;
}


/*header-------------------------------------------------------------------*/
header {
  background-color: #50A3AB;
  /*背景色*/
  box-shadow: 0 2px 4px #FADAC1;
  /*さりげない影で立体感を出す*/
  width: 100%;
  position: sticky;
  /*スクロールしても常に上部に留まる*/
  top: 0;
  z-index: 1000;
  /*他の要素より手前に表示*/
  padding-top: 6px;
}

/*ヘッダーの中身（横並びにするためのコンテナ）*/
.header-container {
  display: flex;
  /*Flexboxを有効化*/
  justify-content: space-between;
  /*要素を左右に広げる*/
  align-items: center;
  /*要素を垂直方向で中央に揃える*/
  margin: 0 auto;
  padding: 10px 10px;
}

/*ハンバーガーボタン関係---------------------------------*/

.menu-toggle {
  border: 1px solid #FADAC1;
  background: #1D313C;
  color: #FADAC1;
  box-shadow: 0 0 10px #FADAC1;
  border-radius: 10px;
  width: 42px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 12px;
  transition: filter 0.15s, transform 0.06s;
}

.menu-toggle:hover {
  filter: brightness(1.15);
}

.menu-toggle:active {
  transform: translateY(1px);
}

/*ロゴのスタイリング*/

.header-container img {
  width: 2.5em;
  height: 2.5em;
  transition: transform 0.15s ease;
}

.header-container img:hover {
  transform: scale(1.5);
  /*少し拡大*/
  cursor: none;
  /*カーソルを非表示*/
}

.header-container p {
  font-size: 1.5em;
  font-weight: 900;
  color: #F6723A;
  -webkit-text-stroke: 0.5px #FADAC1;
  text-decoration: none;
  /* 下線を削除 */
  margin: 0;
}

/* ハンバーガーの3本線 */
.menu-icon {
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: block;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.header-container {
  align-items: center;
}

/* ガラス汚れの表現----------------------------------- */

/*FX 共通（画面＝モニター全体に固定）*/
.fx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  pointer-events: none;
  z-index: 999999;
  /* 全UIより前面 */
}

/*CRTノイズ*/
.fx-crt {
  background-image: url("../images/crt-noise.png");
  background-repeat: repeat;
  background-position: center;
  background-size: 700px auto;

  opacity: 0.05;
  mix-blend-mode: overlay;

  animation: crt-jitter 0.35s steps(2) infinite;
}

/*CRTノイズを動かしていい感じにする*/
@keyframes crt-jitter {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-0.6%, 0.4%, 0);
  }
}

/*ガラス汚れ（縦リピート）*/
.fx-glass {
  background-image: url("../images/grime.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% 600px;

  opacity: 0.06;
  mix-blend-mode: screen;
}

/* 四隅が暗くなる（ブラウン管っぽい） */
.fx-vignette {
  opacity: 0.9;
  mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse at center,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.11) 52%,
      rgba(0, 0, 0, 0.22) 70%,
      rgba(0, 0, 0, 0.52) 86%,
      rgba(0, 0, 0, 0.92) 100%);
  border-radius: 18px;
  /* 角が少し丸く見える */
  transform: scale(1.01);
  /* 端の隙間対策 */
}


/*main-content-wrapper-----------------------------------------------------------*/
.main-content-wrapper {
  position: relative;
  /* 子要素 (.window) の absolute の基準点とする */
  width: 100%;
  /* min-heightをbodyと同じかそれ以下に設定。bodyの高さがこのエリアをカバー */
  min-height: 1850px;
  overflow: hidden;
}

/*追加デザイン宇宙船窓景色----------------------------*/

.stellar-stream-body {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 1850px;
  background-color: #000;
  font-family: 'Courier New', monospace;
}

/* --- 流れる星の層 (Parallax) --- */
.star-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 遠くの星（小さく、遅い） */
.stars-back {
  background-image: radial-gradient(1px 1px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 150px 120px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 300px 250px, #ddd, rgba(0, 0, 0, 0));
  background-size: 400px 300px;
  animation: move-stars 60s linear infinite;
}

/* 中間の星 */
.stars-mid {
  background-image: radial-gradient(2px 2px at 50px 80px, #50A3AB, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 250px 200px, #fff, rgba(0, 0, 0, 0));
  background-size: 300px 200px;
  animation: move-stars 30s linear infinite;
  opacity: 0.6;
}

/* 近くの星（大きく、速い） */
.stars-front {
  background-image: radial-gradient(3px 3px at 100px 50px, #FADAC1, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 400px 350px, #F6723A, rgba(0, 0, 0, 0));
  background-size: 500px 400px;
  animation: move-stars 10s linear infinite;
}

/* --- HUD（計器オーバーレイ） --- */
.hud-overlay {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(80, 163, 171, 0.2);
  pointer-events: none;
  z-index: 10;
}

/* --- パイロット（アクティブオーバーレイ） --- */
.pilot-active {
  position: absolute;
  top: 20px;
  left: 100px;
  color: #F6723A;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* 右下の座標データ */
.telemetry {
  position: absolute;
  bottom: 40px;
  right: 80px;
  color: #50A3AB;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

/* ガラスの反射光 */
.glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%, rgba(255, 255, 255, 0.02) 50%, transparent 100%);
  pointer-events: none;
}

.scanning-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: rgba(80, 163, 171, 0.1);
  top: 0;
  animation: scan-down 8s linear infinite;
}


/* 窓外景色アニメーション定義 */
@keyframes move-stars {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -1000px 0;
  }

  /* 左へ流れる */
}

@keyframes scan-down {
  0% {
    top: 0;
  }

  100% {
    top: 100%;
  }
}

/*footer-------------------------------------------------*/

footer {
  background-color: #333;
  color: #fff;
  padding: 40px 20px 20px;
  width: 100%;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid #FADAC1;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.footer-section {
  margin: 10px;
  min-width: 150px;
}

.footer-section img {
  width: 2em;
  height: 2em;
  transition: transform 0.15s ease;
}

.footer-section img:hover {
  transform: scale(1.5);
  /*少し拡大*/
  cursor: none;
  /*カーソルを非表示*/
}

.footer-section p {
  font-size: 1em;
  font-weight: 900;
  color: #F6723A;
  -webkit-text-stroke: 0.5px #FADAC1;
  text-decoration: none;
  /* 下線を削除 */
  margin: 0;
  padding-bottom: 20px;
}

.footer-section h3 {
  font-size: 1.1em;
  margin-bottom: 15px;
  color: #FADAC1;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #FADAC1;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #50A3AB;
}

/*スクロールボタン------------------------------------------------------*/

/* スムーズスクロール（CSSでのみ管理） */
html {
  scroll-behavior: smooth;
}

/* 右下固定ボタン */
.scroll-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;

  width: 46px;
  height: 46px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #1D313C;
  color: #FADAC1;

  border: 1px solid #50A3AB;
  border-radius: 10px;

  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;

  box-shadow:
    0 0 10px rgba(80, 163, 171, 0.6),
    inset 0 0 6px rgba(250, 218, 193, 0.2);

  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.scroll-top-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 0 16px #FADAC1,
    inset 0 0 8px rgba(250, 218, 193, 0.4);
  filter: brightness(1.1);
  cursor: none;
}

/* 押したとき */
.scroll-top-btn:active {
  transform: translateY(1px) scale(0.98);
}