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

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

.video-header {
  background: #282a35;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #04aa6d;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.back-btn:hover {
  background: #059862;
  transform: translateX(-2px);
}

.video-header h1 {
  font-size: 18px;
  color: white;
}

.video-container {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
}

.video-main {
  background: #181818;
  border-radius: 12px;
  overflow: hidden;
}

.video-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-details {
  padding: 20px;
}

.video-details h2 {
  font-size: 20px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  gap: 20px;
  color: #aaa;
  font-size: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  margin-bottom: 16px;
}

.channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #04aa6d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.channel-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.channel-info p {
  font-size: 13px;
  color: #aaa;
}

.video-description {
  background: #272727;
  padding: 16px;
  border-radius: 8px;
  line-height: 1.6;
  font-size: 14px;
  color: #ccc;
  white-space: pre-wrap;
}

.video-sidebar {
  background: #181818;
  border-radius: 12px;
  padding: 20px;
  height: fit-content;
}

.sidebar-title {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #333;
}

.related-video {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.related-video:hover {
  background: #272727;
}

.related-thumbnail {
  width: 160px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: #000;
}

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

.related-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.related-info h4 {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-info p {
  font-size: 12px;
  color: #aaa;
}

.loading {
  text-align: center;
  padding: 60px 20px;
}

.loading i {
  font-size: 48px;
  color: #04aa6d;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .video-container {
    grid-template-columns: 1fr;
  }

  .video-sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .video-header h1 {
    font-size: 16px;
  }

  .video-container {
    margin: 10px auto;
    padding: 0 10px;
  }

  .video-details {
    padding: 15px;
  }

  .video-details h2 {
    font-size: 18px;
  }

  .related-thumbnail {
    width: 120px;
    height: 68px;
  }

  .related-info h4 {
    font-size: 13px;
  }
  .search-container {
    margin: 15px 0;
    gap: 8px;
  }
  .search-input {
    padding: 8px;
    font-size: 13px;
  }
  .search-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}
.search-container {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.search-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 14px;
  background: #272727;
  color: white;
}

.search-input:focus {
  outline: none;
  border-color: #04aa6d;
}

.search-btn {
  padding: 10px 20px;
  background: #ff0000;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.search-btn:hover {
  background: #cc0000;
}
