/* Activities Grid */
.activities-section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filters */
.filters-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-bottom: 30px;
  scrollbar-width: none;
}

.filters-container::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.filter-tab.active {
  background: #ffce00;
  color: #2d3436;
  border-color: #2d3436;
  box-shadow: 4px 4px 0 #2d3436;
}

/* Search */
.search-wrapper {
  position: relative;
  margin-bottom: 40px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px 20px 15px 50px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--glow-cyan);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Grid */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 180px;
  gap: 15px;
  grid-auto-flow: dense;
}

.activity-card {
  background: var(--bg-card);
  border: 3px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
  display: flex;
  flex-direction: column;
}

.activity-card.size-small { grid-column: span 1; grid-row: span 1; }
.activity-card.size-medium { grid-column: span 2; grid-row: span 1; }
.activity-card.size-wide { grid-column: span 2; grid-row: span 1; }
.activity-card.size-tall { grid-column: span 1; grid-row: span 2; }
.activity-card.size-large { grid-column: span 2; grid-row: span 2; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.activity-card:hover {
  transform: scale(1.02) rotate(1deg);
  border-color: var(--card-accent);
  box-shadow: 0 10px 0 var(--card-accent);
  z-index: 10;
}

.card-thumb {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  z-index: 2;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s, opacity 0.3s ease;
}

.thumb-preview {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.thumb-static {
  z-index: 0;
}

.activity-card:hover .thumb-static {
  opacity: 0;
}

.activity-card:hover .thumb-preview {
  opacity: 1;
  transform: scale(1.1);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  z-index: 4;
  border: 2px solid #2d3436;
  color: white;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.badge-arcade { background: #ff4757; }
.badge-puzzle { background: #2ed573; }
.badge-action { background: #ffa502; }
.badge-sports { background: #1e90ff; }
.badge-strategy { background: #7b2fff; }

.hot-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4757;
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 900;
  animation: pulse 2s infinite;
  z-index: 4;
  border: 2px solid #2d3436;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.card-info {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding: 12px;
  color: white;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.card-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-warning);
}

/* Featured Row */
.featured-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0 30px;
  scrollbar-width: none;
}

.featured-row::-webkit-scrollbar {
  display: none;
}

.featured-card {
  min-width: 350px;
}

/* Load More */
.load-more-container {
  text-align: center;
  margin-top: 50px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .activities-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 768px) {
  .activities-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-rows: 140px; }
  .featured-card { min-width: 280px; }
}

@media (max-width: 480px) {
  .activities-grid { gap: 15px; }
  .card-info { padding: 10px; }
}
