/*
Theme Name: PortfolioWP
Author: Yuna
Description: Original Cyberpunk Portfolio Theme
Version: 1.0
*/

@font-face {
  font-family: "CinemaFont";
  src: url("fonts/cinecaption226.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* ==============================
   Base Styles
   ============================== */
body {
  margin: 0;
  background: #000000;
  overflow-y: auto;
}

img {
  vertical-align: middle; /* 下にできる隙間を消去 */
  border-style: none;
  max-width: 100%;
  height: auto;
}

/* ==============================
   Visitor Screen
   ============================== */
#visitor-screen {
  height: 100vh;
  background: #ffffff;
  color: #595959;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#visitor-screen.leave {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* 親に奥行きを与える */
.visitor-box {
  perspective: 800px;
}

.visitor-box .label {
  font-family: "DotGothic16", monospace;
  font-size: 1.2rem;
  margin-bottom: 0.5em;
} 

.count-line {
  font-family: "DotGothic16", monospace;
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: 2rem;
}

.count-label {
  font-weight: normal;
}

.count-number {
  font-weight: bold;
  font-size: 1.2em;
  letter-spacing: 0.05em;
}

.spin {
  display: inline-block;
  transform-style: preserve-3d;
  animation: spinY 5s ease-in-out infinite;
}

/* 奥行き回転アニメーション */
@keyframes spinY {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
/* ==============================
   Retro Graphic Counter
   ============================== */
/* カウンター全体を横並びにする */
.retro-counter {
  display: flex;
  gap: 1.5px; /* ブロックとブロックの隙間（ちょっと開けるのがレトロ） */
  margin: 0 10px;
}

/* 数字1桁ごとの四角いブロック */
.digit-box {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 27px;
  height: 36px;
  
  /* 昔のGIF画像っぽさを出すベベル（立体）エフェクト */
  background: #000000; /* 黒背景 */
  border-top: 2px solid #555555;    /* 上のハイライト */
  border-left: 2px solid #555555;   /* 左のハイライト */
  border-right: 2px solid #aaaaaa;  /* 右のシャドウ */
  border-bottom: 2px solid #aaaaaa; /* 下のシャドウ */
  
  /* フォント設定（ドット絵フォントが活きます！） */
  font-family: "DotGothic16", monospace;
  font-size: 25px;
  color: #ffffff; /* ネオバタくん風なら白。サイバーに寄せるなら #00ffc9 もオススメ！ */
  line-height: 1;
  font-weight: bold;
  
  /* さらに立体感を強調する影 */
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}
/* ==============================
   Loading Screen
   ============================== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0,0,0,0);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 3s ease;
}

#loading-screen.active {
  background-color: rgb(24, 24, 32);
}

#loading-text {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "DotGothic16", monospace;
  font-size: 24px;
  letter-spacing: 0.2em;
  color: #cfcfcf;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3000;
}

/* 表示状態 */
#loading-text.show,
#loading-screen.active #loading-text {
  opacity: 1;
}

#loading-text::after {
  content: "";
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%   { content: ""; }
  33%  { content: "."; }
  66%  { content: ".."; }
  100% { content: "..."; }
}

/* ==============================
   Portfolio & Main Content
   ============================== */
#portfolio {
  min-height: 150vh;
  padding-top: 1px;
  background: #181820;
  color: #000;
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}

/* ASCII Art */
.ascii-3d {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0.5px;
  color: #00ffc9;
  background: #181820;
  padding: 32px;
  white-space: pre;
  text-shadow:
    1px 1px 0 #007744,
    2px 2px 0 #004422,
    3px 3px 0 #002211;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Typography */
.portfolio-body {
  font-family: "CinemaFont", monospace;
  color: #d9d9d9;
}

h2, h3, h4, h5, h6 {
  font-weight: normal;
}

h2 {
  font-size: 25px;
  color: #ffffff;
}

h3 {
  color: #bce9ff;
}

.portfolio-line {
  font-family: "CinemaFont", monospace;
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: 15px;
}

/* ==============================
   Works / Layout Elements
   ============================== */
.works-carousel {
  position: relative; /* ボタンを左右に固定するための基準 */
  display: flex;
  align-items: center;
}

/* スクロールバーを隠す設定 */
.works-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px;
  
  /* スムーズなスクロール移動 */
  scroll-behavior: smooth;
  
  /* スクロールバー非表示 (Firefox, IE, Edge) */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* スクロールバー非表示 (Chrome, Safari) */
.works-list::-webkit-scrollbar {
  display: none;
}

/* 左右のボタンデザイン */
.scroll-btn {
  background-color: rgba(24, 24, 32, 0.3);
  color: #ffffff; 
  border: 1px solid #ffffff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  position: absolute; /* .works-carousel の中で絶対配置 */
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
    
    backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
/* ボタンの位置 */
.left-btn {
  left: 1px; /* 左端にはみ出させる */
}

.right-btn {
  right: 1px; /* 右端にはみ出させる */
}
.works-item {
  flex: 0 0 auto;
}
/* ホバー時のマスクアニメーション */
.sample1 {
  width: 320px;
  height: 180px;
  overflow: hidden;
  margin: 10px 8px 10px 16px;
  position: relative; /* 子要素(mask)の絶対位置指定の基準 */
}

.sample1 .caption {
  font-size: 130%;
  text-align: center;
  color: #fff;
  margin: 0;
}

.sample1 .mask {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0; /* 初期状態では隠す */
  background-color: rgba(0,0,0,0.4);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
    display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sample1:hover .mask {
  opacity: 1; /* ホバー時に表示 */
}

/* 動画埋め込み用 (iframe) */
.movie-wrap {
  position: relative;
  padding-bottom: 56.25%; /* アスペクト比 16:9 の場合の縦幅 */
  height: 0;
  overflow: hidden;
}

.movie-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ==============================
   Terminal Prompt Effect
   ============================== */
.caption-prompt {
  font-family: "CinemaFont", monospace; 
  color: #ffffff;                       
  font-size: 1.2rem;        
  letter-spacing: 0.1em;           
  margin: 0 0 8px 0;
  text-align: center;
}

/* テキストの末尾にアンダーバーを追加して点滅させる */
.caption-prompt::after {
  content: "_";
  display: inline-block;
  margin-left: 4px; /* 文字とカーソルの隙間 */
  animation: cursor-blink 1s step-end infinite;
}

/* 点滅のアニメーション */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==============================
   Hide Main Scrollbar
   ============================== */
/* IE, Edge, Firefox用 */
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Chrome, Safari用 */
body::-webkit-scrollbar {
  display: none;
}
/* ==============================
   RPG Command Menu (Left Aligned)
   ============================== */

/* メニュー全体の枠：一本線の白枠 */
#contact .rpg-command-menu {
  display: inline-block; /* 中身のサイズに合わせる */
  border: 2px solid #ffffff;
  padding: 15px 25px;
  position: relative; /* タイトルの配置基準 */
  margin-bottom: 40px; /* 下のフォームとの距離 */
  margin-left: 0;      /* 左側に配置 */
  background-color: transparent;
}

/* 枠線の上に重なる「コマンド」という文字 */
#contact .rpg-command-menu .command-title {
  position: absolute;
  top: -12px;          /* 枠線の上に持ち上げる */
  left: 15px;
  background-color: #181820; /* 背景色（他と同じグレー）で枠線を隠す */
  padding: 0 8px;
  font-family: "DotGothic16", monospace;
  font-size: 0.9rem;
  color: #ffffff;
}

/* メニューのリスト */
#contact .rpg-command-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#contact .rpg-command-menu li {
  font-family: "DotGothic16", monospace;
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1.8;
  padding-left: 1.5em; /* ▶ が入るスペース */
  position: relative;
}

/* 「はなしかける」の横の ▶（アクティブな項目） */
#contact .rpg-command-menu li.active::before {
  content: "▶";
  position: absolute;
  left: 0;
  animation: rpg-blink 0.8s step-end infinite;
}

/* 「にげる」など他の項目の位置合わせ */
#contact .rpg-command-menu li:not(.active) {
  padding-left: 1.5em;
}

/* アニメーション（点滅） */
@keyframes rpg-blink {
  50% { opacity: 0; }
}
/* ==============================
   Contact Form (Slim RPG Window - Refined Colors)
   ============================== */

/* セクション全体：背景色をポートフォリオの他部分 (#181820) と統一 */
#contact {
  background-color: #181820; /* 修正：他と同じダークグレー */
  padding: 60px 0;
  width: 100%;
}

/* 見出し：左端配置のまま、他のh2と同じ色・フォントに */
#contact h2 {
  font-family: "CinemaFont", monospace;
  font-size: 25px;
  color: #ffffff;
  text-align: left;
  margin-bottom: 25px;
  text-shadow: none;
}

/* ウィンドウ本体：サイズを 500px → 420px にさらにスリム化 */
#contact .contact-box {
  width: 90%;
  max-width: 420px; /* 修正：さらにコンパクトに */
  margin: 0 auto;   /* 中央寄せ */
  background-color: #000000; /* ウィンドウの中だけは真っ黒 */
  
  /* 二重枠線 */
  border: 4px solid #ffffff;
  box-shadow: inset 0 0 0 2px #000000, inset 0 0 0 4px #ffffff; 
  
  padding: 20px 30px; /* 余白も少し詰めました */
  text-align: left;
}

/* フォーム内部のラベルと「▶」 */
#contact .wpcf7 label {
  font-family: "DotGothic16", monospace;
  font-size: 1rem;
  color: #ffffff;
  display: block;
  margin-bottom: 8px;
}

#contact .wpcf7 label::before {
  content: "▶ ";
  color: #ffffff;
  animation: rpg-blink 0.8s step-end infinite;
}

/* 入力エリア：少し高さを抑えてスッキリ */
#contact .wpcf7 input[type="text"],
#contact .wpcf7 input[type="email"],
#contact .wpcf7 textarea {
  width: 100%;
  background-color: #000000;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-family: "DotGothic16", monospace;
  font-size: 0.95rem;
  padding: 6px 10px;
  margin-bottom: 15px;
  border-radius: 0;
  box-sizing: border-box;
  outline: none;
}

/* 送信ボタン（中央寄せ・サイズ調整） */
#contact .wpcf7 input[type="submit"] {
  font-family: "DotGothic16", monospace;
  font-size: 1.1rem;
  background-color: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 6px 25px;
  margin: 5px auto 0;
  display: block;
  cursor: pointer;
  width: auto;
  clip-path: none;
  transition: background-color 0.1s;
}

#contact .wpcf7 input[type="submit"]:hover {
  background-color: #ffffff;
  color: #000000;
}

/* アニメーション */
@keyframes rpg-blink {
  50% { opacity: 0; }
}