/* ============================================
   Playables Grid Styling
   ============================================ */

.portfolio-section {
  padding: 100px 0 60px;
}

.headline p {
  margin-top: 12px;
}

.tap-preview-text {
  font-style: italic;
  color: #666;
  margin-bottom: 40px;
}

#playables-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

#playables-filters::-webkit-scrollbar {
  height: 6px;
}

#playables-filters::-webkit-scrollbar-track {
  background: transparent;
}

#playables-filters::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 3px;
}

#playables-filters::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

.filter-btn {
  padding: 10px 24px;
  border: none;
  background: white;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #333;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transform: translateY(0);
}

#playables-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
  min-height: 600px;
  align-content: start;
}

.playable-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.playable-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-image-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow: hidden;
}

.card-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.playable-card:hover .card-logo {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.playable-card:hover .card-overlay {
  opacity: 1;
}

.btn-view-details,
.btn-qr-modal,
.btn-play {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-view-details {
  background: white;
  color: #004fe5;
}

.btn-view-details:hover {
  background: #004fe5;
  color: white;
}

.btn-qr-modal {
  background: #FFA500;
  color: white;
}

.btn-qr-modal:hover {
  background: #FF8C00;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-content h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.category-tag {
  display: inline-block;
  align-self: flex-start;
  position: relative;
  padding: 3px 10px;
  background: transparent;
  color: #667eea;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: auto;
  z-index: 1;
}

.category-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-radius: 8px;
  z-index: -1;
}

.category-tag::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  z-index: -2;
}

.category-tag .icon {
  margin-right: 5px;
  color: #667eea;
  font-size: 12px;
}

.description {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.platforms {
  display: none;
}

.platform-badge {
  display: none;
}

.card-footer {
  display: none;
}

.category-badge {
  display: none;
}

.btn-play {
  background: #004fe5;
  color: white;
  padding: 8px 16px;
}

.btn-play:hover {
  background: #0039b3;
}

.qr-code {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none;
}

.qr-code img {
  width: 150px;
  height: 150px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  padding: 20px 0;
  height: 88px;
}

.btn-prev,
.btn-next {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-prev:hover:not(:disabled),
.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-prev:disabled,
.btn-next:disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
}

.page-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
  font-size: 16px;
  min-width: 80px;
  justify-content: center;
}

.current-page {
  color: #667eea;
  font-size: 18px;
}

.separator {
  color: #999;
}

.total-pages {
  color: #666;
  font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
  #playables-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  #playables-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  #playables-filters {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Tablet and mobile adjustments */
@media (max-width: 767px) {
  .portfolio-section {
    padding: 0 !important;
  }
  
  .headline h2 {
    margin-bottom: 8px;
  }
  
  .headline p {
    margin-bottom: 4px;
    padding: 0 20px;
  }
  
  .tap-preview-text {
    margin-bottom: 6px !important;
  }
  
  #playables-grid {
    padding: 0 15px;
  }
  
  #playables-filters {
    margin-bottom: 12px;
    padding: 8px 15px;
  }
}

/* Two columns on mobile screens */
@media (max-width: 480px) {
  .portfolio-section {
    padding: 0 !important;
  }
  
  .headline h2 {
    margin-bottom: 6px;
    font-size: 22px;
  }
  
  .headline p {
    margin-bottom: 3px;
    font-size: 13px;
    padding: 0 15px;
  }
  
  .tap-preview-text {
    margin-bottom: 4px !important;
    font-size: 12px;
  }
  
  #playables-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 12px;
  }
  
  #playables-filters {
    margin-bottom: 10px;
    padding: 8px 12px;
  }
  
  .card-content h3 {
    font-size: 16px;
  }
  
  .category-tag {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  .description {
    font-size: 13px;
  }
}
