/* 全体 */
body {
  font-family: sans-serif;
  margin: 0;
  background-color: #ffffff;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}

a:link {
  color: #6f6f6f;
}

h3 {
  font-size: 1.2rem;
}

/* ヘッダー */
header {
  display: flex; /* 横並びレイアウト */
  justify-content: space-between; /* 両端に寄せる */
  align-items: center; /* 上下中央揃え */
  border-bottom: 1px solid #eee; /* 区切り線 */
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.header-content h1 {
  font-size: 2.5rem;
  margin: 0;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  margin: 5px 0 0 0;
  font-weight: bold;
}

.lang-switch {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  border: 1px solid #333;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.2s;
}

.lang-switch:hover {
  background-color: #007bff;
  border: 1px solid #007bff;  
  color: white;
  text-decoration: none;
}

/* プロフィール */
.profile {
  display: flex;
  align-items: center;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 30px;
}

/* セクション */
.section h2 {
  font-size: 1.8rem;
}

.section ul {
  list-style: disc;
  padding-left: 20px;
}

.section li {
  margin-bottom: 5px;
}

/* 連絡先 (元のCSSより引用) */
.contact {
  text-align: center;
  margin-top: 40px;
}

/* フッター */
footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #666;
}

/* YouTube動画のレスポンシブ対応 (機能追加) */
.youtube-container {
  max-width: 560px;
  margin: 1rem 0;
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

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

.text-box {
  background-color: #f0f7ff;      /* 背景色を薄い青に */
  border-left: 5px solid #007bff;  /* 左の枠線を青く、太く */
  padding: 1em 1em;             /* 内側の余白を調整 */
  margin: 1.0em 0;                /* 外側の余白 (上下) */
}

/* ボックス内の最後の段落の下の余白をなくして、見た目を整えます */
.text-box p:last-child {
  margin-bottom: 0;
}

/* OGPプレビューツール */
.ogp-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.ogp-form input {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.ogp-form button {
  padding: 8px 15px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}
.ogp-form button:hover {
  background-color: #0056b3;
}

/* --- OGPカードのスタイル --- */
/* OGPカードのスタイル */
.ogp-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
  max-width: 712px;
  height: 110px;
  display: flex;
  background-color: #fff;
  text-decoration: none; 
}
.ogp-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  transition: all 0.2s ease-out;
}

.ogp-image {
  width: 200px;
  height: 110px;
  object-fit: cover;
  flex-shrink: 0;
  border-right: 1px solid #eee;
}

.ogp-text {
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-grow: 1;
}

.ogp-title {
  font-size: 1em;
  font-weight: bold;
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit; 
}

.ogp-description {
  font-size: 0.8em;
  color: #666;
  flex-grow: 1;
  margin: 0 0 5px 0;
  line-height: 1.4;
  height: calc(1.4em * 2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: -webkit-box;
}
.ogp-link {
  font-size: 0.75em;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ogp-link-wrapper {
  text-decoration: none;
}
.ogp-link:hover {
  text-decoration: underline;
}
.ogp-card-loading,
.ogp-card-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #888;
}

/* スマートフォン表示時の調整 */
@media (max-width: 600px) {
  .ogp-card {
    max-width: 100%; /* 小さい画面では横幅いっぱいに */
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .profile {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-img {
    margin-bottom: 20px;
  }
  .hobby-item, .blog-card {
    width: 100%;
  }
  .resizeimage {
    width: 100%;
  }
}

:lang(en) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
