:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.9);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.1);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* Grid Layout */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 30px 0;
}

.mv-item {
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mv-item:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* Thumbnail Container */
.mv-thumb-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(45deg, #f8fafc, #e2e8f0);
}

.mv-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  display: block;
}

.mv-item:hover .mv-thumb {
  transform: scale(1.1);
  filter: brightness(1.15) saturate(1.2);
}

/* Play Button */
.mv-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.mv-play-btn::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: var(--accent-gradient);
  animation: pulse 2s infinite;
  z-index: -1;
  opacity: 0.6;
}

.mv-play-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  animation: pulse 2s infinite 0.5s;
  z-index: -2;
  opacity: 0.4;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.mv-item:hover .mv-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 20px 45px rgba(255, 107, 107, 0.6);
}

/* Title */
.mv-title {
  padding: 24px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  background: var(--bg-card);
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

.mv-item:hover .mv-title {
  color: #ee5a24;
  transform: translateY(-2px);
}

/* Modal Overlay */
.mv-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.mv-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mv-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 90vh;
  width: 1000px;
  position: relative;
  transform: scale(0.8) translateY(50px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.mv-modal-overlay.active .mv-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.mv-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.mv-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.mv-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10001;
}

.mv-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.mv-modal-body {
  padding: 0;
}

.mv-iframe {
  width: 100%;
  height: 560px;
  border: none;
  display: block;
}

/* Loading Animation */
.mv-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
}

.mv-loading-spinner {
  width: 100%;
  height: 100%;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent-gradient);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Load More Button */
.mv-load-more {
  display: block;
  margin: 40px auto 20px;
  padding: 16px 32px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
  position: relative;
  overflow: hidden;
}

.mv-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.mv-load-more:active {
  transform: translateY(0);
}

.mv-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.mv-load-more.loading {
  color: transparent;
}

.mv-load-more.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .mv-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px 0;
  }
  
  .mv-modal {
    width: 95vw;
    margin: 20px;
  }
  
  .mv-iframe {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .mv-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px 0;
  }
  
  .mv-item:hover {
    transform: translateY(-8px) scale(1.01);
  }
  
  .mv-play-btn {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
  
  .mv-title {
    padding: 20px 16px;
    font-size: 16px;
  }
  
  .mv-modal-header {
    padding: 20px 24px;
  }
  
  .mv-modal-title {
    font-size: 18px;
  }
  
  .mv-iframe {
    height: 300px;
  }
  
  .mv-load-more {
    margin: 30px auto 15px;
    padding: 14px 28px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .mv-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }
  
  .mv-item {
    margin: 0 8px;
    border-radius: var(--radius-lg);
  }
  
  .mv-play-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .mv-modal {
    margin: 10px;
    border-radius: var(--radius-lg);
  }
  
  .mv-iframe {
    height: 250px;
  }
  
  .mv-load-more {
    margin: 25px auto 10px;
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --bg-card: #2d3748;
    --bg-overlay: rgba(0, 0, 0, 0.95);
  }
  
  .mv-thumb-wrap {
    background: linear-gradient(45deg, #4a5568, #2d3748);
  }
  
  .mv-modal-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.mv-item:focus {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

.mv-close-btn:focus {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}