/* app/assets/stylesheets/home.css */

.home-page {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
}

@media (max-width: 768px) {
  .home-page {
    grid-template-columns: 1fr;
  }
  .home-sidebar {
    order: -1;
  }

  /* Mobile responsive game rows */
  .game-row {
    gap: 8px;
    padding: 8px 4px;
    min-height: 48px;
  }

  .game-row-rank {
    min-width: 24px;
    font-size: 12px;
  }

  .game-row-rank.rank-top-1,
  .game-row-rank.rank-top-2,
  .game-row-rank.rank-top-3 {
    font-size: 13px;
  }

  .game-row-image {
    display: none;
  }

  .home-main .section {
    margin-bottom: 16px;
  }

  .home-main .section h2 {
    font-size: 16px;
  }

  .home-main .section .section-subtitle {
    display: none;
  }

  .tag-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }

  .tag-chip {
    flex-shrink: 0;
    font-size: 12px;
    padding: 4px 10px;
  }
}

.home-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.sidebar-section {
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-section h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.sidebar-list {
  margin-bottom: 0.75rem;
}

.sidebar-list h4 {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 0.25rem;
}

.sidebar-game-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-game-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid #333;
}

.sidebar-game-list li:last-child {
  border-bottom: none;
}

.sidebar-game-list a {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.875rem;
}

.sidebar-game-list a:hover {
  text-decoration: underline;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #666;
  font-weight: normal;
}

.section-see-all {
  margin-left: auto;
  font-size: 0.875rem;
}

.game-section {
  margin-bottom: 2rem;
}

/* Homepage game grid - 2 columns with spacing */
.home-main .game-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Ranked game cards (Top Games section) */
.game-card-ranked {
  position: relative;
}

.game-card {
  position: relative;
}

.game-card-ranked {
  position: relative;
}

.game-card-rank {
  position: absolute;
  top: -8px;
  left: -8px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  font-weight: bold;
  font-size: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.game-card-content {
  display: flex;
  flex-direction: column;
}

.game-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-card-rating {
  color: #4ade80;
  font-weight: 600;
  font-size: 14px;
}

.game-card-reviews {
  color: #9ca3af;
  font-size: 12px;
}

.game-card-trending {
  color: #60a5fa;
  font-weight: 600;
  font-size: 14px;
}

.game-card-release-date {
  color: #9ca3af;
  font-size: 12px;
}

.game-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 10;
}

.game-card-year-badge {
  background: linear-gradient(135deg, #10b981, #059669);
}

.game-card-weekly-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.game-card-discount-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  left: 8px;
  right: auto;
}

.game-card-free-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.game-card-price {
  color: #4ade80;
  font-weight: 600;
  font-size: 14px;
}

.game-card-original-price {
  color: #9ca3af;
  font-size: 12px;
  text-decoration: line-through;
}

.game-card-trackers {
  color: #60a5fa;
  font-weight: 600;
  font-size: 14px;
}

.game-card-players {
  color: #f472b6;
  font-weight: 600;
  font-size: 14px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}

.tag-chip {
  background: #1f2937;
  color: #e5e7eb;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid #374151;
  transition: all 0.2s;
}

.tag-chip:hover {
  background: #374151;
  border-color: #4b5563;
}

.tag-chip-active {
  background: #4f46e5;
  border-color: #6366f1;
  color: white;
}

.tag-chip-active:hover {
  background: #4338ca;
  border-color: #4f46e5;
}

.tag-filter-bar {
  margin-bottom: 0.5rem;
}

/* Compact game row format - steam250 style */
.game-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 4px;
  background: transparent;
  transition: background-color 0.15s ease;
  min-height: 44px;
}

.game-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.game-row-ranked {
  padding-left: 4px;
}

.game-row-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.game-row-rank {
  min-width: 32px;
  font-weight: 700;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.game-row-loading {
  opacity: 0.5;
}

.game-row-loading .loading-text,
.game-row-image-placeholder {
  display: block;
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.game-row-loading .loading-text {
  height: 14px;
  width: 120px;
}

.game-row-image-placeholder {
  width: 60px;
  height: 34px;
}

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

.game-row-rank.rank-top-1 {
  color: #ffd700;
  font-size: 16px;
}

.game-row-rank.rank-top-2 {
  color: #c0c0c0;
  font-size: 15px;
}

.game-row-rank.rank-top-3 {
  color: #cd7f32;
  font-size: 15px;
}

.game-row-image {
  width: 60px;
  height: 34px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  flex-shrink: 0;
}

.game-row-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-row-title a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.game-row-title a:hover {
  color: #fff;
  text-decoration: underline;
}

.game-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-content: space-between;
}

.game-row-score {
  font-size: 11px;
  font-weight: 600;
}

.game-row-score.score-positive {
  color: #4ade80;
}

.game-row-score.score-mixed {
  color: #fbbf24;
}

.game-row-score.score-negative {
  color: #f87171;
}

.game-row-reviews {
  color: #9ca3af;
  font-size: 11px;
}

.game-row-trending {
  color: #60a5fa;
  font-weight: 600;
  font-size: 11px;
}

.game-row-date {
  color: #9ca3af;
  font-size: 12px;
}

.game-row-price {
  font-weight: 600;
  font-size: 11px;
  color: #4ade80;
}

.game-row-price.price-free {
  color: #22c55e;
}

.game-row-original-price {
  color: #6b7280;
  font-size: 11px;
  text-decoration: line-through;
}

.game-row-discount {
  background: #dc2626;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.game-row-trackers {
  color: #60a5fa;
  font-weight: 600;
  font-size: 13px;
}

.game-row-players {
  color: #f472b6;
  font-weight: 600;
  font-size: 13px;
}

/* Section styling for dense layout */
.home-main .section {
  margin-bottom: 24px;
}

.home-main .section h2 {
  font-size: 18px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #374151;
}

.home-main .section .section-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-left: 8px;
  font-weight: normal;
}
