/* 全体共通設定 */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #F8F9FA;
  color: #202124;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* デスクトップ用固定サイドバー */
.sidebar {
  width: 260px;
  height: 100vh;
  background-color: #FFFFFF;
  border-right: 1px solid #E0E0E0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  font-size: 24px;
  font-weight: bold;
  color: #1A73E8;
  margin-bottom: 32px;
  padding-left: 8px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: 12px;
  color: #202124;
  font-size: 16px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
  outline: none;
}

.menu-item:hover, .menu-item.active {
  background-color: #E8F0FE;
  color: #1A73E8;
}

/* 左下のユーザー情報表示エリア */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-top: 1px solid #E0E0E0;
}

.user-pfp {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #E0E0E0;
  object-fit: cover;
}

.user-name {
  font-size: 14px;
  font-weight: bold;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* メインコンテンツエリアの基本形 */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background-color: #F8F9FA;
  box-sizing: border-box;
}

/* スマホ用ボトムナビゲーション（初期状態は非表示） */
.mobile-nav {
  display: none;
}

/* レスポンシブ対応 (スマホ用UI) */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding-bottom: 70px; /* ボトムナビの高さ分を確保 */
  }
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #FFFFFF;
    border-top: 1px solid #E0E0E0;
    z-index: 100;
  }
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #202124;
    text-decoration: none;
    font-size: 10px;
    gap: 4px;
  }
  .mobile-nav-item.active {
    color: #1A73E8;
  }
  .mobile-nav-pfp {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
  }
}