/* Reset e base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.4;
  color: #202020;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.btn-menu {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.logo img {
  height: 24px;
}

.search-form {
  display: flex;
  flex: 1;
  max-width: 800px;
  border: 1px solid #ccc;
  border-radius: 2px;
  overflow: hidden;
}

.search-form input[type="search"] {
  flex-grow: 1;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
}

.search-form input[type="search"]:focus {
  outline: none;
}

.search-form button {
  background-color: #f8f8f8;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  font-size: 18px;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 30px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  position: relative;
  padding: 6px 4px;
}

.icon-btn img {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Main content */
.main-content {
  display: flex;
  max-width: 100%;
  margin: 60px 0;
  padding: 0 12px;
  justify-content: center;
}

.video-section {
  flex-basis: 70%;;
  display: flex;
  flex-direction: column;
  min-width: 340px;
}

.video-player {
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-info {
  background-color: #fff;
  padding: 16px;
  border-radius: 8px;
  line-height: 1.5;
}
.video-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Proporção 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px; /* opcional, para bordas arredondadas */
}

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

/* Título do vídeo */
.video-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

/* Container que organiza canal e botão inscrição em linha */
.channel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap; /* impede que quebre para linha */
  gap: 16px;
  margin-bottom: 16px;
}

/* Seção de Logo e texto do canal */
.channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0; /* evite overflow horizontal */
}

/* Avatar do canal */
.channel-avatar {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* Texto do canal */
.channel-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap; /* evita quebras line nos textos */
  min-width: 0;
}

/* Nome do canal */
.channel-name {
  font-weight: 700;
  line-height: 1.2;
}

/* Inscritos */
.channel-subscribers {
  color: #606060;
  font-size: 0.9rem;
}

/* Botão Inscrever-se */
.btn-subscribe {
  background-color: #cc0000;
  color: white;
  font-weight: 700;
  padding: 10px 18px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
}

.btn-subscribe:hover {
  background-color: #b30000;
}


/* Botões de ação */
.btn-action {
  background: none;
  border: none;
  cursor: pointer;
  color: #606060;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action:hover {
  color: #000;
  text-decoration: underline;
}

/* Informações de visualizações e data */
.video-views-date {
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: #606060;
}

/* Descrição do vídeo */
.video-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #202020;
}

/* Aside - Vídeos recomendados */
.recommended-videos {
  width: 320px;
  overflow-y: auto;
  max-height: calc(100vh - 100px);
}

.recommended-videos ul {
  display: flex;
  flex-direction: column;
}

.recommended-link {
  display: flex;
  gap: 12px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  padding: 8px;
  transition: background-color 0.2s;
  cursor: pointer;
  align-items: center;
}

.recommended-link:hover {
  background-color: #f2f2f2;
}

.recommended-link img {
  width: 140px;
  height: auto; 
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.recommended-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.92rem;
  color: #202020;
}

.recommended-info h3 {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 1rem;
}

.recommended-info .channel {
  color: #606060;
  margin-bottom: 6px;
}

.recommended-info .views-date {
  font-size: 0.85rem;
  color: #606060;
  line-height: 1.2;
}

/* Responsividade */
@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
    margin: 12px;
  }
  .recommended-videos {
    width: 100%;
    max-height: none;
    margin-top: 24px;
  }
  .video-section {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .search-form {
    max-width: 100%;
  }
  .btn-subscribe {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .channel-name,
  .video-title {
    font-size: 1rem;
  }
  .recommended-link img {
    width: 90px;
    height: 50.6px;
  }
}