* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f0f0f;
  color: #ffffff;
}

header {
  background: linear-gradient(135deg, #6e00ff 0%, #3600cc 100%);
  color: white;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(110, 0, 255, 0.5);
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(110, 0, 255, 0.7);
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.video-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
}

.thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.thumbnail-svg {
  width: 100%;
  height: 100%;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rgb-border {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  padding: 6px;  
  background: linear-gradient(
    45deg,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3
  );
  background-size: 400% 400%;
  animation: rgb-animation 3s linear infinite;
}

.rgb-border::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #1a1a1a;
  border-radius: 4px;
  z-index: -1;
}

.rgb-border img {
  border-radius: 4px;
  display: block;
  position: relative;
  z-index: 1;
}

@keyframes rgb-animation {
  0% {
    background-position: 0% 100%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 100%;
  }
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  z-index: 2;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

.youtube-btn, .copy-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #6e00ff;
  color: white;
  text-decoration: none;
  padding: 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 0 0 8px 8px;
}

.copy-btn {
  background: #28a745;
}

.youtube-btn:hover {
  background: #5200bd;
  transform: scale(1.02);
}

.copy-btn:hover {
  background: #218838;
  transform: scale(1.02);
}

.popular-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 69, 0, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(255, 69, 0, 0.6);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 69, 0, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 69, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 69, 0, 0);
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
}