html {
  scroll-behavior: smooth; /* スムーズスクロールを有効にする */
}

/* ヘッダーのスタイル */
.header {
  background-color: rgb(53, 53, 53); /* ヘッダーの背景を黒にする */
  height: 50px; /* ヘッダーの高さを固定 */
  display: flex;
  align-items: center; /* 画像を縦方向の中央に揃える */
  justify-content: center; /* 中央配置 */
  position: fixed; /* 画面上部に固定 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* 他の要素の下に隠れないようにする */
  padding: 0; /* 余計な余白をなくす */
}

/* 画像コンテナ */
.image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* 左側コンテナ（ホームボタン + ロゴ） */
.left-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ロゴ */
.logo {
  display: flex;
  align-items: center;
}

/* ロゴ画像 */
.logo img {
  height: 42px; /* ロゴの高さを大きく */
  width: auto; /* アスペクト比を維持 */
  object-fit: contain;
}

/* ホームボタンコンテナ */
.home-button-container {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.home-button {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.home-button .header-icon {
  height: 20px; /* 少し小さく */
}

.home-button:hover {
  transform: scale(1.1); /* ホバー時に少し拡大 */
}

/* 右側のコンテナ（カートとユーザー情報） */
.right-container {
  display: flex;
  align-items: center;
  gap: 15px; /* カートとユーザー情報の間隔 */
}

/* カートアイコンコンテナ */
.cart-icon-container {
  display: flex;
  align-items: center;
}

/* ヘッダーアイコン共通スタイル */
.header-icon {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ヘッダー総投票数表示（投票ページ用） */
.header-total-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url('../image/polling/top_total_bg.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 6px 20px;
  min-width: 130px;
  height: 44px;
}

.header-total-label {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  align-self: flex-start;
}

.header-total-count {
  font-size: 12px;
  font-weight: bold;
  color: #FFA500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  align-self: flex-end;
}

/* ヘッダーチケット表示（投票ページ用） */
.header-ticket {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../image/polling/top_frame.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 6px 15px;
  min-width: 80px;
  height: 36px;
}

.header-ticket-icon {
  height: 20px;
  width: auto;
  margin-right: 8px;
  margin-left: -25px;
}

.header-ticket-count {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  text-align: right;
  margin-left: auto;
}

/* サインアウトボタン */
.signout img {
  height: 25px; /* サイズ調整 */
  width: auto;
  object-fit: contain;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.login-button {
  background-color: #007bff; /* 青色 */
  width: 110px;
  height: 25px;
  border-radius: 20px;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  line-height: 25px;
  cursor: pointer;
  display: block;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.login-button:hover {
  background-color: #0056b3; /* ホバー時は濃い青 */
}

.menu {
  position: absolute;
  top: 50px;
  right: 5px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  width: auto;
  padding: 10px;
  display: none;
  z-index: 1000;
  max-width: 100%;
}

.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu li {
  margin: 10px 0;
}

.menu li a {
  width: 100%; 
  width: auto;
  color: #000;
  display: block;
  text-align: center;
}

.menu{
  display: none; /* 初期状態は非表示 */
}

.header-links {
  position: fixed; /* スクロールしても固定する */
  top: 49px; /* 画面の上部に配置（ヘッダーの高さ-1px） */
  left: 0; /* 左端に配置 */
  width: 100%; /* 横幅いっぱいに配置 */
  background-color: #fff; /* 背景色を設定 */
  z-index: 50; /* 他の要素より前面に表示 */
  padding: 10px 0; /* 上下の余白を追加 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 影をつけて浮き上がらせる */
  display: flex;
  justify-content: center;
}


/* リストアイテムを横並びに */
.header-links ul {
  display: flex; /* リストアイテムを横に並べる */
  padding: 0 20px;
  margin: 0;
  max-width: 1100px;
  width: 100%;
  overflow-x: auto; /* 横スクロールを有効にする */
  white-space: nowrap; /* 改行を防ぐ */
  transition: transform 0.3s ease-in-out; /* スライドのアニメーション */
}

/* 各リンクのスタイル */
.header-links li {
  list-style: none; /* リストのデフォルトのスタイルを無効にする */
  margin: 0 15px; /* アイテム間のスペース */
  flex-shrink: 0; /* アイテムが縮小しないようにする */
}

/* 各リンクのスタイル */
.header-links a {
  text-decoration: none; /* 下線を消す */
  color: #333;
  font-weight: bold;
  font-size: 13px;
  display: inline-block;
}

/* ホバー時のスタイル */
.header-links a:hover {
  color: #28a745; /* ホバー時に色を変更 */
}

.header-links a.active {
  color: #28a745; /* アクティブなリンクの色を変更 */
}

#limitedpackScroll, 
#sevenanniversaryScroll, 
#specialScroll, 
#packScroll, 
#diaScroll {
    scroll-margin-top: 100px; /* ヘッダーの高さ分だけ余白を追加 */
}