/* common.css */

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
#voteModal {
  display: none;
}

body {
  font-family: sans-serif, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.5;
}

/* Utility */
.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Header / Hero */
.site-header {
  position: relative;
}


/* hero全体 */
.hero {
  position: relative;
  width: 100%;
  height: 70vh;  /* お好みの高さ */
  min-height: 400px; /* 最低高さの例 */
  background: url("../img/hero_cats.jpg") center/cover no-repeat;
  overflow: hidden;

  /* ▼ ゆっくりズームするアニメ ▼ */
  animation: heroZoom 30s ease-in-out 1 forwards;
 
}

/* 画像の上に半透明オーバーレイ */
.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4); /* 画面を少し暗く */
  z-index: 1; /* テキストより後ろに敷くので1 */
}

/* テキストを中央に配置 */
.hero-text {
  position: relative;  /* z-indexが必要なら付与 */
  z-index: 2;         /* オーバーレイより手前に出す */
  color: #fff;
  text-align: center;

  /* 親要素の中で上下中央寄せ */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 0 20px;  /* 横の余白 */
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* ボタン例 */
.btn {
  display: inline-block;
  background: #f2c210;
  color: #333;
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}
.btn:hover {
  background: #dab10f;
}

/* ▼ ズームアニメーション定義 ▼ */
@keyframes heroZoom {
  0% {
    transform: scale(1);   /* 通常サイズ */
  }
  50% {
    transform: scale(2); /* ゆっくり拡大 */
  }
  100% {
    transform: scale(1);   /* また通常サイズに戻る */
  }
}

/* Intro Section */
.intro-section .container {
  text-align: center;
}

.intro-section h2 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
}

.points {
  list-style: disc inside;
  text-align: left;
  max-width: 600px;
  margin: 20px auto;
}

.points li {
  margin-bottom: 0.5rem;
}

/* Vote Section */
.vote-section {
  background: #fff;
}

.vote-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* 猫一覧カードレイアウト */
/* .cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
} */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  justify-content: center;
}
/* 親カードなどはお好みで */
.cat-card {
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 4px;
  /* 幅を「コンテナの50% - gap分」などで指定 */
  /* width: calc(50% - 16px); */
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0; /* flex gapを使うのでマージンは不要 */
  display: flex;
  flex-direction: column;
  height: 100%; /* グリッド内で最大の高さに */
}

/* 投票ボタンまでのデザインは既存を使い、以下コメント部分を追加 */
.support-comments {
  margin-top: 10px;  /* ボタンとコメント群の間にスペース */
  text-align: left;  /* 吹き出しを左寄せにしたい場合 */
  padding: 0 8px;    /* カードの左右に少しインセット */
}

.comment-item {
  margin-bottom: 10px; /* 各コメントと次のコメントとの間隔 */
}

/* ユーザーコメント吹き出し */
.comment-bubble {
  position: relative;
  background: #eee;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 5px; /* 吹き出しと返信の間隔 */
}

.comment-bubble::after {
  content: "";
  position: absolute;
  left: 10px; /* 三角の開始位置 */
  bottom: -8px; /* 吹き出しの下に三角形が出るなら変更 */
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-top-color: #eee; /* 吹き出しと同じ色 */
}

/* 猫返信吹き出し */
.reply-bubble {
  display: flex; /* アイコンとメッセージ吹き出しを横並びに */
  align-items: flex-start; 
  gap: 8px;
  margin-left: 20px; /* ユーザーコメントより少し右へ配置 */
  position: relative;
}

.reply-icon img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.reply-message {
  background: #ffd700;
  border-radius: 10px;
  padding: 10px;
  position: relative;
}

.reply-message::after {
  content: "";
  position: absolute;
  left: -10px; /* アイコンとの位置関係を見ながら */
  top: 10px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-right-color: #ffd700;
}


.cat-card img {
  height: 250px; /* 固定の高さ */
  object-fit: cover; /* アスペクト比保持でトリミング */
}

.cat-info {
  padding: 10px;
}

.cat-info {
  flex: 1; /* 残りスペースを占有 */
  justify-content: space-between; /* 要素を上下に分散 */
}

.primary {
  background: #ff6347;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  margin-top: 8px;
  cursor: pointer;
}
.primary:hover {
  background: #e5573e;
}

/* 新しく追加: グレー系のボタン */
.secondary {
  background: #ccc;   /* グレー */
  color: #333;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  margin: 5px;
  cursor: pointer;
  transition: background 0.3s;
}
.secondary:hover {
  background: #bbb;   /* マウスオーバーで少し濃いグレーに */
}

/* Result Section */
.result-section {
  background: #f8f8f8;
}
.result-section .container {
  text-align: center;
}
.result-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.ranking-list {
  margin: 20px auto;
  padding: 0;
  list-style: none;
  max-width: 400px;
  text-align: left;
}
.ranking-list li {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 20px 0;
}

.site-footer .footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-footer small {
  display: block;
  margin-bottom: 8px;
}

.disclaimer {
  font-size: 0.85rem;
  color: #999;
}

/* モーダルの位置を適切に調整 */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; 
  top: 0;
  width: 100%; 
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center; /* 上下中央寄せ */
}

.modal-content {
  background: #fff;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh; /* 画面の90%の高さまで */
  overflow-y: auto;
  border-radius: 4px;
  
  /* 修正：中央寄せ */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}





.modal-content .close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.error-message {
  color: #b00020;
  margin-bottom: 10px;
  font-weight: bold;
}

/* トースト */
.toast {
  visibility: hidden;
  min-width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  transition: visibility 0.3s, opacity 0.3s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* Responsive (簡易) */
@media screen and (max-width: 768px) {
  .modal-content {
    width: 95%; /* スマホでは幅を少し広げる */
    max-height: 85vh;
  }

  .hero {
    height: 40vh;
    min-height: 200px;
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
  /* .cat-list {
    flex-direction: column;
    align-items: center;
  } */
  .cat-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ==================================================== */
/* モーダル内部の詳細デザイン追加                       */
/* ==================================================== */

/* 既存の .modal, .modal-content 等がある前提 */

/* 猫情報エリア */
.modal-cat-info {
  text-align: center;
  margin-bottom: 20px;
}

/* 画像をモーダル幅に合わせる */
.cat-photo-wide {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover; /* 横幅に合わせて高さをトリミング */
  border-radius: 0;  /* 四隅を丸くしたくない場合 */
  margin-bottom: 10px;
}

/* 例: 高さに上限をつけたい場合はこんな感じで指定 */
.cat-photo-wide {
  max-height: 300px; 
  /* モーダルの高さ内で収まるようにするなら適宜調整 */
}

.cat-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#modalCatName {
  font-size: 1.5rem;
  margin: 5px 0;
}

#modalCatVotes {
  margin: 5px 0;
  font-weight: bold;
}

/* 猫からの応援メッセージエリア */
.cat-message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 10px;
}

/* 猫アイコン（吹き出しの左に配置する想定） */
.cat-icon img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 吹き出し */
.speech-bubble {
  text-align: center;
  left: 10px; 
  position: relative;
  background: #ffd700;
  border-radius: 14px;
  padding: 10px 15px;
  color: #333;
  max-width: 70%;
}

/* 吹き出しの三角形 */
.speech-bubble::after {
  content: "";
  position: absolute;
  left: -17px; /* アイコンとの距離に合わせる */
  top: 20px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-right-color: #ffd700; /* 吹き出しと同じ色 */
}

/* 投票エリア */
.vote-area label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
}

.vote-area input[type="text"],
.vote-area textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.vote-area button {
  display: inline-block;
  margin-top: 5px;
}


/* ランキング */
/*ランキング全体のコンテナ*/
.ranking-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.ranking-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: shimmer 10s ease-in-out infinite alternate;
}

.ranking-section .container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* 結果発表ヘッダー */
.result-announcement {
  text-align: center;
  margin-bottom: 50px;
}

.result-announcement h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: celebration 3s ease-in-out infinite;
}

.result-announcement h3 {
  font-size: 2rem;
  color: #ffd700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.total-votes {
  font-size: 1.3rem;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  display: inline-block;
}

.thank-you {
  font-size: 1.1rem;
  opacity: 0.9;
  font-style: italic;
}

/* 結果ランキング */
.result-ranking {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

/* 結果アイテム共通スタイル */
.result-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.3),
    0 5px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shine 4s ease-in-out infinite;
}

.result-item:hover {
  transform: translateY(-5px) scale(1.02);
}

/* チャンピオン（1位）*/
.champion {
  background: linear-gradient(135deg, #ffd700, #ffed4a);
  color: #333;
  transform: scale(1.15);
  border: 5px solid #ffc107;
  box-shadow: 
    0 20px 40px rgba(255, 215, 0, 0.4),
    0 0 50px rgba(255, 215, 0, 0.3),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
  animation: championGlow 2s ease-in-out infinite alternate;
  position: relative;
}

.champion .cat-avatar {
  width: 100px;
  height: 100px;
  border: 5px solid #fff;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.champion .cat-name {
  font-size: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.champion .votes {
  font-size: 1.8rem;
  font-weight: bold;
  color: #b8860b;
}

/* 準優勝（2位）*/
.runner-up {
  background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
  color: #333;
  transform: scale(1.08);
  border: 4px solid #999;
  box-shadow: 
    0 15px 30px rgba(192, 192, 192, 0.4),
    0 0 30px rgba(192, 192, 192, 0.2);
}

.runner-up .cat-avatar {
  width: 90px;
  height: 90px;
  border: 4px solid #fff;
  box-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
}

.runner-up .cat-name {
  font-size: 1.7rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.runner-up .votes {
  font-size: 1.5rem;
  font-weight: bold;
  color: #666;
}

/* 第3位 */
.third-place {
  background: linear-gradient(135deg, #cd7f32, #daa520);
  color: #333;
  transform: scale(1.05);
  border: 3px solid #b8860b;
  box-shadow: 
    0 12px 25px rgba(205, 127, 50, 0.4),
    0 0 25px rgba(205, 127, 50, 0.2);
}

.third-place .cat-avatar {
  width: 80px;
  height: 80px;
  border: 3px solid #fff;
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.6);
}

.third-place .cat-name {
  font-size: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.third-place .votes {
  font-size: 1.3rem;
  font-weight: bold;
  color: #8b4513;
}

/* TOP10（4位以下）*/
.top-ten {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.top-ten .cat-avatar {
  width: 70px;
  height: 70px;
  border: 2px solid #fff;
}

.top-ten .cat-name {
  font-size: 1.3rem;
  color: white;
}

.top-ten .votes {
  font-size: 1.1rem;
  color: #ffd700;
}

/* 特別ランク表示 */
.rank-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 10px;
}

.special-text {
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.rank-display {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 結果コンテンツ（3列レイアウト）*/
.result-content {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* 左列：猫の写真 */
.cat-photo-column {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.cat-avatar {
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* 中央列：猫の情報 */
.cat-info-column {
  padding: 10px 0;
}

.cat-name {
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: bold;
  text-align: center;
}

.crown-icon {
  font-size: 1.5rem;
  animation: rotate 3s linear infinite;
}

.vote-count {
  margin: 10px 0;
  font-size: 1.2rem;
  text-align: center;
  font-weight: bold;
}

.votes {
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 右列：応援コメント */
.comments-column {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-comment {
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 15px;
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.support-comment:hover {
  transform: translateX(3px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.comment-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.comment-text {
  line-height: 1.4;
  flex-grow: 1;
}

/* チャンピオン用コメントスタイル */
.champion .support-comment {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 74, 0.2));
  border-color: rgba(255, 215, 0, 0.3);
}

/* 準優勝用コメントスタイル */
.runner-up .support-comment {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(229, 229, 229, 0.2));
  border-color: rgba(192, 192, 192, 0.3);
}

/* 第3位用コメントスタイル */
.third-place .support-comment {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(218, 165, 32, 0.2));
  border-color: rgba(205, 127, 50, 0.3);
}

/* TOP10用コメントスタイル */
.top-ten .support-comment {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-color: rgba(102, 126, 234, 0.3);
  color: white;
}

.top-ten .comment-icon {
  opacity: 0.9;
}

/* 旧スタイル（互換性のため残す）*/
.special-rank {
  text-align: center;
  margin-bottom: 20px;
}

.rank-number {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
  animation: pulse 2s ease-in-out infinite;
}

/* 猫の結果表示 */
.cat-result {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cat-details {
  flex-grow: 1;
}

/* 旧スタイル（互換性のため残す）*/
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
}

.rank-item .cat-face {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 順位によるサイズ変化 */
.first-place .cat-face {
  width: 90px;
  height: 90px;
}
.second-place .cat-face {
  width: 75px;
  height: 75px;
}
.third-place .cat-face {
  width: 65px;
  height: 65px;
}

.rank-info h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.rank-info .crown {
  font-size: 1.4rem;
}

.rank-info p {
  margin: 3px 0 0;
  color: #666;
}

/* アニメーション */
@keyframes celebration {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes championGlow {
  0% { 
    box-shadow: 
      0 20px 40px rgba(255, 215, 0, 0.4),
      0 0 50px rgba(255, 215, 0, 0.3),
      inset 0 2px 10px rgba(255, 255, 255, 0.3);
  }
  100% { 
    box-shadow: 
      0 25px 50px rgba(255, 215, 0, 0.6),
      0 0 80px rgba(255, 215, 0, 0.5),
      inset 0 2px 10px rgba(255, 255, 255, 0.5);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .result-announcement h2 {
    font-size: 2rem;
  }
  
  .result-announcement h3 {
    font-size: 1.5rem;
  }
  
  .champion {
    transform: scale(1.1);
  }
  
  .champion .cat-avatar {
    width: 80px;
    height: 80px;
  }
  
  .runner-up {
    transform: scale(1.05);
  }
  
  .runner-up .cat-avatar {
    width: 70px;
    height: 70px;
  }
  
  .third-place {
    transform: scale(1.03);
  }
  
  .third-place .cat-avatar {
    width: 65px;
    height: 65px;
  }
  
  .top-ten .cat-avatar {
    width: 55px;
    height: 55px;
  }
  
  /* 3列レイアウトをモバイルでは縦並びに */
  .result-content {
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
  }
  
  .cat-photo-column {
    order: 1;
  }
  
  .cat-info-column {
    order: 2;
    padding: 5px 0;
  }
  
  .comments-column {
    order: 3;
    padding: 5px 0;
  }
  
  .support-comment {
    justify-content: center;
    font-size: 0.85rem;
    padding: 6px 10px;
  }
  
  .special-text {
    font-size: 1.2rem;
  }
  
  .rank-number {
    font-size: 2rem;
  }
  
  .cat-name {
    font-size: 1.2rem;
  }
  
  .vote-count {
    font-size: 1.1rem;
  }
}
.cat-catchphrase {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff4081; /* ピンク系の可愛いカラー */
  text-align: center;
  background: #fff0f6; /* ほんのりピンクの背景 */
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #ff80ab; /* 明るめのピンク枠 */
  display: inline-block;
  margin-top: 8px;
  box-shadow: 2px 2px 6px rgba(255, 64, 129, 0.2);
}

/* 投票終了メッセージ */
.vote-closed-message {
  text-align: center;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.vote-closed-message::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: celebrationShine 3s ease-in-out infinite;
}

.vote-closed-message p {
  margin: 10px 0;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  position: relative;
  z-index: 2;
}

.vote-closed-message p:first-child {
  font-size: 1.4rem;
  font-weight: bold;
}

/* 無効化されたボタン */
button.disabled {
  background: #6c757d !important;
  color: white !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

button.disabled:hover {
  background: #6c757d !important;
  transform: none !important;
}

@keyframes celebrationShine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 🎊 抽選結果発表セクション 🎊 */
.lottery-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  padding: 60px 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.lottery-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: lotteryShimmer 8s ease-in-out infinite alternate;
}

.lottery-section .container {
  position: relative;
  z-index: 2;
}

.lottery-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: lotteryTitle 3s ease-in-out infinite;
}

/* 抽選アナウンス */
.lottery-announcement {
  text-align: center;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.15);
  padding: 25px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.announcement-text {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: bold;
}

.announcement-date {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* 抽選テーブル */
.lottery-table-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  margin: 40px 0;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 3px rgba(255, 255, 255, 0.8);
  overflow-x: auto;
}

.lottery-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.1rem;
}

.lottery-table th {
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  position: relative;
  border-bottom: 3px solid #a73464;
}

.lottery-table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(45deg, #ffd700, #ffed4a);
}

.lottery-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

/* 当選者行のスタイル */
.lottery-row.champion {
  background: linear-gradient(135deg, #ffe082, #fff176);
  font-weight: bold;
  box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.3);
}

.lottery-row.champion td {
  border-bottom-color: #ffc107;
}

.lottery-row.runner-up {
  background: linear-gradient(135deg, #b3e5fc, #81d4fa);
  font-weight: bold;
  box-shadow: inset 0 0 15px rgba(129, 212, 250, 0.3);
}

.lottery-row.runner-up td {
  border-bottom-color: #29b6f6;
}

.lottery-row.third-place {
  background: linear-gradient(135deg, #ffccbc, #ffab91);
  font-weight: bold;
  box-shadow: inset 0 0 15px rgba(255, 171, 145, 0.3);
}

.lottery-row.third-place td {
  border-bottom-color: #ff8a65;
}

.lottery-row.other {
  background: linear-gradient(135deg, #f5f5f5, #eeeeee);
}

/* 猫情報セル */
.cat-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.winner-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cat-name {
  font-weight: bold;
}

/* コードセル */
.code-cell {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 8px !important;
}

/* プライズセル */
.prize-cell {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* 抽選後のお知らせ */
.lottery-notes {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 30px;
  border-radius: 20px;
  margin-top: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.lottery-notes h4 {
  text-align: center;
  font-size: 1.5rem;
  color: #ff6b9d;
  margin-bottom: 25px;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.lottery-notes .note-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255, 107, 157, 0.1);
  border-radius: 15px;
  transition: all 0.3s ease;
  border-left: 4px solid #ff6b9d;
}

.lottery-notes .note-item:hover {
  background: rgba(255, 107, 157, 0.2);
  transform: translateX(5px);
}

.lottery-notes .note-icon {
  font-size: 1.3rem;
  margin-right: 15px;
  min-width: 35px;
}

/* 抽選待ち表示 */
.lottery-pending {
  text-align: center;
  padding: 60px 20px;
  color: white;
}

.pending-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: spin 4s linear infinite;
}

.pending-title {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.pending-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 30px;
  opacity: 0.9;
}

.pending-decoration {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.deco-icon {
  font-size: 2rem;
  animation: bounce 2s ease-in-out infinite;
}

.deco-icon:nth-child(2) {
  animation-delay: 0.5s;
}

.deco-icon:nth-child(3) {
  animation-delay: 1s;
}

/* アニメーション */
@keyframes lotteryTitle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes lotteryShimmer {
  0% { opacity: 0.3; }
  100% { opacity: 0.7; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .lottery-section h2 {
    font-size: 2rem;
  }
  
  .lottery-table-container {
    padding: 20px 10px;
    margin: 20px 0;
  }
  
  .lottery-table {
    font-size: 0.9rem;
  }
  
  .lottery-table th,
  .lottery-table td {
    padding: 10px 8px;
  }
  
  .cat-info {
    flex-direction: column;
    gap: 5px;
  }
  
  .winner-cat-icon {
    width: 30px;
    height: 30px;
  }
  
  .code-cell {
    font-size: 0.9rem;
  }
  
  .prize-cell {
    font-size: 0.8rem;
  }
  
  .pending-icon {
    font-size: 3rem;
  }
  
  .pending-title {
    font-size: 1.5rem;
  }
  
  .pending-text {
    font-size: 1.1rem;
  }
}

/* 発表予告メッセージ */
.announcement-preview {
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  border-radius: 15px;
  margin: 20px auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 600px;
}

.countdown-message h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: pulse 2s ease-in-out infinite alternate;
}

.big-date {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 25px 0;
  padding: 15px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.announcement-preview p {
  margin: 15px 0;
  line-height: 1.7;
}

.announcement-preview strong {
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.vote-encourage {
  margin: 30px auto !important;
  max-width: 400px;
  animation: glow 3s ease-in-out infinite alternate;
}

.vote-encourage h4 {
  font-size: 1.2rem;
}

/* アニメーション */
@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px rgba(255,154,158,0.3); }
  100% { box-shadow: 0 0 20px rgba(254,207,239,0.6), 0 0 30px rgba(255,154,158,0.4); }
}

/* 猫の名前 */
.cat-name {
  font-size: 1.6rem;  /* 既存より少し大きく */
  font-weight: bold;
  color: #333;
  text-align: center;
}

/* 得票数・コメント数 */
.cat-stats {
  font-size: 0.9rem; /* 控えめなサイズ */
  color: #666; /* 少し薄めの色で目立ちすぎない */
  text-align: center;
  margin-bottom: 5px;
}

/* プレゼントセクション */
.prize-section {
  background: linear-gradient(45deg, #ffeef8, #fff0f6, #fdf2f8);
  padding: 50px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.prize-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 192, 203, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 105, 180, 0.05) 0%, transparent 50%);
  animation: floatBubbles 20s ease-in-out infinite;
}

.prize-section h2 {
  font-size: 2.2rem;
  background: linear-gradient(45deg, #ff6b9d, #c44569, #f8b500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
  text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.3);
}

/* プレゼント紹介部分 */
.prize-intro {
  margin: 40px auto;
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.intro-main {
  font-size: 1.3rem;
  color: #d63384;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(214, 51, 132, 0.2);
}

.intro-sub {
  font-size: 1.4rem;
  color: #495057;
  margin-bottom: 20px;
}

.highlight {
  background: linear-gradient(45deg, #ffeb3b, #ff9800);
  padding: 4px 8px;
  border-radius: 15px;
  color: #333;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
  animation: sparkle 2s ease-in-out infinite;
}

.cat-decoration {
  margin: 30px 0;
}

.floating-cat {
  display: inline-block;
  font-size: 2rem;
  margin: 0 15px;
  animation: bounce 2s ease-in-out infinite;
}

.floating-cat:nth-child(2) {
  animation-delay: 0.5s;
}

.floating-cat:nth-child(3) {
  animation-delay: 1s;
}

/* プレゼント表 */
.prize-table {
  max-width: 900px;
  margin: 40px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 20px 40px rgba(255, 107, 157, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.prize-row {
  display: flex;
  min-height: 80px;
  border-bottom: 2px solid #f8f9fa;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.prize-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.2);
}

.prize-row:last-child {
  border-bottom: none;
}

.prize-header {
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.prize-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shine 3s ease-in-out infinite;
}

.rank-col {
  flex: 1.2;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffeef8, #fff0f6);
  border-right: 3px solid #ffb6c1;
  position: relative;
}

.prize-header .rank-col,
.prize-header .prize-col {
  background: transparent;
  border-right-color: rgba(255, 255, 255, 0.3);
}

.prize-col {
  flex: 2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.rank-badge {
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1rem;
  display: inline-block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.rank-badge:hover {
  transform: scale(1.05);
}

.rank-badge.gold {
  background: linear-gradient(45deg, #ffd700, #ffed4a, #ffc107);
  color: #b8860b;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
  animation: goldGlow 3s ease-in-out infinite alternate;
}

.rank-badge.silver {
  background: linear-gradient(45deg, #c0c0c0, #e5e5e5, #ddd);
  color: #666;
  box-shadow: 0 6px 20px rgba(192, 192, 192, 0.4);
}

.rank-badge.bronze {
  background: linear-gradient(45deg, #cd7f32, #daa520, #f4a460);
  color: #8b4513;
  box-shadow: 0 6px 20px rgba(205, 127, 50, 0.4);
}

.rank-badge.other {
  background: linear-gradient(45deg, #ff69b4, #ff1493, #ff6347);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.rank-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
  font-style: italic;
  opacity: 0.8;
}

.prize-item {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  padding: 15px 18px;
  border-radius: 15px;
  text-align: left;
  font-size: 1rem;
  line-height: 1.5;
  border: 2px solid;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.prize-item:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.gold-prize {
  border-color: #ffd700;
  background: linear-gradient(135deg, #fffacd, #ffffe0);
}

.silver-prize {
  border-color: #c0c0c0;
  background: linear-gradient(135deg, #f8f8f8, #ffffff);
}

.bronze-prize {
  border-color: #cd7f32;
  background: linear-gradient(135deg, #fdf5e6, #fff8dc);
}

.other-prize {
  border-color: #ff69b4;
  background: linear-gradient(135deg, #ffeef8, #fff0f6);
}

.prize-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.prize-item:hover::before {
  animation: sweep 1s ease-in-out;
}

/* プレゼントボックス共通 */
.prize-box {
  padding: 15px;
  margin: 10px auto;
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  font-size: 1.2rem;
  color: #fff;
  text-align: center;
}

/* ランクごとの背景色 */
.first-place { background: #ffd700; }  /* ゴールド */
.second-place { background: #c0c0c0; } /* シルバー */
.third-place { background: #cd7f32; }  /* ブロンズ */
.all-vote { background: #00bcd4; }     /* ブルー */

/* プレゼントの説明 */
.prize-box p {
  margin: 5px 0;
}

/* 注意書き */
.prize-note {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  padding: 30px;
  border-radius: 20px;
  max-width: 700px;
  margin: 40px auto 0;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.1),
    inset 0 1px 3px rgba(255, 255, 255, 0.8);
  border: 3px solid #ffb6c1;
  position: relative;
  z-index: 2;
}

.prize-note h4 {
  font-size: 1.4rem;
  color: #d63384;
  margin-bottom: 20px;
  text-align: center;
}

.note-item {
  display: flex;
  align-items: center;
  margin: 15px 0;
  padding: 12px;
  background: rgba(255, 182, 193, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.note-item:hover {
  background: rgba(255, 182, 193, 0.2);
  transform: translateX(5px);
}

.note-icon {
  font-size: 1.5rem;
  margin-right: 15px;
  min-width: 40px;
}

.love-message {
  text-align: center;
  margin-top: 25px;
  padding: 20px;
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  color: white;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.3);
  animation: heartbeat 2s ease-in-out infinite;
}

/* アニメーション */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes goldGlow {
  0% { box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5); }
  100% { box-shadow: 0 8px 30px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.3); }
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

@keyframes sweep {
  0% { opacity: 0; transform: translateX(-100%); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25%, 75% { transform: scale(1.02); }
  50% { transform: scale(0.98); }
}

@keyframes floatBubbles {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .prize-section h2 {
    font-size: 1.8rem;
  }
  
  .prize-row {
    flex-direction: column;
  }
  
  .rank-col,
  .prize-col {
    border-right: none;
    border-bottom: 2px solid #ffb6c1;
  }
  
  .prize-col {
    border-bottom: none;
  }
  
  .prize-item {
    text-align: center;
    margin: 8px 0;
  }
  
  .floating-cat {
    font-size: 1.5rem;
    margin: 0 10px;
  }
  
  .intro-main, .intro-sub {
    font-size: 1.1rem;
  }
}

/* PC表示対応 */
@media (min-width: 768px) {
  /* ルアニャンズ一覧のPC表示調整 */
  .cat-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .cat-card {
    max-width: none;
  }
  
  /* 抽選テーブルのPC表示調整 */
  .lottery-table-container {
    overflow-x: visible;
    max-width: 1200px;
    margin: 40px auto;
  }
  
  .lottery-table {
    font-size: 1rem;
    table-layout: fixed;
  }
  
  .lottery-table th:first-child,
  .lottery-table td:first-child {
    width: 15%;
  }
  
  .lottery-table th:nth-child(2),
  .lottery-table td:nth-child(2) {
    width: 25%;
  }
  
  .lottery-table th:nth-child(3),
  .lottery-table td:nth-child(3) {
    width: 20%;
  }
  
  .lottery-table th:last-child,
  .lottery-table td:last-child {
    width: 40%;
  }
  
  .cat-info {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: center;
  }
  
  .winner-cat-icon {
    width: 40px;
    height: 40px;
  }
  
  .cat-name {
    white-space: nowrap;
  }
  
  /* containerの中央寄せと最大幅調整 */
  .container {
    max-width: 1200px;
  }
}

@media (min-width: 1024px) {
  /* デスクトップでの更なる調整 */
  .cat-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
  }
  
  .lottery-table {
    font-size: 1.1rem;
  }
  
  .lottery-table th,
  .lottery-table td {
    padding: 18px;
  }
}
