/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* ラジオボタンのhoverスタイル */
/* 非選択時: グレー背景 */
input[type="radio"]:not(:checked) + span:hover,
label:has(input[type="radio"]:not(:checked)) span:hover {
  background-color: rgb(243, 244, 246); /* gray-100 */
}

/* 選択時: 濃いindigo背景を維持 */
input[type="radio"]:checked + span:hover,
label:has(input[type="radio"]:checked) span:hover {
  background-color: rgb(67, 56, 202) !important; /* indigo-700 */
  color: white !important;
}

/* リンクのactive状態で子要素の文字色を維持（Tailwind色を明示指定） */
a:active .text-gray-900 { color: rgb(17, 24, 39) !important; }
a:active .text-gray-700 { color: rgb(55, 65, 81) !important; }
a:active .text-gray-600 { color: rgb(75, 85, 99) !important; }
a:active .text-gray-500 { color: rgb(107, 114, 128) !important; }
a:active .text-gray-400 { color: rgb(156, 163, 175) !important; }
a:active .text-green-600 { color: rgb(22, 163, 74) !important; }
a:active .text-green-500 { color: rgb(34, 197, 94) !important; }
a:active .text-red-600 { color: rgb(220, 38, 38) !important; }
a:active .text-red-500 { color: rgb(239, 68, 68) !important; }
a:active .text-indigo-600 { color: rgb(79, 70, 229) !important; }
a:active .text-indigo-400 { color: rgb(129, 140, 248) !important; }
a:active .text-indigo-300 { color: rgb(165, 180, 252) !important; }
a:active .text-yellow-900 { color: rgb(113, 63, 18) !important; }
a:active .text-amber-600 { color: rgb(217, 119, 6) !important; }
a:active .text-white { color: rgb(255, 255, 255) !important; }
a:active .font-semibold { color: rgb(17, 24, 39) !important; }
a:active h3 { color: rgb(17, 24, 39) !important; }

/* ============================================
   Logo Styles
   ============================================ */

.logo-container {
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.logo-container:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.logo-container img {
  height: auto;
  max-width: 100%;
  display: block;
}

/* ============================================
   RANKING ARENA - Saiseikai Inspired Styles
   ============================================ */

/* CSS Custom Properties */
:root {
  --color-primary: #0ea5e9; /* sky-500 */
  --color-primary-light: #e0f2fe; /* sky-100 */
  --color-primary-dark: #0284c7; /* sky-600 */
  --color-accent: #f97316; /* orange-500 */
  --color-accent-light: #ffedd5; /* orange-100 */
  --color-bg: #f8fafc; /* slate-50 */
  --color-card: #ffffff;
  --color-text: #334155; /* slate-700 */
  --color-text-light: #64748b; /* slate-500 */
  --color-text-muted: #94a3b8; /* slate-400 */
  --color-border: #e2e8f0; /* slate-200 */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Font Families */
.font-display {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
}

.font-body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
}

/* Page Background */
.arena-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e0f2fe 100%);
  position: relative;
  overflow: hidden;
}

.arena-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(249, 115, 22, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

/* Section Header with English Subtitle */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.section-header-subtitle {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Card Styles */
.glass-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

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

/* Stat Card */
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* Rank Badge Styles */
.rank-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 800;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.ranking-card:hover .rank-badge {
  transform: scale(1.1);
}

.rank-1 {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(180, 83, 9, 0.4);
  box-shadow: 
    0 4px 12px rgba(245, 158, 11, 0.4),
    0 2px 4px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.rank-2 {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(51, 65, 85, 0.3);
  box-shadow: 
    0 4px 12px rgba(100, 116, 139, 0.4),
    0 2px 4px rgba(100, 116, 139, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.rank-3 {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: #fff;
  box-shadow: 
    0 6px 20px rgba(251, 146, 60, 0.5),
    0 2px 6px rgba(251, 146, 60, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.rank-other {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: #fff;
  box-shadow: 
    0 4px 12px rgba(148, 163, 184, 0.4),
    0 2px 4px rgba(148, 163, 184, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Ranking Card */
.ranking-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ranking-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.02) 0%, rgba(249, 115, 22, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.05), 
    0 10px 10px -5px rgba(0, 0, 0, 0.02);
  border-color: rgba(14, 165, 233, 0.5);
}

.ranking-card:hover::after {
  opacity: 1;
}

.ranking-card:hover .ranking-card-image img {
  transform: scale(1.08);
}

.ranking-card-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
}

.ranking-card-image img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1) contrast(1);
}

.ranking-card:hover .ranking-card-image img {
  filter: brightness(1.05) contrast(1.05);
}

/* Category Section */
.category-section {
  position: relative;
  padding-left: 0;
  z-index: 1;
}

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

.category-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #dbeafe 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(14, 165, 233, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.category-section:hover .category-icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 
    0 6px 20px rgba(14, 165, 233, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.category-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}

/* Staggered Animation */
@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-slide-up 0.5s ease-out forwards;
  opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Horizontal Scroll */
.scroll-container {
  position: relative;
}

.scroll-container::-webkit-scrollbar {
  height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: var(--color-border);
  border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

/* CTA Button */
.cta-button {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  box-shadow: 
    0 4px 12px rgba(14, 165, 233, 0.25),
    0 2px 4px rgba(14, 165, 233, 0.15);
}

.cta-button::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;
}

.cta-button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0369a1 100%);
  transform: translateY(-3px);
  box-shadow: 
    0 12px 32px rgba(14, 165, 233, 0.4),
    0 4px 12px rgba(14, 165, 233, 0.25);
}

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

/* Secondary Button */
.secondary-button {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
}

.secondary-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #dbeafe 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(14, 165, 233, 0.2),
    0 2px 8px rgba(14, 165, 233, 0.1);
}

/* Win Rate Bar */
.win-rate-bar {
  height: 8px;
  background: linear-gradient(90deg, var(--color-border) 0%, #f1f5f9 100%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  position: relative;
}

.win-rate-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-accent) 100%);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.win-rate-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

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

/* Link with Arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.link-arrow::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  transition: width 0.3s ease;
}

.link-arrow:hover {
  gap: 0.75rem;
  color: var(--color-primary-dark);
}

.link-arrow:hover::after {
  width: 100%;
}

.link-arrow svg {
  transition: transform 0.2s ease;
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* Tag/Badge */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}

.tag-accent {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Hero Section */
.hero-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  background: linear-gradient(135deg, #1e293b 0%, #0284c7 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  letter-spacing: -0.03em;
  position: relative;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.hero-subtitle {
  color: var(--color-text-light);
  line-height: 1.8;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* No Data State */
.no-data-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.no-data-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.no-data-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-data-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.cta-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #dbeafe 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 24px rgba(14, 165, 233, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
  transition: all 0.4s ease;
}

.cta-section:hover .cta-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 12px 32px rgba(14, 165, 233, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.cta-icon svg {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
}

/* ============================================
   Accessibility & Performance Improvements
   ============================================ */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* Focus Styles for Keyboard Navigation */
.ranking-card:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.ranking-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.cta-button:focus,
.secondary-button:focus,
.link-arrow:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.cta-button:focus-visible,
.secondary-button:focus-visible,
.link-arrow:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* Remove outline for mouse users */
.ranking-card:focus:not(:focus-visible),
.cta-button:focus:not(:focus-visible),
.secondary-button:focus:not(:focus-visible),
.link-arrow:focus:not(:focus-visible) {
  outline: none;
}

/* GPU Acceleration for Animations */
.ranking-card,
.glass-card,
.stat-card {
  will-change: transform;
}

.ranking-card-image img {
  will-change: transform;
}

/* Smoother Animation Curve */
.ranking-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Horizontal Scroll Indicators */
.scroll-wrapper {
  position: relative;
}

.scroll-wrapper::before,
.scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 20px;
  width: 48px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg), transparent);
}

.scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg), transparent);
}

.scroll-wrapper.can-scroll-left::before {
  opacity: 1;
}

.scroll-wrapper.can-scroll-right::after {
  opacity: 1;
}

/* Scroll Arrows */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  width: 40px;
  height: 40px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-arrow:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.scroll-arrow:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.scroll-arrow svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

.scroll-arrow-left {
  left: -20px;
}

.scroll-arrow-right {
  right: -20px;
}

.scroll-wrapper.can-scroll-left .scroll-arrow-left,
.scroll-wrapper.can-scroll-right .scroll-arrow-right {
  opacity: 1;
  pointer-events: auto;
}

/* Hide scroll arrows on mobile */
@media (max-width: 640px) {
  .scroll-arrow {
    display: none;
  }
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border) 25%,
    #f1f5f9 50%,
    var(--color-border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.skeleton-image {
  height: 144px;
  background: var(--color-border);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text-sm {
  height: 0.75rem;
}

/* Image Loading State */
.image-loading {
  position: relative;
  overflow: hidden;
}

.image-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-border);
  animation: skeleton-loading 1.5s infinite;
  background-size: 200% 100%;
  z-index: 1;
}

.image-loading img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-loading.loaded::before {
  display: none;
}

.image-loading.loaded img {
  opacity: 1;
}

/* Minimum Touch Target Size */
@media (pointer: coarse) {
  .link-arrow,
  .scroll-arrow,
  button,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up {
    animation: none;
    opacity: 1;
  }

  .ranking-card,
  .glass-card,
  .ranking-card-image img {
    transition: none;
  }

  .skeleton {
    animation: none;
  }
}

/* Error State Card */
.error-card {
  background: var(--color-card);
  border: 1px solid #fecaca; /* red-200 */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 3rem;
  text-align: center;
  margin-bottom: 2rem;
}

.error-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: #fef2f2; /* red-50 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon svg {
  width: 36px;
  height: 36px;
  color: #ef4444; /* red-500 */
}

.error-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #991b1b; /* red-800 */
  margin-bottom: 0.5rem;
}

.error-message {
  color: #b91c1c; /* red-700 */
  margin-bottom: 1.5rem;
}

/* ============================================
   Monetization - Ad & Affiliate Styles
   ============================================ */

/* Ad Container Base */
.ad-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Ad Label */
.ad-label {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
}

/* Rectangle Ad (300x250) */
.ad-rectangle {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
  margin: 0 auto;
}

/* Leaderboard Ad (728x90) */
.ad-leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .ad-leaderboard {
    max-width: 320px;
    min-height: 100px;
  }
}

/* Native Ad - Blends with content */
.ad-native {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: all 0.3s ease;
}

.ad-native:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.ad-native-image {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-border);
}

.ad-native-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-native-content {
  flex: 1;
  min-width: 0;
}

.ad-native-title {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-native-description {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-native-cta {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ad-native {
    flex-direction: column;
    text-align: center;
  }

  .ad-native-image {
    width: 100%;
    height: 140px;
  }
}

/* In-Feed Ad Slot */
.ad-infeed {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  margin: 1.5rem 0;
}

/* Ad Section Wrapper */
.ad-section {
  padding: 1.5rem 0;
}

.ad-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* Affiliate Button on Ranking Cards */
.affiliate-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--color-accent);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
  z-index: 5;
}

.affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, #ea580c 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  text-decoration: none;
}

.affiliate-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.affiliate-link svg {
  width: 14px;
  height: 14px;
}

/* Mobile Sticky Bottom Ad */
.sticky-bottom-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  z-index: 1000;
  display: none;
}

.sticky-bottom-ad-inner {
  max-width: 320px;
  margin: 0 auto;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-sm);
  position: relative;
}

.sticky-ad-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.sticky-ad-close:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .sticky-bottom-ad {
    display: block;
  }

  /* Add padding to main content to avoid overlap */
  main {
    padding-bottom: 70px;
  }
}

/* Responsive Ad Placeholder Text */
.ad-placeholder {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem;
}

/* Horizontal Scroll Ad Card (same style as ranking cards) */
.ad-scroll-card {
  flex-shrink: 0;
  width: 176px;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, #fff7ed 100%);
  border: 2px dashed var(--color-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.ad-scroll-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
}

@media (min-width: 640px) {
  .ad-scroll-card {
    width: 208px;
    min-height: 260px;
  }
}

.ad-scroll-card-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.ad-scroll-card-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.ad-scroll-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.ad-scroll-card-desc {
  font-size: 0.7rem;
  color: var(--color-text-light);
}

/* Sidebar Ad (for future use) */
.ad-sidebar {
  position: sticky;
  top: 1rem;
}

/* Premium/Featured Item Highlight */
.ranking-card-featured {
  border: 2px solid var(--color-accent);
  position: relative;
}

.ranking-card-featured::before {
  content: 'PR';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-accent);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 10;
}

/* CTA Banner for monetization */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.cta-banner-desc {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  position: relative;
}

.cta-banner-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--color-primary-dark);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  position: relative;
}

.cta-banner-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Sample Ad Banners
   ============================================ */

/* Leaderboard Banner (728x90) */
.sample-banner-leaderboard {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  overflow: hidden;
  position: relative;
}

.sample-banner-leaderboard::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.sample-banner-leaderboard::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.sample-banner-content {
  position: relative;
  z-index: 1;
}

.sample-banner-title {
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.sample-banner-subtitle {
  color: white;
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sample-banner-cta {
  position: relative;
  z-index: 1;
  background: white;
  color: #667eea;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sample-banner-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .sample-banner-leaderboard {
    max-width: 320px;
    height: 100px;
    padding: 0 1rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
  }

  .sample-banner-title {
    font-size: 0.95rem;
  }

  .sample-banner-subtitle {
    font-size: 0.75rem;
  }

  .sample-banner-cta {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }
}

/* Rectangle Banner (336x280) */
.sample-banner-rectangle {
  width: 100%;
  max-width: 336px;
  height: 280px;
  margin: 0 auto;
  background: linear-gradient(180deg, #ff6b6b 0%, #ee5a5a 100%);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sample-banner-rectangle::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.sample-banner-rectangle .sample-banner-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.sample-banner-rectangle .sample-banner-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.sample-banner-rectangle .sample-banner-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.sample-banner-rectangle .sample-banner-subtitle {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  max-width: 250px;
}

.sample-banner-rectangle .sample-banner-cta {
  background: white;
  color: #ee5a5a;
}

/* Mobile Sticky Banner (320x50) */
.sample-banner-mobile {
  width: 100%;
  max-width: 320px;
  height: 50px;
  margin: 0 auto;
  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.sample-banner-mobile .sample-banner-title {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.sample-banner-mobile .sample-banner-cta {
  background: white;
  color: #11998e;
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
}

/* Affiliate Product Banner */
.sample-affiliate-banner {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.sample-affiliate-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.sample-affiliate-image {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sample-affiliate-image svg {
  width: 48px;
  height: 48px;
  color: white;
}

.sample-affiliate-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.sample-affiliate-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sample-affiliate-title {
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.sample-affiliate-desc {
  color: white;
  font-size: 0.8rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sample-affiliate-cta {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.sample-affiliate-cta .sample-banner-cta {
  background: white;
  color: #f5576c;
}

@media (max-width: 640px) {
  .sample-affiliate-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  .sample-affiliate-image {
    width: 80px;
    height: 80px;
  }

  .sample-affiliate-image svg {
    width: 36px;
    height: 36px;
  }
}

/* Native Ad Banner */
.sample-native-banner {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.sample-native-banner:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.sample-native-image {
  width: 120px;
  height: 90px;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sample-native-image svg {
  width: 40px;
  height: 40px;
  color: #667eea;
}

.sample-native-content {
  flex: 1;
  min-width: 0;
}

.sample-native-badge {
  display: inline-block;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.sample-native-title {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sample-native-desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sample-native-cta {
  flex-shrink: 0;
}

.sample-native-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.sample-native-cta-btn:hover {
  background: var(--color-primary-dark);
}

.sample-native-cta-btn svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .sample-native-banner {
    flex-direction: column;
    text-align: center;
  }

  .sample-native-image {
    width: 100%;
    height: 120px;
  }
}

/* ============================================
   Turbo Frames Loading State
   ============================================ */

/* Loading overlay for Turbo Frames */
turbo-frame[aria-busy="true"] {
  position: relative;
  pointer-events: none;
}

turbo-frame[aria-busy="true"] > * {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

turbo-frame[aria-busy="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: turbo-spinner 0.7s linear infinite;
  z-index: 100;
}

@keyframes turbo-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  turbo-frame[aria-busy="true"]::after {
    animation: none;
    border-top-color: var(--color-primary);
    border-right-color: var(--color-primary);
  }
}
