/* 比較ひろば デザインシステム v2 - リッチデザイン版 */

:root {
  --primary: #0f1d3f;
  --primary-light: #1a2d5e;
  --accent: #ff6b35;
  --accent-light: #ff9558;
  --accent-dark: #e54d18;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #d63031;
  --gold: #fbbf24;
  --silver: #94a3b8;
  --bronze: #c87f55;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --bg: #fafbfc;
  --card-shadow: 0 4px 20px rgba(15, 29, 63, 0.08);
  --card-shadow-lg: 0 10px 40px rgba(15, 29, 63, 0.12);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', YuGothic, 'Noto Sans JP', Meiryo, sans-serif;
  font-feature-settings: 'palt' 1;
  letter-spacing: 0.02em;
  background: var(--bg);
  color: var(--ink);
}

/* タイポグラフィ */
.font-display {
  font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.title-mega {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.title-xl {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* リボン */
.ribbon {
  position: absolute;
  top: -12px;
  left: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 8px 18px;
  font-weight: 900;
  font-size: 13px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  z-index: 5;
}

.ribbon::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  border-top: 6px solid var(--accent-dark);
  border-left: 6px solid transparent;
}

/* ランキングメダル */
.medal-1 {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.medal-2 {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  color: #334155;
}

.medal-3 {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  color: #fefce8;
}

/* スコアバー */
.score-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
  position: relative;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* 5段階の星 */
.stars {
  display: inline-flex;
  gap: 2px;
  font-size: 16px;
  letter-spacing: 1px;
}

.stars-bg {
  color: #e5e7eb;
}

.stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  color: #f59e0b;
  overflow: hidden;
  white-space: nowrap;
}

.stars-wrap {
  position: relative;
  display: inline-block;
}

/* カード */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-lg);
}

.card-rank {
  position: relative;
  border: 3px solid transparent;
  background: white;
  background-clip: padding-box;
}

.card-rank-1 {
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, white 100%);
}

.card-rank-2 {
  border-color: #94a3b8;
  background: linear-gradient(180deg, #f8fafc 0%, white 100%);
}

.card-rank-3 {
  border-color: #d97706;
  background: linear-gradient(180deg, #fef3c7 0%, white 100%);
}

/* グラデーションテキスト */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* バッジ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.badge-best {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
}

.badge-popular {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.badge-new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge-recommend {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

/* CTAボタン */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 9999px;
  font-weight: 900;
  font-size: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-cta:hover::before {
  left: 100%;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 107, 53, 0.45);
}

/* フローティングCTA */
.float-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  animation: bounce 2s infinite;
}

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

/* ヒーローセクション */
.hero-bg {
  background:
    radial-gradient(ellipse at top, rgba(255, 107, 53, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(15, 29, 63, 0.95) 0%, rgba(15, 29, 63, 1) 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px;
  pointer-events: none;
}

/* メッシュ風パターン */
.mesh-bg {
  background:
    radial-gradient(at 20% 20%, rgba(255, 107, 53, 0.1) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 80%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(251, 191, 36, 0.08) 0px, transparent 50%);
}

/* ジャンルアイコンカード */
.genre-card {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--card-shadow);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.genre-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient, linear-gradient(90deg, #ff6b35, #f59e0b));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.genre-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 29, 63, 0.15);
  border-color: var(--accent-light);
}

.genre-card:hover::before {
  transform: scaleX(1);
}

.genre-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 40px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* 比較表 */
.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.compare-table thead {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
}

.compare-table th {
  padding: 16px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-align: center;
}

.compare-table td {
  padding: 18px 16px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  font-size: 14px;
}

.compare-table tbody tr:hover {
  background: #fef9f3;
}

.compare-table .row-rank-1 {
  background: linear-gradient(90deg, #fffbeb 0%, white 30%);
  border-left: 4px solid #fbbf24;
}

/* 数値バッジ */
.score-num {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
}

.score-num .num {
  font-size: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-num .unit {
  font-size: 14px;
  color: var(--muted);
  margin-left: 2px;
}

/* チェックマーク・バツ */
.check-yes {
  color: #10b981;
  font-size: 20px;
  font-weight: bold;
}

.check-no {
  color: #ef4444;
  font-size: 18px;
}

/* セクション区切り */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 60px 0 32px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #e5e7eb 50%, transparent 100%);
}

.section-divider span {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* セクションタイトル */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title-eyebrow {
  display: inline-block;
  padding: 4px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-title-main {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.section-title-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

/* スティッキーヘッダー */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e7eb;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .title-mega { font-size: 2rem; }
  .title-xl { font-size: 1.5rem; }
  .genre-icon { width: 60px; height: 60px; font-size: 30px; }
  .section-title-main { font-size: 1.5rem; }
  .float-cta {
    bottom: 12px;
    right: 12px;
  }
}

/* ホバーアニメ */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-lg);
}

/* グラスモルフィズム */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* カウンター */
.counter {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  font-family: 'Hiragino Sans', system-ui, sans-serif;
}

.counter-num {
  font-size: 56px;
  background: linear-gradient(135deg, #ff6b35 0%, #e54d18 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  line-height: 1;
}

.counter-label {
  font-size: 16px;
  color: var(--muted);
  margin-left: 8px;
}

/* プロコン */
.pro-card {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
}

.con-card {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
}

/* タブ */
.tab-pill {
  padding: 8px 20px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  color: var(--muted);
  border: 1px solid #e5e7eb;
}

.tab-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.tab-pill.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* line-clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* フォーカス */
a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(255, 107, 53, 0.4);
  outline-offset: 2px;
  border-radius: 4px;
}

/* スクロールバー */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* プリント */
@media print {
  header, footer, .no-print, .float-cta {
    display: none;
  }
}
