/* File: resources/js/components/shared/unified-card-styles.css */

/* Base Card Styles */
.content-card {
  position: relative;
  background: #1a1c22;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Thumbnail Section */
.card-thumbnail {
  position: relative;
  overflow: hidden;
  background: #0f1013;
}

.thumbnail-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.thumbnail-image.loaded {
  opacity: 1;
}

/* Shimmer Loading */
.thumbnail-shimmer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.shimmer {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    #0f1013 0%,
    #1a1c22 50%,
    #0f1013 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Content Type Badge */
.content-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.content-type-badge i {
  font-size: 10px;
}

/* Top Badges */
.top-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-new {
  background: #ff1744;
}

.badge-rating {
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}

.badge-rating i {
  font-size: 9px;
}

.badge-live {
  background: rgba(255, 23, 68, 0.9);
}

.badge-quality {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-quality.quality-4k {
  background: rgba(255, 152, 0, 0.9);
  border-color: transparent;
}

.badge-quality.quality-fhd {
  background: rgba(76, 175, 80, 0.9);
  border-color: transparent;
}

.badge-quality.quality-hd {
  background: rgba(33, 150, 243, 0.9);
  border-color: transparent;
}

/* Favorite Button */
.favorite-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
  z-index: 2;
}

.favorite-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.favorite-btn.active {
  background: #ff1744;
  border-color: transparent;
}

.favorite-btn.active:hover {
  background: #d50000;
}

/* Progress Indicator */
.progress-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff1744, #d50000);
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  display: block;
}

/* Play Overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.content-card:hover .play-overlay {
  opacity: 1;
}

.play-button {
  width: 56px;
  height: 56px;
  background: rgba(255, 23, 68, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.play-button:hover {
  background: #ff1744;
  transform: scale(1.1);
}

.play-button i {
  margin-left: 2px; /* Center play icon */
}

/* Info Section */
.card-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #9ca3af;
}

.meta-primary {
  display: flex;
  gap: 8px;
  align-items: center;
}

.meta-primary span:not(:last-child)::after {
  content: '•';
  margin-left: 8px;
  color: #4b5563;
}

.meta-secondary,
.meta-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;
  font-weight: 500;
}

.meta-secondary i,
.meta-rating i {
  font-size: 10px;
}

/* State Modifiers */
.content-card.is-favorite {
  box-shadow: 0 0 0 2px rgba(255, 23, 68, 0.3);
}

.content-card.has-progress {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .content-card {
    border-radius: 8px;
  }
  
  .content-type-badge,
  .top-badges,
  .channel-number {
    transform: scale(0.9);
  }
  
  .badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  
  .favorite-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .play-button {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
  
  .card-info {
    padding: 10px;
  }
  
  .card-title {
    font-size: 13px;
    -webkit-line-clamp: 1;
  }
  
  .card-meta {
    font-size: 11px;
  }
}

/* Touch optimizations */
@media (hover: none) {
  .play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
  }
  
  .content-card:active {
    transform: scale(0.98);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .content-card,
  .thumbnail-image,
  .play-overlay,
  .play-button,
  .favorite-btn,
  .progress-fill {
    transition: none;
  }
  
  .shimmer {
    animation: none;
    background: #1a1c22;
  }
}