@tailwind base;
@tailwind components;
@tailwind utilities;

/* =========================
   ベース
========================= */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* 横スクロール禁止 */
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #fafafa;
  color: #333;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Screen Reader Only - SEO用（視覚的には非表示） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   ヘッダー
========================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  color: #333;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
}

.topbar .logo a {
  font-weight: bold;
  font-size: 23px;
  color: #333;
  text-decoration: none;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tb-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.tb-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-link {
  padding: 6px 12px;
  background: #333;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}

.auth-link:hover {
  background: #555;
}

.menu-btn {
  font-size: 20px;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

.search {
  display: flex;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

.search input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  box-sizing: border-box;
  min-width: 0;
}

.search button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: #f5f5f5;
  color: #333;
  cursor: pointer;
}

/* =========================
   レスポンシブ調整
========================= */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tb-center {
    width: 100%;
    justify-content: flex-start;
    margin-top: 8px;
  }

  .search {
    max-width: 100%;
  }

  .search input {
    border-radius: 4px 0 0 4px;
    border-left: 1px solid #ccc;
  }

  /* レスポンシブ時はログイン/登録ボタンを非表示（サイドメニューに表示） */
  .tb-right {
    display: none;
  }
}

/* =========================
   サイドバー
========================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  color: #333;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 70px 0 20px;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
  -webkit-overflow-scrolling: touch; /* スマホでスムーズスクロール */
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar a {
  display: block;
  padding: 16px 20px;
  color: #333;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s ease;
  /* タップしやすいように */
  min-height: 52px;
  display: flex;
  align-items: center;
}

.sidebar a:hover,
.sidebar a:active {
  background: #f0f0f0;
}

/* スマホ用の調整 */
@media (max-width: 768px) {
  .sidebar {
    width: 85%;
    max-width: 320px;
  }

  .sidebar a {
    padding: 18px 24px;
    font-size: 17px;
    min-height: 56px;
  }
}

.side-search {
  margin-top: 20px;
}

.side-search input {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
}

.side-search button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 0 4px 4px 0;
  background: #444;
  color: #fff;
  cursor: pointer;
}

/* オーバーレイ */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1050;
}

.overlay.show {
  display: block;
}

/* =========================
   動画グリッド
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 最近見た配信者カード専用スタイル */
.video-card.history-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
  border: 2px solid #e9d5ff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.video-card.history-card:hover {
  border-color: #c084fc;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.thumb {
  position: relative;
  /* ← これを追加 */
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}


.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.history-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  font-weight: bold;
  padding: 4px 8px;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.meta {
  display: flex;
  flex-direction: column;
  /* ← 縦並びにする */
  gap: 4px;
  /* ← タイトルと名前の間隔を調整 */
  padding: 8px 10px;
  align-items: flex-start;
}


.meta .title {
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

.meta .sub {
  font-size: 12px;
  color: #666;
}

/* =========================
   チップ
========================= */
.chips {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  margin: 0 8px;
}

.chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: #eee;
  cursor: pointer;
  font-size: 13px;
}

.chip.is-active {
  background: #333;
  color: #fff;
}

/* =========================
   フッター
========================= */
.footer {
  margin-top: 40px;
  padding: 20px;
  background: #111;
  color: #fff;
  text-align: center;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  margin: 0 8px;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.footer-copy {
  font-size: 13px;
  color: #999;
}

/* =========================
   レスポンシブ
========================= */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .footer-links a {
    margin: 0;
  }
}

/* サイドバー閉じるボタン */
.close-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  /* ← 左上に配置 */
  font-size: 36px;
  /* ← さらに大きく */
  font-weight: bold;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  z-index: 1200;
  width: 50px;
  height: 50px;
  /* ← タップ領域を広く */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-btn:hover,
.close-btn:active {
  background: #f0f0f0;
}

/* スマホでさらに大きく */
@media (max-width: 768px) {
  .close-btn {
    width: 60px;
    height: 60px;
    font-size: 42px;
  }
}


/* ランキング順位バッジ */
.rank {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  background: rgb(238, 0, 0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* 1位：ゴールド - キラキラエフェクト */
.rank.gold {
  background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
  background-size: 200% 200%;
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
              0 0 40px rgba(255, 215, 0, 0.4),
              0 4px 8px rgba(0, 0, 0, 0.3);
  animation: shine 2s infinite, glow 1.5s ease-in-out infinite alternate;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* 2位：シルバー - 輝くエフェクト */
.rank.silver {
  background: linear-gradient(135deg, #e8e8e8, #c0c0c0, #e8e8e8);
  background-size: 200% 200%;
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.7),
              0 0 30px rgba(192, 192, 192, 0.3),
              0 4px 8px rgba(0, 0, 0, 0.3);
  animation: shine 2.5s infinite, glow 2s ease-in-out infinite alternate;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* 3位：ブロンズ - 温かい輝き */
.rank.bronze {
  background: linear-gradient(135deg, #cd7f32, #e89751, #cd7f32);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.7),
              0 0 25px rgba(205, 127, 50, 0.3),
              0 4px 8px rgba(0, 0, 0, 0.3);
  animation: shine 3s infinite, glow 2.5s ease-in-out infinite alternate;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* キラキラアニメーション */
@keyframes shine {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* グローエフェクト */
@keyframes glow {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.2);
  }
}

/* 1-3位のカード全体を強調 */
.video-card.top-rank {
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  border: 2px solid transparent;
}

.video-card.top-rank-1 {
  border-color: rgba(255, 215, 0, 0.5);
  animation: cardGlow 3s ease-in-out infinite;
}

.video-card.top-rank-2 {
  border-color: rgba(192, 192, 192, 0.5);
  animation: cardGlow 3.5s ease-in-out infinite;
}

.video-card.top-rank-3 {
  border-color: rgba(205, 127, 50, 0.5);
  animation: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
  }
}

#loading-indicator {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #666;
}

#loading-indicator .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background: #666;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

#loading-indicator .dot:nth-child(1) {
  animation-delay: 0s;
}

#loading-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

#loading-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {

  0%,
  80%,
  100% {
    opacity: 0;
  }

  40% {
    opacity: 1;
  }
}

.loader {
  text-align: center;
  margin: 12px 0;
}

.loader span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 3px;
  background: #666;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.4;
  }

  to {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* 関連パフォーマーのカード（画像＋テキストを横並びにする） */
.related-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  /* 左:画像 右:テキスト */
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.related-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: #ddd;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.related-meta {
  font-size: 12px;
  color: #555;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  /* 枠の間隔を少し広めに */
  margin: 24px 0;
}

.pagination a {
  display: inline-block;
  padding: 12px 20px;
  /* ← ボタンを大きくする */
  border: 1px solid #ccc;
  border-radius: 8px;
  /* ← 角を少し丸める */
  text-decoration: none;
  color: #222;
  background: #fff;
  font-size: 16px;
  /* ← 文字を大きくする */
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.pagination a:hover {
  background: #f0f0f0;
}

.pagination a.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

.pagination a:active {
  transform: scale(0.96);
  /* ← 押した感 */
}

/* お気に入りボタン */
.favorite-btn {
  padding: 6px 12px;
  background: #ff4081;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.favorite-btn:hover {
  background: #e91e63;
}

/* =========================
   勢いランキング
========================= */
.momentum-swiper {
  padding: 0 40px;
}

.momentum-swiper .swiper-slide {
  width: 220px;
}

@media (max-width: 600px) {
  .momentum-swiper .swiper-slide {
    width: 160px;
  }
}

.momentum-swiper .swiper-button-next,
.momentum-swiper .swiper-button-prev {
  color: #333;
}

.momentum-swiper .swiper-button-next:after,
.momentum-swiper .swiper-button-prev:after {
  font-size: 24px;
}

.momentum-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #ff4444, #ff6b6b);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.momentum-icon {
  font-size: 14px;
}

.momentum-rate {
  font-size: 11px;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.7);
  }
}

/* =========================
   視聴履歴Swiper
========================= */
.history-swiper {
  padding: 0 40px;
}

.history-swiper .swiper-slide {
  width: 220px;
}

@media (max-width: 600px) {
  .history-swiper .swiper-slide {
    width: 160px;
  }
}

.history-swiper .swiper-button-next,
.history-swiper .swiper-button-prev {
  color: #333;
}

.history-swiper .swiper-button-next:after,
.history-swiper .swiper-button-prev:after {
  font-size: 24px;
}

/* =========================
   タグフィルター
========================= */
.tag-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-filter-btn {
  padding: 8px 16px;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tag-filter-btn:hover {
  background: #e8e8e8;
  border-color: #ccc;
}

.tag-filter-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

@media (max-width: 600px) {
  .tag-filter-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* =========================
   配信者ページ（Performer Show）
========================= */
.video-page {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 16px;
}

.player {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  margin-top: 12px;
}

.video-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  margin-bottom: 16px;
}

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

.subscribe-btn {
  margin-left: auto;
  padding: 6px 12px;
  background: red;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 768px) {
  .channel-info {
    flex-wrap: wrap;
  }

  .subscribe-btn,
  .favorite-btn {
    width: 100%;
    margin: 8px 0 0 0 !important;
  }
}

.related {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-header {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
}

.tab-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.refresh-btn {
  padding: 6px 12px;
  border: 1px solid #0066cc;
  background: #0066cc;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
}

.refresh-btn:hover {
  background: #0052a3;
  border-color: #0052a3;
}

.refresh-btn:active {
  transform: scale(0.95);
}

.related-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.related-thumb {
  aspect-ratio: 16/9;
  background: #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-title {
  font-size: 14px;
  font-weight: bold;
}

.related-meta {
  font-size: 12px;
  color: #555;
}

@media (max-width: 900px) {
  .video-page {
    grid-template-columns: 1fr;
  }
}

/* =========================
   管理画面（Admin Dashboard）
========================= */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: #333;
    color: #fff;
    padding: 15px 20px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

.section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.nav-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.nav-links a:hover {
    background: #0052a3;
}

.admin-container table {
    width: 100%;
    border-collapse: collapse;
}

.admin-container th,
.admin-container td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-container th {
    background: #f5f5f5;
    font-weight: bold;
}

/* =========================
   お気に入りページ（Favorites）
========================= */
.favorite-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* =========================
   汎用コンテナクラス（Utility Containers）
========================= */
.container-1200 {
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 0 16px;
}

.container-1200-tight {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

.container-1200-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.container-960 {
    max-width: 960px;
    margin: 40px auto;
    padding: 16px;
}

.container-800 {
    max-width: 800px;
    margin: 40px auto;
    padding: 24px;
}

.container-600 {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 16px;
}

.container-600-center {
    max-width: 600px;
    margin: 80px auto;
    padding: 0 16px;
    text-align: center;
}

.container-400-auth {
    max-width: 400px;
    margin: 60px auto;
    padding: 24px;
}

/* =========================
   Flexbox汎用クラス（Utility Flex）
========================= */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-between-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.flex-between-start {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.flex-center {
    display: flex;
    align-items: center;
}

/* =========================
   テキスト汎用クラス（Utility Text）
========================= */
.text-center {
    text-align: center;
}

.text-center-padded {
    text-align: center;
    padding: 40px;
}

/* =========================
   ボタン汎用クラス（Utility Buttons）
========================= */
.btn-primary {
    padding: 10px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #555;
}

.btn-primary-sm {
    padding: 8px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary-sm:hover {
    background: #555;
}

.btn-delete {
    padding: 4px 12px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-delete:hover {
    background: #d32f2f;
}

.btn-success {
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-success:hover {
    background: #45a049;
}

/* =========================
   X（Twitter）シェアボタン
========================= */
/* ヘッダー用（PC） */
.x-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    margin-left: 8px;
}

.x-share-btn:hover {
    background: #000;
    color: #fff;
}

.x-share-btn svg {
    display: block;
}

/* サイドバー用（スマホ） */
.x-share-sidebar {
    display: block;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s;
}

.x-share-sidebar:hover {
    background: #f5f5f5;
}

/* =========================
   年齢確認モーダル
========================= */
.age-verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.age-verification-modal {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: scaleIn 0.3s ease-out;
}

.age-verification-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.age-verification-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.age-verification-text {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 32px;
}

.age-verification-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.age-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    max-width: 200px;
}

.age-btn-yes {
    background: #4CAF50;
    color: #fff;
}

.age-btn-yes:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.age-btn-no {
    background: #f44336;
    color: #fff;
}

.age-btn-no:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.age-verification-note {
    font-size: 12px;
    color: #999;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        transform: scale(0.9);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* スマホ対応 */
@media (max-width: 768px) {
    .age-verification-modal {
        padding: 40px 24px;
    }

    .age-verification-title {
        font-size: 24px;
    }

    .age-verification-buttons {
        flex-direction: column;
    }

    .age-btn {
        max-width: 100%;
    }
}

/* =========================
   管理画面レスポンシブ対応
========================= */

/* 管理画面ヘッダー改良 */
.admin-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-title {
    margin: 0;
    font-size: 20px;
}

.admin-menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px 10px;
}

.btn-back-site {
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.btn-back-site:hover {
    background: #0052a3;
}

.btn-logout {
    background: none;
    border: none;
    color: #ff4081;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    text-decoration: underline;
    white-space: nowrap;
}

.btn-logout:hover {
    color: #ff6090;
}

/* ナビゲーション */
.admin-nav {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.admin-nav-link {
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.admin-nav-link:hover {
    background: #0052a3;
}

.admin-nav-link.active {
    background: #ff4081;
}

.admin-nav-overlay {
    display: none;
}

/* 統計カードグリッドの改良 */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* テーブルレスポンシブ対応 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

/* モバイル対応 (768px以下) */
@media (max-width: 768px) {
    .admin-header {
        padding: 12px 16px;
    }
    
    .admin-title {
        font-size: 18px;
    }
    
    .admin-menu-btn {
        display: block;
    }
    
    .admin-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        z-index: 2000;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 60px 0 20px;
        overflow-y: auto;
        transition: right 0.3s ease;
    }
    
    .admin-nav.open {
        right: 0;
    }
    
    .admin-nav-link {
        border-radius: 0;
        background: transparent;
        color: #333;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
        font-size: 16px;
    }
    
    .admin-nav-link:hover {
        background: #f5f5f5;
    }
    
    .admin-nav-link.active {
        background: #e3f2fd;
        color: #0066cc;
        border-left: 4px solid #0066cc;
    }
    
    .admin-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    
    .admin-nav-overlay.active {
        display: block;
    }
    
    .admin-header-right {
        flex-wrap: wrap;
    }
    
    .btn-back-site,
    .btn-logout {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* 統計カードのモバイル最適化 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    /* テーブルのモバイル最適化 */
    .admin-container table {
        font-size: 14px;
    }
    
    .admin-container th,
    .admin-container td {
        padding: 8px;
    }
    
    .admin-container {
        padding: 12px;
    }
    
    .section {
        padding: 16px;
    }
    
    .section h3 {
        font-size: 16px;
    }
}

/* タブレット対応 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .admin-nav {
        gap: 10px;
    }
    
    .admin-nav-link {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* 小型モバイル対応 (480px以下) */
@media (max-width: 480px) {
    .admin-title {
        font-size: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .admin-container h2 {
        font-size: 20px;
    }
    
    .section h3 {
        font-size: 15px;
    }
}
