/* ==========================================================
   リセット
========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ==========================================================
   アニメーション
========================================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   PC 固定横並びメニュー
   スマホへの拡張は mobile CSS 側で行う
========================================================== */
@media (min-width: 601px) {
  .top-right-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: 8px 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(6px);
    overflow: visible;
    z-index: 10000;
  }

  .toggle-nav-btn {
    display: none;
  }

  .nav-items {
    max-height: none;
    overflow: visible;
    flex-direction: row;
  }
  .nav-items.closed {
    max-height: none;
  }

  header {
    margin-top: 60px;
  }
}

/* ==========================================================
   基本スタイル
========================================================== */
body {
  font-family: "Segoe UI", sans-serif;
  line-height: 1.7;
  padding: 20px;
  background: #f5f5f5;
  color: #333;
}

header,
footer {
  text-align: center;
  margin-bottom: 25px;
  background: #fff;
  padding: 18px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 5px solid #0078ff;
}

header {
  margin-top: 80px;
}

/* ==========================================================
   ローディング画面
========================================================== */
#loading {
  position: fixed;
  inset: 0;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.6s ease;
}

#loading.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: fadeIn 0.8s ease;
}

.loader {
  width: 50px;
  height: 50px;
  border: 6px solid #ddd;
  border-top-color: #4a90e2;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 12px;
}

#loading p {
  font-size: 1rem;
  color: #4a90e2;
  font-weight: bold;
  animation: fadeIn 1s ease;
}

/* ハンバーガーボタン ホバー（PC/スマホ共通） */
.toggle-nav-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.toggle-nav-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ==========================================================
   メニュー項目（PC：横並び）
========================================================== */
.nav-items {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;

  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s ease;
}

.nav-items.closed {
  max-height: 0;
}

/* プロフィール */
.nav-profile {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
}

.nav-profile img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* 共通ボタン */
.nav-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s ease;
  border: none;
  cursor: pointer;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

#back-to-top {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0 auto 12px;
  background: #ccc;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  font-size: 1.1rem;
  text-align: center;
}

/* 小型ボタン */
.small-btn {
  width: 90px;
  height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================
   カードレイアウト
========================================================== */
section {
  background: #fff;
  padding: 18px;
  margin-bottom: 22px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   アイコンエリア
========================================================== */
.icon-area {
  text-align: center;
}

.icon-area img {
  width: 130px;
  height: 130px;
  display: block;
  margin: 0 auto 12px auto;
  border-radius: 50%;
  object-fit: cover;
}

.icon-area a {
  color: #0078ff;
  text-decoration: none;
}

.icon-area a:hover {
  text-decoration: underline;
}

/* ==========================================================
   プロフィールセクション
========================================================== */
.profile-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-list {
  flex: 1;
}

.profile-list div {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.profile-list div:last-child {
  border-bottom: none;
}

.profile-list dt {
  width: 130px;
  font-weight: bold;
  color: #444;
}

.profile-list dd {
  flex: 1;
  color: #555;
}

/* ==========================================================
   アバター画像
========================================================== */
.avatar-image img {
  width: 180px;
  height: 320px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: block;
}

/* ==========================================================
   趣味カード
========================================================== */
.hobby-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 10px;
}

.hobby-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

/* ==========================================================
   写真ギャラリー
========================================================== */
.photo-wrapper {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.photo-card {
  width: calc(33.3% - 10px);
  background: #fafafa;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* ==========================================================
   フレンドアイコン
========================================================== */
.friend-icon {
  width: 80px;
  height: 80px;
  margin-top: 6px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ==========================================================
   ボタンリンク
========================================================== */
.btn-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 0;
  margin: 12px 0;
  background: #4a90e2;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-link:hover {
  background: #357ABD;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

.btn-link:active {
  transform: scale(0.97);
}

/* ==========================================================
   グループ・ゲームリスト 黒丸を消す 
========================================================== */
.groups ul,
.games ul {
  list-style: none;   
  padding-left: 0;    
  margin-left: 0;
}

/* ==========================================================
   フッター
========================================================== */
footer p {
  font-size: 0.9rem;
  color: #666;
}

/* ==========================================================
   タイムライン
========================================================== */
.timeline {
  border-left: 3px solid #6cf;
  padding-left: 20px;
  margin-left: 10px;
}

.timeline-item {
  margin-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 12px;
  height: 12px;
  background: #6cf;
  border-radius: 50%;
  position: absolute;
  left: -27px;
  top: 4px;
}

/* ==========================================================
   JS用追加スタイル
========================================================== */
.schedule-table.hidden {
  display: none;
}

.hobby-card,
.photo-card {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s ease;
}

.hobby-card.show,
.photo-card.show {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #4a90e2;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

header {
  transition: 0.3s ease;
}

header.small {
  transform: scale(0.95);
  opacity: 0.9;
}

