/* =========================================
   1. 基本設定 & レイアウト (元通り復元)
   ========================================= */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Georgia', 'Times New Roman', 'Hiragino Mincho ProN', 'MS Mincho', serif;
  background-color: #FFFFFF; /* 背景色：白 */
  color: #333;
  overflow: hidden; /* アニメーション中のスクロール防止 */
}

/* フェードインアニメーション（解答ページ用） */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- ロック画面のレイアウト (ここが崩れていた原因) --- */
#lock-screen {
  display: flex;       /* フレックスボックスで配置 */
  flex-direction: column; /* 縦並び */
  align-items: center;    /* 横方向の中央揃え */
  justify-content: center;/* 縦方向の中央揃え */
  height: 100vh;          /* 画面いっぱいの高さ */
  padding: 20px;
  box-sizing: border-box;
  
  /* ロック解除時に「ふわっと」消えるための設定 */
  transition: opacity 0.8s ease-out; 
}

.content {
  width: 100%;
  max-width: 400px; /* PCでも広がりすぎないように制限 */
  text-align: center;
}

/* ロゴ画像のスタイル */
.logo-image {
  max-width: 80%;      
  height: auto;        
  margin-bottom: 20px; 
  display: block;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  font-weight: normal;
  letter-spacing: 2px;
  color: #474747;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 30px;
}

/* --- フォームのデザイン --- */
#password-form {
  display: flex;
  flex-direction: column;
}

#password-input {
  width: 100%;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #CCC;
  background-color: #FFF;
  font-size: 1em;
  box-sizing: border-box;
  text-align: center;
}

#submit-button {
  padding: 15px;
  border: none;
  background-color: #333;
  color: white;
  font-size: 1em;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#submit-button:hover {
  background-color: #555;
}

/* エラーメッセージ */
#message {
  margin-top: 15px;
  color: #D9534F; 
  height: 1.2em; 
  font-size: 0.9em;
}


/* =========================================
   2. 扉アニメーション (画像なし・CSSのみ版)
   ========================================= */
#door-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /* 扉が開いた後の奥の色（ホワイトアウト） */
  background-color: #FFF; 
  
  /* 初期状態 */
  visibility: hidden;
  opacity: 0;
  z-index: 9999; /* 確実に一番手前に表示 */
  transition: opacity 0.5s ease-in;
}

.door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  
  /* ▼▼▼ CSSだけで作る「重厚な木製扉」のデザイン ▼▼▼ */
  
  /* ベースの色（濃いダークブラウン） */
  background-color: #2c1e19; 
  
  /* 木目のような縦縞ノイズと、中心が明るいライティングを重ねる */
  background-image: 
    /* 縦の細かいライン */
    repeating-linear-gradient(
      90deg, 
      transparent 0px, 
      transparent 2px, 
      rgba(0,0,0,0.1) 3px, 
      transparent 4px
    ),
    /* 全体の立体感（中心が明るく、端が暗い） */
    radial-gradient(
      circle at 50% 50%, 
      rgba(255,255,255,0.05) 0%, 
      rgba(0,0,0,0.6) 100%
    );

  /* 扉の内側（装飾パネル）風の凹凸を影で表現 */
  box-shadow: 
    inset 0 0 50px rgba(0,0,0,0.8); 

  /* アニメーション設定 */
  transition: transform 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 左の扉 --- */
.left-door {
  left: 0;
  border-right: 2px solid #1a110e;
  box-shadow: inset -10px 0 20px rgba(0,0,0,0.5); 
  background-position: left center;
}

/* 左の扉の装飾枠 */
.left-door::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 60%;
  height: 70%;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 
    inset 2px 2px 5px rgba(0,0,0,0.5),
    1px 1px 2px rgba(255,255,255,0.05);
}

/* --- 右の扉 --- */
.right-door {
  right: 0;
  border-left: 2px solid #1a110e;
  box-shadow: inset 10px 0 20px rgba(0,0,0,0.5);
  background-position: right center;
}

/* 右の扉の装飾枠 */
.right-door::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 20%;
  width: 60%;
  height: 70%;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 
    inset 2px 2px 5px rgba(0,0,0,0.5),
    1px 1px 2px rgba(255,255,255,0.05);
}

/* --- 開くときのアニメーション --- */
#door-animation.open .left-door {
  transform: translateX(-100%);
}

#door-animation.open .right-door {
  transform: translateX(100%);
}