/* ==========================================================================
   Content Curation Portal - Portal Top Page Styles
   ========================================================================== */

/* Top Portal Header */
.portal-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: var(--bg-glass);
}

.portal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.portal-brand-banner {
  height: 40px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.portal-brand-banner:hover {
  transform: scale(1.02);
}

.portal-logo-icon {
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.portal-brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Announcement Banner */
.announcement-bar {
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.announcement-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}

/* Hero Section */
.portal-hero {
  padding: 3rem 0 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(79, 70, 229, 0.08) 0%, transparent 60%);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-title span.highlight {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.75rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Japan Map Section */
.map-section {
  margin-bottom: 2.5rem;
}

.map-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.map-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.map-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Region Tabs */
.region-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.region-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.region-tab-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.region-tab-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.region-count-badge {
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.6875rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.region-tab-btn.active .region-count-badge {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.region-count-badge.count-active {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

/* Toggle Pref Grid */
.toggle-pref-grid-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.toggle-pref-grid-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  background: #f5f3ff;
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.toggle-pref-grid-btn:hover {
  background: #ede9fe;
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
}

.toggle-pref-grid-btn .toggle-icon {
  font-size: 0.6875rem;
  transition: transform var(--transition-fast);
}

/* Map Grid Container & Visibility */
.map-grid-container {
  margin-top: 1.25rem;
  transition: all var(--transition-normal);
}

.map-grid-container.hidden {
  display: none;
}

/* Map Regions Grid */
.map-regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.region-block {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.875rem;
  transition: all var(--transition-fast);
}

.region-block.region-highlight {
  border-color: var(--color-primary);
  background: #f5f3ff;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.region-block-header {
  border-left: 4px solid var(--color-primary);
  padding-left: 0.5rem;
  margin-bottom: 0.625rem;
}

.region-block-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-main);
}

.pref-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pref-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pref-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-main);
  transform: translateY(-1px);
}

.pref-chip.has-vtubers {
  border-color: #a7f3d0;
  background: #f0fdf4;
  color: #065f46;
  font-weight: 700;
}

.pref-chip.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.pref-chip.selected .pref-count {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.pref-count {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.625rem;
  padding: 0.05rem 0.35rem;
  border-radius: var(--radius-full);
}

/* Controls & Filter Bar */
.portal-controls {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input-wrapper svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
}

.portal-search-input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f8fafc;
  transition: all var(--transition-fast);
}

.portal-search-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.portal-sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-sort-select {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
  font-weight: 500;
  cursor: pointer;
}

/* Stats Info Bar */
.portal-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.active-filter-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

.btn-clear-filter {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

/* VTuber Cards Grid */
.vtuber-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

/* VTuber Card */
.vtuber-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.vtuber-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.vtuber-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vtuber-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0, 0, 0, 0.1);
}

.vtuber-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.vtuber-card:hover .vtuber-avatar {
  transform: scale(1.06);
}

.vtuber-header-meta {
  flex: 1;
  min-width: 0;
}

.vtuber-pref-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.25rem;
}

.vtuber-name {
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vtuber-catchphrase {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e11d48;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.vtuber-bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.vtuber-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}

.vtuber-social-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icon-btn,
.social-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: all var(--transition-fast);
}

.social-icon-badge:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.social-icon-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-open-hub {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-open-hub:hover {
  background: linear-gradient(135deg, var(--color-primary-hover), #4f46e5);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

/* Empty State */
.portal-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-light);
  grid-column: 1 / -1;
}

.portal-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.portal-empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.portal-empty-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Portal Footer */
.portal-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 2rem;
  margin-top: auto;
  font-size: 0.875rem;
}

.portal-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand h4 {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-brand-banner {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: inline-block;
  background: #ffffff;
  padding: 6px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.footer-brand-banner:hover {
  transform: scale(1.02);
}

.footer-links-group {
  display: flex;
  gap: 2rem;
}

.footer-links-col h5 {
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.875rem;
  }
  .portal-header-inner {
    height: 64px;
  }
  .vtuber-cards-grid {
    grid-template-columns: 1fr;
  }
  .portal-controls {
    flex-direction: column;
    align-items: stretch;
  }
}


/* === おゆかりV マップ & お気に入り機能 スタイル追加 === */

/* 表示切り替えタブ（すべて / お気に入り） */
.portal-view-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portal-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.portal-view-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.portal-view-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.portal-view-tab.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tab-count-badge.badge-fav {
  background: #fef08a;
  color: #854d0e;
}

.portal-view-tab.active .tab-count-badge.badge-fav {
  background: #ffffff;
  color: #ca8a04;
}

/* カード内お気に入りボタン */
.vtuber-card {
  position: relative;
}

.vtuber-fav-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.vtuber-fav-btn:hover {
  transform: scale(1.15);
  color: #eab308;
  border-color: #fde047;
  background: #ffffff;
}

.vtuber-fav-btn.is-favorite {
  color: #eab308;
  border-color: #facc15;
  background: #fefce8;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.25);
  animation: favPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes favPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* 複数おゆかり地域バッジリスト */
.vtuber-regions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}

.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  line-height: 1.2;
}

.region-tag.primary-region {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.region-tag.secondary-region {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.region-tag.more-region {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.6875rem;
  padding: 0.2rem 0.4rem;
}

/* トップページ VTuber一覧のYouTube等SNS・コンテンツ種類アイコン非表示 */
.vtuber-social-links {
  display: none !important;
}

.vtuber-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding-top: 1rem !important;
  border-top: 1px solid #f1f5f9 !important;
  margin-top: auto !important;
}

.btn-view-hub {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  margin-left: auto;
  transition: all var(--transition-fast);
}

.btn-view-hub:hover {
  color: var(--color-primary-hover);
  transform: translateX(2px);
}
