@font-face {
  font-family: 'PressStart2P';
  src: url('PressStart2P-Regular.ttf') format('truetype');
}

/* ピクセルフォント（Bold版）を追加 */
@font-face {
  font-family: 'PixelMplus12Bold';
  src: url('PixelMplus12-Bold.ttf') format('truetype');
}

/* 「依存」専用スタイル */
.pixel-title {
  font-family: 'PixelMplus12Bold', monospace;
  font-size: 24px; /* 太さに合わせてサイズ少し大きめ */
  font-weight: bold;
  display: inline-block;
  vertical-align: baseline;
  margin-right: 4px;
  line-height: 1;
}

body {
  background: url('thumbnail.png') no-repeat center center fixed;
  background-size: cover;
  font-family: 'PressStart2P', monospace;
  color: black;
  user-select: none;
  margin: 0;
  overflow: hidden;
}

/* --- ウィンドウ基本 --- */
.window {
  position: absolute;
  top: 120px;
  left: 120px;
  width: 280px;
  background: #d8d4eb;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-size: 10px;
}

/* --- タイトルバー --- */
.title-bar {
  background: linear-gradient(90deg, #bba9e0, #d8d4eb);
  color: black;
  padding: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  border-bottom: 2px solid #888;
}

/* ✨ ドラッグ中だけ光るエフェクト */
.window.dragging {
  box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.9);
  filter: brightness(1.25);
  z-index: 50 !important;
}

/* クリックだけでは光らないように */
.title-bar:active {
  cursor: grabbing;
  filter: none;
  box-shadow: none;
}

/* --- ボタン --- */
.window .title-bar button {
  width: 22px;
  height: 22px;
  margin-left: 2px;
  background: #cfc8d8;
  border: 1px solid #000;
  box-sizing: border-box;
  font-family: 'PressStart2P', monospace;
  font-size: 10px;
  font-weight: bold;
  color: black;
  text-align: center;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #555,
    1px 1px 0 #000;
}

/* 押したとき */
.window .title-bar button:active {
  background: #b8b0c0;
  box-shadow:
    inset -1px -1px 0 #fff,
    inset 1px 1px 0 #555,
    1px 1px 0 #000;
}

/* --- ウィンドウ内容 --- */
.window-content {
  background: #e4e0f4;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  padding: 12px;
}

/* 自己紹介ウィンドウ用 */
.main-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  color: black;
}

.bio-text {
  font-size: 10px;
  line-height: 1.6;
  text-align: left;
  color: black;
  white-space: pre-line;
}

/* ミニマイズ時 */
.window.minimized .window-content {
  display: none;
}

/* --- エラーポップ --- */
.error-popup {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  border: 2px solid #000;
  background: #cfc9e7;
  box-shadow: 4px 4px 0 #000;
  font-family: 'PressStart2P', monospace;
  font-size: 10px;
  z-index: 999;
}

.error-popup .title-bar {
  background: linear-gradient(90deg, #bba9e0, #cfc9e7);
  border-bottom: 2px solid #7b6aa6;
  padding: 4px;
}

.error-popup .window-content {
  background: #dcd7ef;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  padding: 12px;
  text-align: center;
}

.error-popup .ok-btn {
  margin-top: 8px;
  padding: 4px 8px;
  border: 2px outset #666;
  background: linear-gradient(180deg, #d8d8d8 0%, #bfbfbf 100%);
  font-family: 'PressStart2P', monospace;
  font-size: 8px;
  cursor: pointer;
}

.error-popup.hidden {
  display: none;
}

/* ==============================
   Error Popup OK Button Style
   Match minimize/close buttons
============================== */

.error-popup button {
  border: 1px solid #000;
  background: linear-gradient(to bottom, #e0dce8, #c2bdd0);
  width: 40px;
  height: 20px;
  font-family: 'PressStart2P';
  font-size: 8px;
  color: black;
  cursor: pointer;
  box-shadow:
    inset 1px 1px #fff,
    inset -1px -1px #555,
    2px 2px 0 #000;
  text-align: center;
  padding: 0;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.error-popup button:hover {
  background: linear-gradient(to bottom, #d7d2e3, #b8b2c9);
}

.error-popup button:active {
  background: linear-gradient(to bottom, #bcb6d1, #a29cb8);
  box-shadow:
    inset 1px 1px #444,
    inset -1px -1px #fff;
}
