/* === login-body === */
.login-body {
  background: linear-gradient(to bottom right, #111, #333);
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  margin: 0;
  padding-top: 60px;
}

/* === ロゴ表示エリア === */
.login-logo {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  width: 100%;
}
.login-logo img {
  width: 80px;
  height: 80px;
  opacity: 0.8;
}

/* === ログインフォーム === */
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: #222;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.25);
  box-sizing: border-box;
  margin-bottom: 30px;
}

/* === タイトル === */
.login-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #fff;
}

/* === ラベル・入力 === */
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #ddd;
}
.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  font-size: 1rem;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #111;
  color: #fff;
  box-sizing: border-box;
}
.form-group input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 0.5rem;
}

/* === チェックボックスとボタンの配置 === */
.form-group.remember {
  display: flex;
  align-items: center;
}
.form-group.remember input[type="checkbox"] {
  margin-right: 10px;
}

/* === ログインボタン === */
.btn-login {
  padding: 0.75rem;
  background-color: #00bfff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  color: #000;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 35%;
  margin-left: 10px;
}
.btn-login:hover {
  background-color: #009acd;
}

/* === エラー表示 === */
.error {
  color: #fff;
  background: #800000;
  border: 1px solid #c00;
  padding: 0.75em;
  margin-top: 1em;
  border-radius: 4px;
  text-align: center;
}

/* === ヘッダー・library共通 === */



.btn-admin:hover {
  background-color: #ef4444;
}


.btn-logout:hover {
  background-color: #3b82f6;
  color: #fff;
}

body.bg-black {
  background-color: #000;
}
.text-white {
  color: #fff;
}

/* === Button Alignment Final === */
/* === ログインボタンの右寄せ修正 === */
.form-group.remember {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group.remember label {
  flex-grow: 1;
}

.btn-login {
  width: 150px;
  text-align: center;
}

/* === ヘッダー統一スタイル追加 === */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #1a1a1a, #2a2a2a);
  color: #fff;
  padding: 0.75rem 2rem;
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  box-shadow: 0 6px 14px rgba(255, 255, 255, 0.25);
}

.site-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
letter-spacing: 0.05em;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-admin {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #f87171;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-logout {
  margin-left: 1rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 0.25rem;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-back-icon {
  font-size: 1.75rem;
  margin-right: 1.25rem;
  margin-left: 0.5rem;
  color: #3b82f6;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
  line-height: 1;
}

/* === Library Layout === */
.container {
  padding: 2rem;
}

.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.section-list {
  list-style: square;
  padding-left: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.card {
  background: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(255,255,255,0.05);
}

.center {
  text-align: center;
}

.btn-primary {
  display: inline-block;
  background: #3b82f6;
  color: white;
  padding: 1rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.3s ease;
}
.btn-primary:hover {
  background: #2563eb;
}

/* === お知らせセクション === */
.notice-box {
  background-color: #111;
  padding: 1.5rem;
  border-left: 5px solid #f43f5e;
  border-radius: 6px;
  margin-bottom: 2rem;
}
.notice-box h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;  /* ← これを追加！ */
  gap: 0.5rem;
}
.notice-box ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: #ccc;
}

/* === 新着シリーズカード風 === */
.new-series {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.new-series a {
  display: inline-block;
  background: #1f2937;
  padding: 0.75rem 1.2rem;
  border-radius: 6px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s ease;
}
.new-series a:hover {
  background: #374151;
}

/* === ジャンル遷移リンク強化 === */
.btn-genre-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: bold;
  background-color: #1e3a8a;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.btn-genre-link:hover {
  background-color: #3b82f6;
  color: #fff;
}
.btn-genre-link::before {
  content: "📂";
  font-size: 1.2rem;
}

.section-title.center {
  text-align: center;
}

.c-circle-link {
  display: inline-block;
  width: 50px;
  height: 50px;
  transition: transform 0.2s ease;
}

.c-circle-link:hover {
  transform: scale(1.15); /* ← 好みに応じて数値調整可 */
}

.c-circle-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.c-circle-icon .circle-bg {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.c-circle-icon .circle {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(300deg); /* 左回転スタート */
  transition: stroke 0.3s ease;
  opacity: 0;
}

.c-circle-icon .arrow-left {
  fill: #fff;
  transition: fill 0.3s ease; /* ← ぬるっと変化 */
  position: relative;
  opacity: 1;
}

.c-circle-link:hover .circle {
  animation: drawCircleLeft 0.8s ease forwards;
  stroke: #2563eb; 
  opacity: 1;
}

.c-circle-link:hover .circle-bg {
  opacity: 0;
}

.c-circle-link:hover .arrow-left {
  fill: #2563eb; /* ← 他のボタンと同じ青 */
  animation: arrowMoveLeft 0.6s ease;
}

@keyframes drawCircleLeft {
      from {
        stroke-dashoffset: 176;
        transform: rotate(-60deg);
      }
      to {
        stroke-dashoffset: 0;
        transform: rotate(300deg);
      }
}

@keyframes arrowMoveLeft {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  50% {
    transform: translateX(-20px);
    opacity: 0;
  }
  51% {
    transform: translateX(20px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* === 共通カードレイアウト制限 === */
/*
#booklist-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

#series-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

#genre-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}
*/

/* aタグ内すべてから下線を除去 */
.card-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  background: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(255,255,255,0.05);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.45s ease;
}

.card-image {
  width: 100%;
  object-fit: contain;
  align-self: flex-start;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.card-text {
  margin-top: auto;
  text-align: center;
}

.card-title {
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 0.25rem;
}

.card-author {
  font-size: 0.9rem;
  color: #ccc;
}

.card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.35);
  border: 1px solid #3b82f6;
}

.genre-banner {
  background: linear-gradient(to right, #1e3a8a, #2563eb);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  padding: 0.75rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);

  position: sticky;
  top: 100px; /* ヘッダーの高さと合わせて調整 */
  z-index: 900;
}

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: block;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#scrollTopBtn.show {
  opacity: 1;
  transform: translateY(0);
}

/* ホバー時のかっこいいアニメーション */
#scrollTopBtn:hover {
  background-color: #2563eb;
  transform: translateY(-4px) scale(1.1) rotate(3deg);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.6);
}

/* === 管理メニューリスト（共通・レスポンシブ） === */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  margin-left: 1rem;
}
.menu-items {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;        /* 他の要素より前面 */
}
.site-title h1 {
  font-size: clamp(1rem, 4vw, 1.5rem);
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
  }
  .site-title {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .menu-toggle {
    display: block;
  }
  .menu-items {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
  }
  .menu-items.show {
    display: flex;
  }
}