* {
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  background-color: #080808;
  background-image:
    /* Subtle radial gradient for depth (light source effect in center) */
    radial-gradient(circle at center, rgba(222, 49, 99, 0.08) 0%, transparent 75%),
    /* Existing grid patterns */
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: cover, 30px 30px, 30px 30px; /* Specify size for each layer */
  color: #f2f2f2;
  position: relative;
  overflow-x: hidden;
}

/* スキャニング・ライン演出 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(222, 49, 99, 0.2);
  box-shadow: 0 0 20px rgba(222, 49, 99, 0.5);
  animation: scan 8s linear infinite;
  z-index: 999;
  pointer-events: none;
}

.container {
  max-width: 960px;
  margin: 15rem auto 0; /* ヘッダーの高さ分、上にマージンを確保 */
  padding: 1.5rem;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background:
    /* Sharp specular highlight at the very top */
    linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 2px),
    /* Brushed metal texture (vertical lines) */
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 3px, transparent 4px),
    /* Highlight from top center */
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
    /* Base dark gradient */
    linear-gradient(180deg, rgba(17, 17, 17, 1) 0%, rgba(30, 30, 30, 1) 100%);
  color: #f8f8f8;
  padding: 3.5rem 1rem;
  padding-bottom: 2.8rem; /* ステータス下の余白を0.7rem縮小 */
  text-align: center;
  border-bottom: 2px solid rgba(222, 49, 99, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 -1px 5px rgba(255, 255, 255, 0.05);
  touch-action: none; /* ジェスチャー操作中のスクロールを防止 */
}

.system-status {
  font-family: monospace;
  /* わずかな厚みを追加して3D感を出す */
  text-shadow: 
    1px 1px 0 #000, 
    2px 2px 0 rgba(0,0,0,0.5),
    0 0 8px rgba(222, 49, 99, 0.4);
  font-size: 1.02rem;
  color: #de3163;
  letter-spacing: 0.2em;
  margin-top: 0;
  opacity: 0.9;
}

.blink {
  animation: blink 1.5s step-end infinite;
}

/* 言語スイッチャー */
.lang-switcher {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10000;
}

.lang-btn { /* 言語ボタンの立体感を強化 */
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(222, 49, 99, 0.4);
  color: #ccc;
  padding: 4px 10px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5); /* テキストに影を追加 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.6); /* 押し出し感 */
  font-family: monospace;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.lang-btn:hover, .lang-btn.active { /* ホバー・アクティブ時の立体感を強化 */
  background: #de3163;
  color: white;
  border-color: #de3163;
  box-shadow: 0 0 15px rgba(222, 49, 99, 0.7), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px); /* 少し浮き上がる */
  text-shadow: 0 0 5px rgba(255,255,255,0.8); /* テキストの輝き */
}

.site-logo {
  font-family: 'Courier New', Courier, monospace;
  font-size: 6rem;
  font-weight: bold;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f8f8f8; /* ロゴの基本色を明るく */
  display: inline-block;
  text-shadow:
    0 1px 0 #dcdcdc, /* 最前面の薄い影 */
    0 2px 0 #d1d1d1,
    0 3px 0 #c1c1c1,
    0 4px 0 #b1b1b1,
    0 5px 0 #a1a1a1,
    0 7px 0 #919191, /* 影のオフセットを徐々に大きく */
    0 10px 0 #818181,
    0 14px 0 #717171,
    0 20px 30px rgba(0, 0, 0, 0.8), /* 大きく、ぼかした深い影 */
    0 0 10px rgba(222, 49, 99, 0.4), /* ほのかなグロー */
    0 0 20px rgba(222, 49, 99, 0.2);
  margin-top: 1rem;
  margin-bottom: 0.2rem;
  line-height: 1.1;
  animation: flicker 5s infinite;
  transition: transform 0.3s ease;
}

.card {
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* 上部にハイライトを追加 */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid #de3163;
  border-radius: 12px;
  padding: 1.8rem;
  /* Stronger shadow and inset "bevel" light */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

/* カードの四隅の装飾 */
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(222, 49, 99, 0.3);
  pointer-events: none;
}

.card::before {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
}

.card::after {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

.card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card h3 {
  font-size: 1rem;
  color: #de3163;
  margin: 0 0 0.4rem 0;
  font-family: monospace;
}

.card p {
  color: #d6d6d6;
}

footer {
  text-align: center;
  margin: 2.5rem 0 1rem;
  color: #888;
  font-size: 0.95rem;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #f2f2f2;
}

.section-title::before {
  content: "";
  width: 38px;
  height: 2px;
  background: #de3163;
  border-radius: 2px;
}

/* アニメーション定義 */
@keyframes scan {
  0% { top: -10%; }
  100% { top: 110%; }
}

@keyframes flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(222, 49, 99, 0.6);
  }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
    opacity: 0.4;
    text-shadow: none;
  }
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 520px) {
  .container {
    margin-top: 10rem; /* スマホ用ヘッダー高さに合わせて調整 */
    padding: 0.8rem;
  }
  header {
    padding: 2.5rem 1rem;
    padding-bottom: 1.8rem; /* スマホ用ヘッダーのステータス下の余白を0.7rem縮小 */
  }
  .lang-switcher {
    top: 0.5rem;
  }
  .site-logo {
    font-size: 2.44rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
  }
  .card {
    padding: 1.2rem;
  }
  .card h2 {
    font-size: 1.2rem;
  }
  .section-title::before {
    width: 20px;
  }
}

/* ダイアログのスタイリング */
.dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 20000;
  justify-content: center;
  align-items: center;
}

.dialog-overlay.active {
  display: flex;
}

.dialog-content {
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.dialog-img {
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(222, 49, 99, 0.5);
  box-shadow: 0 0 15px rgba(222, 49, 99, 0.3);
}

.dialog-content p {
  margin: 1.5rem 0;
  font-size: 1.2rem;
  color: #f2f2f2;
}
