/* ===== MAS Videos Ultra Template - Components CSS (CLEANED) ===== */

/* ===== LOADING STATES ===== */
.mvut-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-6);
  color: var(--muted);
}

.mvut-loader {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== SKELETON LOADING ===== */
.mvut-skeleton {
  background: linear-gradient(90deg, var(--elev-2) 25%, var(--elev-3) 50%, var(--elev-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mvut-skeleton-card {
  border: 1px solid var(--border);
  background: var(--elev-1);
  border-radius: var(--radius);
  overflow: hidden;
}

.mvut-skeleton-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--elev-2);
}

.mvut-skeleton-content {
  padding: 12px;
}

.mvut-skeleton-title {
  height: 16px;
  background: var(--elev-2);
  border-radius: 4px;
  margin-bottom: 8px;
}

.mvut-skeleton-text {
  height: 12px;
  background: var(--elev-2);
  border-radius: 4px;
  width: 70%;
}

/* ===== THUMBNAIL ENHANCEMENTS ===== */
.mvut-thumb--placeholder {
  background: linear-gradient(135deg, var(--elev-2), var(--elev-3));
  position: relative;
}

.mvut-thumb--placeholder::after {
  content: '🎬';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  opacity: 0.3;
}

/* ===== ENHANCED CARD INTERACTIONS ===== */
.mvut-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  transition: all 0.2s ease;
}

/* ===== ENHANCED FILTER STATES (Compatible with base.css) ===== */
.mvut-chip.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: var(--brand);
  color: white;
}

.mvut-chip.is-active span {
  color: white !important;
  font-weight: 600;
}

.mvut-chip:hover {
  background: var(--elev-2);
  border-color: var(--brand);
}

.mvut-chip input:checked + span {
  color: var(--brand);
  font-weight: 600;
}

/* ===== FILTER VISUAL FEEDBACK ===== */
.mvut-sidebar.has-active-filters {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.mvut-grid {
  transition: opacity 0.3s ease;
}

.mvut-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.mvut-results-count.filtered {
  color: var(--brand);
  font-weight: 600;
}

/* ===== CLEAR FILTERS BUTTON ===== */
.mvut-clear-filters {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: var(--space-3);
  width: 100%;
}

.mvut-clear-filters:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ===== ACTIVE FILTERS COUNTER BADGE ===== */
.mvut-filter-toggle {
    position: relative;
}

.mvut-active-filters-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== SINGLE PAGE STYLES ===== */
.mvut-single {
    padding: 0;
    margin: 0;
}

.mvut-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

/* Hero Sections */
.mvut-hero {
    padding: var(--space-8) 0;
    background: var(--elev-1);
}

.mvut-hero-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-8);
    align-items: start;
}

.mvut-hero-poster,
.mvut-hero-photo {
    position: relative;
}

.mvut-poster-image,
.mvut-person-photo {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
}

.mvut-poster-placeholder,
.mvut-photo-placeholder {
    aspect-ratio: 2/3;
    background: var(--elev-2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--muted);
}

.mvut-movie-title,
.mvut-person-name,
.mvut-tv-title {
    font-size: var(--space-8);
    font-weight: 700;
    margin: 0 0 var(--space-4) 0;
    line-height: 1.2;
}

.mvut-movie-meta,
.mvut-person-meta,
.mvut-tv-meta,
.mvut-video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.mvut-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--muted);
    font-size: var(--text-sm);
}

.mvut-meta-item svg {
    width: 16px;
    height: 16px;
}

.mvut-rating,
.mvut-status {
    background: var(--brand);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
}

.mvut-status--cancelled { background: var(--color-error); }
.mvut-status--ended { background: var(--muted); }
.mvut-status--running { background: var(--color-success); }

.mvut-genres {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.mvut-genre-tag {
    background: var(--chip);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--text);
}

.mvut-synopsis,
.mvut-biography {
    margin-top: var(--space-6);
}

.mvut-synopsis h3,
.mvut-biography h3 {
    color: var(--brand);
    margin-bottom: var(--space-3);
    font-size: var(--text-lg);
}

/* ===== VIDEO PLAYER ===== */
.mvut-player {
    background: var(--bg);
    padding: var(--space-6) 0;
}

.mvut-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-2);
}

.mvut-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mvut-video-placeholder {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
}

.mvut-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mvut-play-overlay:hover {
    background: var(--brand);
    transform: translate(-50%, -50%) scale(1.1);
}

.mvut-play-icon {
    width: 32px;
    height: 32px;
    color: white;
}

/* ===== SECTIONS ===== */
.mvut-section-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-bottom: var(--space-6);
    color: var(--text);
}

.mvut-streaming {
    padding: var(--space-8) 0;
    background: var(--elev-1);
}

.mvut-streaming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

.mvut-streaming-item {
    background: var(--elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    text-align: center;
    transition: all 0.2s ease;
    color: var(--text);
}

.mvut-streaming-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand);
}

.mvut-streaming-name {
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.mvut-streaming-quality,
.mvut-streaming-lang {
    font-size: var(--text-sm);
    color: var(--muted);
}

/* ===== HORIZONTAL SCROLLING SECTIONS ===== */
.mvut-cast,
.mvut-videos,
.mvut-filmography,
.mvut-episodes {
    padding: var(--space-8) 0;
}

.mvut-cast-scroll,
.mvut-videos-scroll,
.mvut-filmography-scroll,
.mvut-episodes-scroll {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.mvut-cast-member,
.mvut-video-item,
.mvut-film-item,
.mvut-episode-item {
    flex: 0 0 150px;
}

.mvut-cast-photo,
.mvut-film-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    object-fit: cover;
}

.mvut-video-item {
    flex: 0 0 200px;
}

.mvut-video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
}

.mvut-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mvut-cast-name,
.mvut-video-title,
.mvut-film-title {
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: center;
    margin-top: var(--space-2);
    color: var(--text);
}

.mvut-film-year {
    font-size: var(--text-xs);
    color: var(--muted);
    text-align: center;
}

/* ===== EPISODES GRID ===== */
.mvut-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5);
}

.mvut-episode-item {
    background: var(--elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.mvut-episode-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mvut-episode-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--elev-2);
}

.mvut-episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mvut-episode-number {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.mvut-episode-info {
    padding: var(--space-4);
}

.mvut-episode-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0 0 var(--space-2) 0;
    color: var(--text);
}

.mvut-episode-excerpt {
    font-size: var(--text-sm);
    color: var(--muted);
    line-height: 1.4;
}

/* ===== TAXONOMIES ===== */
.mvut-video-taxonomies,
.mvut-tax-group {
    margin-bottom: var(--space-4);
}

.mvut-tax-group {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.mvut-tax-tag {
    background: var(--chip);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text);
}

.mvut-tax-tag.mvut-quality {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .mvut-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-6);
    }
    
    .mvut-hero-poster,
    .mvut-hero-photo {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .mvut-streaming-grid {
        grid-template-columns: 1fr;
    }
    
    .mvut-episodes-grid {
        grid-template-columns: 1fr;
    }
    
    .mvut-cast-member,
    .mvut-film-item {
        flex: 0 0 120px;
    }
    
    .mvut-video-item {
        flex: 0 0 180px;
    }
}