/* ============================================ */
/* 0. 外部インポート */
/* ============================================ */
@import url("./index.css");
@import url("./news.css");
@import url("./about.css");
@import url("./story.css");
@import url("./create.css");
@import url("./view.css");
@import url("./edit.css");
@import url("./qa.css");
@import url("./contact.css");
@import url("./search.css");
@import url("./terms.css");
@import url("./terminal.css");


/* ============================================ */
/* 1. 基本設定・ノーマライズ */
/* ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scroll-padding-top: 120px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Zen Kurenaido', sans-serif;
  background-color: #1a1a1a;
  color: #eee;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* -------------------------------------------- */
/* 画像・動画・テキスト・リンクの基本 */
/* -------------------------------------------- */
img, video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #111;
  object-fit: cover; 
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #0ff;
  text-shadow: 0 0 2px #0ff, 0 0 5px #0ff;
}

p {
  margin-bottom: 1rem;
  color: #ccc;
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: #0ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #0aa;
  text-shadow: 0 0 5px #0ff;
}

button {
  padding: 0.5rem 1rem;
  border: 1px solid #0ff;
  border-radius: 2px;
  background-color: #111;
  color: #0ff;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background-color: #0aa;
  box-shadow: 0 0 5px #0ff;
}

/* ============================================ */
/* 2. ヘッダー（完全固定・ナビゲーション） */
/* ============================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background-color: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #0ff;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

header h1 { 
  font-size: 1.3rem; 
  margin-bottom: 0; 
  z-index: 2100; 
}

header img.logo {
  height: 55px;
  width: auto;
  border: none;
  background: none;
}

/* モバイル用ナビゲーション */
header nav {
  position: fixed;
  top: 0;
  right: -100%; 
  width: 100%;
  height: 100vh;
  background-color: rgba(17, 17, 17, 0.98);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: right 0.3s ease-in-out;
  z-index: 2050;
}

header nav.is-active {
  right: 0;
}

header nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0rem;
  list-style: none;
  margin: 10px;
  padding: 0;
}

header nav ul li a {
  font-size: 1.5rem;
}

/* 検索リンク用 */
.nav-search-link {
  color: #0ff !important;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.nav-search-link:hover {
  color: #fff !important;
  text-shadow: 0 0 10px #0ff;
}

/* ハンバーガーメニューボタン */
.menu-trigger {
  width: 30px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.menu-trigger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #0ff;
  transition: all 0.3s;
  box-shadow: 0 0 5px #0ff;
}

.menu-trigger.is-active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-trigger.is-active span:nth-child(2) { opacity: 0; }
.menu-trigger.is-active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* ============================================ */
/* 3. メインレイアウト（コンテナ・セクション） */
/* ============================================ */
main {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 1rem;
  padding: 100px 1rem 0; 
}

section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #222;
  border-radius: 4px;
  border: 1px solid #444;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.05);
}

/* フォーム部品 */
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid #0ff;
  border-radius: 2px;
  background-color: #111;
  color: #0ff;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  border-color: #0aa;
  outline: none;
  box-shadow: 0 0 5px #0ff;
}

/* ============================================ */
/* 4. 共通コンポーネント */
/* ============================================ */
.contact-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #333;
  padding-bottom: 1rem;
}

.sub-comm {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #666;
  letter-spacing: 2px;
  margin-bottom: 0;
}

.notice {
  color: #f00 !important;
  font-weight: bold;
  text-shadow: 0 0 2px #f00;
}

.accent-red {
  color: #f00 !important;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.4);
}

.accent-cyan {
  color: #0ff !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.form-group-center {
  text-align: center;
  margin: 3rem 0;
}

.social-input {
  margin-bottom: 8px;
}

.hq-button {
  display: inline-block;
  padding: 15px 40px;
  color: #0ff;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #0ff;
  background: rgba(0, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-shadow: 0 0 5px #0ff;
  font-family: 'Zen Kurenaido', sans-serif;
  cursor: pointer;
}

.hq-button:hover {
  background: #0ff;
  color: #111;
  box-shadow: 0 0 15px #0ff;
}

.notice-box {
  border: 1px solid #444;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.95rem;
  margin-top: 2rem;
}

.notice-title {
  color: #f00;
  font-weight: bold;
  margin-bottom: 0.5rem !important;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.4);
}

/* -------------------------------------------- */
/* DANGER ZONE (機体抹消) */
/* -------------------------------------------- */
.danger-zone {
  margin-top: 5rem;
  padding: 2rem;
  border: 1px dashed #f00;
  background: rgba(255, 0, 0, 0.05);
}

.danger-title {
  color: #f00 !important;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.danger-desc {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}

.delete-btn {
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: 1px solid #f00;
  color: #f00;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.delete-btn:hover {
  background: #f00;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}
/* ============================================ */
/* 5. SNSフローティング */
/* ============================================ */
.side-sns {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 3000;
  text-align: right;
}

.side-sns-label {
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  color: #666;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.sns-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.sns-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #444;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(4px);
  color: #eee;
  font-size: 0.7rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.sns-buttons a:hover {
  border-color: #0ff;
  color: #0ff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* ============================================ */
/* Follow ME ボタン専用カスタム（赤黒く発光） */
/* ============================================ */
.sns-buttons a[href*="x.com/armoredclip"] { 
  width: auto; 
  padding: 0 15px;
  background: #200; 
  border: 1px solid #f00; 
  color: #fff;
  text-shadow: 0 0 5px #f00;
  position: relative;
  overflow: hidden;
  animation: red-glitch-pulsing 1.5s infinite alternate;
}

.sns-buttons a[href*="x.com/armoredclip"]:hover {
  background: #600;
  border-color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), inset 0 0 10px rgba(255, 0, 0, 0.5);
  transform: scale(1.05) translateY(-3px);
  color: #fff;
}

@keyframes red-glitch-pulsing {
  0% { box-shadow: 0 0 5px #800; border-color: #600; }
  50% { box-shadow: 0 0 15px #f00, 0 0 5px #fff; border-color: #f00; }
  100% { box-shadow: 0 0 8px #a00; border-color: #800; }
}

/* ボリュームコンテナ（スマホ時はデフォルト非表示） */
.volume-ctrl {
  display: none; 
  align-items: center;
  height: 38px;
  overflow: hidden;
  width: 0;
  transition: width 0.3s ease;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(4px);
  border: 0px solid #444;
}

/* PC（hover可能なデバイス）のみ展開 */
@media (min-width: 992px) {
  .volume-ctrl { display: flex; }
  .sns-buttons:hover .volume-ctrl {
    width: 100px;
    padding: 0 10px;
    border: 1px solid #444;
    margin-right: -1px;
  }
}

#bgm-volume {
  width: 100%;
  cursor: pointer;
  accent-color: #0ff;
  height: 4px;
}

#bgm-volume::-webkit-slider-runnable-track { background: #333; height: 2px; }
#bgm-volume::-webkit-slider-thumb { margin-top: -6px; }

/* ============================================ */
/* BGMコントロールボタン（記号・正方形版） */
/* ============================================ */
.bgm-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px; /* 記号化に合わせて正方形に固定 */
  padding: 0; 
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid #444;
  color: #888;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.bgm-status-viewport {
    height: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.bgm-status-text {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bgm-status-text span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    min-height: 38px;
    line-height: 1;
    font-size: 0.8rem; /* 記号が見やすいサイズ */
}

/* 再生中演出 */
.bgm-toggle.is-playing {
  border-color: #0ff;
  color: #0ff;
  text-shadow: 0 0 5px #0ff;
}

.bgm-toggle.is-playing .bgm-status-text {
    transform: translateY(-38px); 
}

.bgm-status-text span:last-child {
    color: #0ff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}
/* ============================================ */
/* 6. フータル（スマホファースト設計） */
/* ============================================ */

footer {
  margin-top: 5rem;
  padding: 3rem 0;
  border-top: 1px solid #333;
  background: #000;
  color: #666;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- 上段：ステータス・オーディオ・開発者 --- */
.footer-top-row {
  display: flex;
  flex-direction: column; /* スマホでは縦並び */
  gap: 25px;
  margin-bottom: 2rem;
}

/* 各ノードの共通スタイル */
.status-node, .audio-node {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #222;
  padding-bottom: 5px;
  margin-bottom: 5px;
  font-size: 0.7rem;
}

/* SYSTEM STATUS */
.status-label, .audio-label, .audio-author-label, .dev-label {
  color: #444;
  letter-spacing: 1px;
}

.status-value {
  color: #eee;
}

.status-value.pulse {
  color: #0ff;
  animation: footer-pulse 2s infinite;
}

/* AUDIO INFO (BGM) */
.audio-info {
  border-left: 2px solid #0ff;
  padding-left: 15px;
}

.audio-link {
  color: #0ff;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.audio-link:hover {
  text-shadow: 0 0 8px #0ff;
  color: #fff;
}

/* DEVELOPER INFO */
.developer-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-link {
  display: inline-block;
  color: #f00; /* メンテナーは赤 */
  text-decoration: none;
  border: 1px solid #444;
  padding: 6px 12px;
  text-align: center;
  transition: all 0.3s;
  font-size: 0.8rem;
  background: rgba(255, 0, 0, 0.05);
}

.dev-link:hover {
  border-color: #f00;
  background: #f00;
  color: #000;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* --- 中段：コピーライト --- */
.footer-middle-row {
  text-align: center;
  margin: 2rem 0;
}

.copyright {
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: #999;
}

.copyright strong {
  color: #f00;
}

.warning-text {
  font-size: 0.65rem;
  line-height: 1.5;
  color: #444;
  letter-spacing: 1px;
}

/* --- 下段：広告 --- */
.footer-ads {
  margin-top: 2rem;
  min-height: 100px;
}

.footer-divider {
  border: none;
  border-top: 1px solid #222;
  margin: 0;
}

/* --- アニメーション --- */
@keyframes footer-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ============================================ */
/* PCサイズ以上 (Desktop Overrides) */
/* ============================================ */
@media (min-width: 992px) {
  .footer-top-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .status-node, .audio-node {
    justify-content: flex-start;
    gap: 10px;
    border-bottom: none;
  }

  .audio-info {
    border-left: 1px solid #333;
    padding-left: 30px;
  }

  .dev-link {
    width: auto;
  }
}

/* ============================================ */
/* 6. メディアクエリ（レスポンシブ） */
/* ============================================ */

/* --- モバイル専用の調整 --- */
@media (max-width: 767px) {
  header nav ul li a.nav-search-link {
    font-size: 1.5rem;
    border: 1px solid #0ff;
    padding: 0.5rem 2rem;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 2px;
  }
  .footer-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .side-sns {
    right: 15px;
    bottom: 15px;
  }
  .sns-buttons a {
    width: 34px;
    height: 34px;
  }
}

/* --- PC表示（768px以上） --- */
@media (min-width: 768px) {
  main {
    max-width: 1200px;
    padding: 140px 40px 0;
  }

  section {
    margin-bottom: 2rem;
    padding: 2rem;
  }

  header {
    padding: 1rem calc((100% - 1200px) / 2 + 40px);
  }

  header img.logo { 
    height: 88px; 
  }

  .menu-trigger {
    display: none;
  }

  header nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
  }

  header nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
  }
  
  header nav ul li a {
    font-size: 1rem;
  }
}