/* --- Ranking Page Specific CSS --- */
.ranking-page-container {
  display: flex;
  gap: 30px;
  margin-top: calc(var(--header-height) + 40px);
  margin-bottom: 60px;
}
.ranking-main {
  flex: 1;
  min-width: 0;
}
.ranking-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: flex-start;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

/* Hero Section */
.rk-hero {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  border: 1px solid #e2e8f0;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}
.rk-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
}
.rk-hero-content {
  flex: 1;
  padding-right: 20px;
}
.rk-title {
  font-size: 2.2rem;
  color: #1e293b;
  margin-bottom: 10px;
}
.rk-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 25px;
}
.rk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.rk-stat-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 15px;
  border-radius: 12px;
}
.rk-stat-icon {
  width: 40px; height: 40px;
  background: #eff6ff;
  color: #3b82f6;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.rk-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 2px;
}
.rk-stat-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}
.rk-stat-val span { font-size: 0.8rem; font-weight: normal; color: #64748b; }
.rk-hero-img {
  width: 250px;
  flex-shrink: 0;
}
.rk-hero-img img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

/* Filter Bar */
.rk-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.rk-tabs {
  display: flex;
  gap: 10px;
}
.rk-tab {
  padding: 8px 16px;
  background: #ffffff;
  color: #475569;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  line-height: inherit;
  display: inline-block;
}
.rk-tab.active, .rk-tab:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.rk-dropdowns {
  display: flex;
  gap: 10px;
}
.rk-select {
  padding: 8px 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #475569;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}

/* Ranking List */
.rk-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.rk-item {
  display: flex;
  background: #ffffff;
  border-radius: 12px;
  padding: 25px 25px 25px 40px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  border: 1px solid #e2e8f0;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rk-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.rk-badge {
  position: absolute;
  left: -1px; top: 15px;
  width: 25px; height: 35px;
  background: #e2e8f0;
  color: #64748b;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 5px;
  font-weight: bold; font-size: 1rem;
  border-radius: 0 4px 4px 0;
}
.rk-badge::after {
  content: ''; position: absolute; bottom: -8px; left: 0;
  border-width: 8px 12.5px 0 12.5px;
  border-style: solid;
  border-color: inherit;
  border-bottom-color: transparent !important;
}
.rk-badge.badge-1 { background: #f59e0b; color: white; border-top-color: #f59e0b; border-left-color: #f59e0b; border-right-color: #f59e0b; }
.rk-badge.badge-2 { background: #94a3b8; color: white; border-top-color: #94a3b8; border-left-color: #94a3b8; border-right-color: #94a3b8; }
.rk-badge.badge-3 { background: #d97706; color: white; border-top-color: #d97706; border-left-color: #d97706; border-right-color: #d97706; }

.rk-logo {
  width: 80px; height: 80px;
  border-radius: 16px;
  margin-right: 25px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rk-info { flex: 1; min-width: 0; padding-right: 20px; border-right: 1px solid #e2e8f0; }
.rk-title-row { display: flex; align-items: center; gap: 15px; margin-bottom: 8px; }
.rk-name { font-size: 1.4rem; color: #0f172a; margin: 0; }
.rk-tag { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; font-weight: bold; }
.rk-tag.hot { background: #fee2e2; color: #ef4444; }
.rk-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.rk-tag-sm { background: #f1f5f9; color: #64748b; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; }
.rk-desc { font-size: 0.85rem; color: #475569; margin-bottom: 15px; line-height: 1.5; }
.rk-platforms { font-size: 0.8rem; color: #94a3b8; line-height: 1.6; }
.rk-plat-icons { color: #64748b; display: inline-flex; gap: 5px; align-items: center; margin-left: 5px; }

.rk-metrics {
  width: 160px; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
  align-items: center;
  border-right: 1px solid #e2e8f0;
}
.rk-metric { text-align: center; }
.m-val { font-size: 0.95rem; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 4px; }
.text-yellow { color: #f59e0b; }
.text-green { color: #10b981; }
.text-blue { color: #3b82f6; }
.text-purple { color: #8b5cf6; }
.m-lbl { font-size: 0.75rem; color: #94a3b8; }

.rk-action {
  width: 180px; padding-left: 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.rk-price { text-align: center; color: #64748b; font-size: 0.85rem; margin-bottom: 5px; }
.rk-price strong { font-size: 1.4rem; color: #0f172a; }
.rk-price span { color: #10b981; font-size: 0.75rem; display: block; margin-top: 2px; }
.rk-btn { padding: 8px; font-size: 0.9rem; text-align: center; }

.rk-load-more { text-align: center; margin-top: 10px; }

/* Sidebar Widgets */
.rk-widget {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}
.rk-w-title {
  font-size: 1.1rem;
  color: #0f172a;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}
.rk-top-list { list-style: none; }
.rk-top-list li { display: flex; align-items: center; margin-bottom: 15px; font-size: 0.95rem; }
.top-badge {
  width: 20px; height: 20px; border-radius: 50%;
  background: #e2e8f0; color: #64748b; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: bold; margin-right: 12px;
}
.top-badge.b-1 { background: #fef3c7; color: #f59e0b; }
.top-badge.b-2 { background: #eff6ff; color: #3b82f6; }
.top-badge.b-3 { background: #ffedd5; color: #f97316; }
.rk-top-list a { color: #1e293b; text-decoration: none; flex: 1; }
.rk-top-list a:hover { color: #2563eb; }
.top-score { color: #64748b; font-size: 0.85rem; }

.rk-dim-list { list-style: none; }
.rk-dim-list li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.dim-icon {
  width: 36px; height: 36px; border-radius: 8px; background: #f8fafc;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.text-orange { color: #f97316; }
.dim-name { font-size: 0.95rem; color: #1e293b; font-weight: 500; margin-bottom: 4px; }
.dim-desc { font-size: 0.8rem; color: #64748b; line-height: 1.4; }

.rk-timeline { border-left: 2px solid #e2e8f0; margin-left: 60px; padding-left: 20px; }
.tl-item { position: relative; margin-bottom: 20px; }
.tl-item::before {
  content: ''; position: absolute; left: -25px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; border: 2px solid #ffffff;
}
.tl-date { font-size: 0.75rem; color: #94a3b8; margin-bottom: 4px; position: absolute; left: -65px; top: 2px; }
.tl-title { font-size: 0.9rem; color: #1e293b; text-decoration: none; font-weight: 500; display: block; margin-bottom: 4px; }
.tl-title:hover { color: #2563eb; }
.tl-desc { font-size: 0.8rem; color: #64748b; }

.rk-guide-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  border: 1px solid #bfdbfe;
}
.gb-title { font-size: 1.1rem; color: #1e3a8a; margin-bottom: 8px; }
.gb-desc { font-size: 0.85rem; color: #3b82f6; margin-bottom: 20px; }
.gb-btn { background: #2563eb; color: #ffffff; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-size: 0.9rem; display: inline-block; }

/* FAQ Row */
.rk-faq-section { padding: 40px 0; }
.faq-row { display: flex; gap: 15px; flex-wrap: wrap; }
.faq-pill {
  background: #ffffff; border: 1px solid #e2e8f0; padding: 12px 20px; border-radius: 30px;
  color: #475569; text-decoration: none; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.faq-pill:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }

@media (max-width: 1024px) {
  .ranking-page-container { flex-direction: column; }
  .ranking-sidebar { width: 100%; }
  .rk-hero { flex-direction: column; text-align: center; }
  .rk-hero-content { padding-right: 0; margin-bottom: 20px; }
  .rk-stats { justify-content: center; }
  .rk-item { flex-direction: column; padding: 20px; }
  .rk-badge { left: 20px; top: 0; border-radius: 0 0 4px 4px; }
  .rk-badge::after { border-width: 0 12.5px 8px 12.5px; bottom: auto; top: -8px; }
  .rk-logo { margin: 0 auto 20px; }
  .rk-info { padding-right: 0; border-right: none; border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; margin-bottom: 20px; text-align: center; }
  .rk-title-row { justify-content: center; }
  .rk-tags { justify-content: center; }
  .rk-metrics { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; margin-bottom: 20px; padding: 0; }
  .rk-action { width: 100%; padding-left: 0; flex-direction: row; align-items: center; }
  .rk-price { text-align: left; margin-bottom: 0; flex: 1; }
  .rk-btn { flex: 1; }
}


