/* 
 * Consolidated Movie Cards CSS
 * This file contains all styling for movie cards, consolidated from multiple files
 */

/* Card Base Structure */
.card-movie {
  position: relative;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1a1a1f;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.card-movie:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Image Container */
.card-movie .card-overlay {
  position: relative;
  overflow: hidden;
}

.card-movie .card-overlay img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.card-movie:hover .card-overlay img {
  transform: scale(1.05);
}

/* Dark overlay on hover */
.card-movie .card-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0.1) 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.card-movie:hover .card-overlay::after {
  opacity: 1;
}

/* Play button */
.card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
  opacity: 0.9;
}

.card-play:before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 3px;
}

.card-movie:hover .card-play {
  transform: translate(-50%, -50%) scale(1.2);
  background: rgba(98, 77, 227, 0.9);
  box-shadow: 0 0 20px rgba(98, 77, 227, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.card-play:after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border: 2px solid rgba(98, 77, 227, 0.3);
  animation: pulse 2s infinite;
  opacity: 0;
}

.card-movie:hover .card-play:after {
  opacity: 1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Card body */
.card-movie .card-body {
  padding: 0.85rem;
  background-color: #1a1a1f;
  border: none;
}

/* Title */
.card-movie .title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Metadata */
.card-movie .d-flex {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
}

.card-movie .text-muted {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #6c757d;
}

/* Subtitle */
.card-movie .title_sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #9d9daa;
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge styling */
.card-movie .card-new,
.card-new {
  position: absolute;
  z-index: 10;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #00c853;
  color: #ffffff;
  top: 8px;
  right: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-movie .card-featured,
.card-featured {
  position: absolute;
  z-index: 10;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #624de3;
  color: #ffffff;
  top: 8px;
  left: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-movie .card-upcoming {
  position: absolute;
  z-index: 15;
  padding: 0.25em 0.7em;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #ffc107;
  color: #000;
  bottom: 10px;
  left: 10px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure upcoming badge is visible even when not hovering */
.card-movie:not(:hover) .card-overlay .card-upcoming {
  opacity: 1;
  visibility: visible;
  z-index: 11;
}

/* Members badge */
.badge-members {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 15;
  padding: 0.4em 0.9em;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #9c27b0;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.badge-members::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

/* IMDb rating */
.rating-badge {
  position: absolute;
  bottom: 0px;
  right: 20px;
  background: rgba(0, 0, 0, 0.884);
  color: #FFD700;
  font-weight: 1000;
  padding: 5px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.3s ease;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.card-movie:hover .rating-badge {
  opacity: 1;
}

/* Hide ALL badges when rating is shown */
.card-movie:hover .badge,
.card-movie:hover .badge-featured,
.card-movie:hover .card-featured,
.card-movie:hover .badge-members,
.card-movie:hover .badge-private,
.card-movie:hover .card-private,
.card-movie:hover .card-new {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s ease !important;
}

/* Show badges by default */
.badge,
.badge-featured,
.card-featured,
.badge-members,
.badge-private,
.card-private,
.card-new {
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}

/* Compact cards for sliders and grids */
.mb-3 .row[class*="row-cols-"] .col .card-movie {
  margin-bottom: 0.75rem;
}

.mb-3 .row[class*="row-cols-"] .card-movie .card-overlay {
  height: 0;
  padding-bottom: 150%;
  position: relative;
}

.mb-3 .row[class*="row-cols-"] .card-movie .card-overlay img,
.mb-3 .row[class*="row-cols-"] .card-movie .card-overlay picture,
.mb-3 .row[class*="row-cols-"] .card-movie .card-overlay source {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mb-3 .row[class*="row-cols-"] .card-movie .card-body {
  padding: 8px 5px;
}

.mb-3 .row[class*="row-cols-"] .card-movie .title {
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 0;
}

/* Continue Watched Slider */
.continue-watched-slider {
  position: relative;
  overflow: hidden;
}

.continue-watched-slider .row {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-right: -10px;
  margin-left: -10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.continue-watched-slider .row::-webkit-scrollbar {
  height: 6px;
}

.continue-watched-slider .row::-webkit-scrollbar-track {
  background: transparent;
}

.continue-watched-slider .row::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.continue-watched-slider .col {
  flex: 0 0 auto;
  width: 160px;
  padding-right: 10px;
  padding-left: 10px;
}

.continue-watched-slider .card-movie {
  margin-bottom: 0;
}

.continue-watched-slider .card-movie .card-overlay {
  height: 0;
  padding-bottom: 150%;
  position: relative;
}

.continue-watched-slider .card-movie .card-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.continue-watched-slider .card-movie .card-body {
  padding: 8px 5px;
}

.continue-watched-slider .card-movie .title {
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 0;
}

/* Progress bar for watched movies */
.continue-watched-slider .progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: 20;
}

.continue-watched-slider .progress-bar {
  height: 100%;
  background-color: #3861fb;
}

/* Gradient shadows for slider edges */
.continue-watched-slider::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 10px;
  width: 40px;
  background: linear-gradient(to right, rgba(26, 26, 31, 0), rgba(26, 26, 31, 1));
  pointer-events: none;
  z-index: 10;
}

.continue-watched-slider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 10px;
  width: 40px;
  background: linear-gradient(to left, rgba(26, 26, 31, 0), rgba(26, 26, 31, 1));
  pointer-events: none;
  z-index: 10;
}

/* Profile movie cards - smaller size */
.profile-movie-card {
  font-size: 90%;
  line-height: 1.3;
  margin-bottom: 0;
}

.profile-movie-card .card-body {
  padding: 0.5rem;
}

.profile-movie-card .title {
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.profile-movie-card .title_sub {
  font-size: 0.65rem;
  margin-bottom: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card-imdb {
  transform: scale(0.75);
  transform-origin: top right;
}

.profile-card-upcoming {
  font-size: 0.65rem;
  padding: 0.15em 0.5em;
}

@media (max-width: 767px) {
  .card-movie .card-play {
    width: 44px; /* Slightly larger for easier tapping */
    height: 44px;
    opacity: 0; /* Hidden by default on mobile */
    transform: translate(-50%, -50%) scale(1); /* No scaling down */
  }

  .card-movie:active .card-play { /* Show on tap/click */
    opacity: 1;
  }

  .card-play:before {
    border-width: 9px 0 9px 14px; /* Adjust play icon size */
  }

  .card-movie:hover .card-play {
    transform: translate(-50%, -50%) scale(1.1); /* Slight scale on tap */
  }

  .card-movie .card-new,
  .card-new {
    font-size: 7px;
    padding: 2px 4px;
    top: 6px;
    right: 6px;
  }

  .card-movie .card-featured,
  .card-featured {
    font-size: 7px;
    padding: 2px 4px;
    top: 6px;
    left: 6px;
  }

  .rating-badge {
    width: 32px; /* Slightly larger */
    height: 32px;
    font-size: 11px; /* Slightly larger */
    bottom: 6px;
    right: 6px;
    opacity: 1; /* Always visible on mobile */
  }

  /* Ensure badges and play button are on top */
  .card-movie .card-overlay > * {
    z-index: 12;
  }

  .card-movie .title {
    font-size: 0.8rem; /* Slightly larger for readability */
  }

  .card-movie .text-muted,
  .card-movie .title_sub {
    font-size: 0.65rem; /* Consistent smaller size */
  }
} 